When an equation is important and/or tall and/or complicated, you should
display it on a line by itself, with a number. To do this, you put
\begin{equation}
before the equation and \end{equation}
after it, as in
This example also shows how to make the sum and integral symbols, big parentheses, and built-up fractions. (Don’t put built-up fractions in a non-displayed equation, because there won’t be enough vertical space in AJP’s final, single-spaced paragraphs. Use the slashed form, \(x^{3}/(e^{x}-1)\), instead.)
If you want to refer to an equation elsewhere in your manuscript, you can give it a label. For example, in the equation
\begin{equation} \label{deriv} \label{deriv}\frac{\Delta x}{\Delta t}\mathop{\longrightarrow}_{\Delta t\rightarrow 0}\frac{dx}{dt}=\lim_{\Delta t\rightarrow 0}\frac{\Delta x}{\Delta t}\\ \end{equation}we’ve inserted \label{deriv}
to label this equation
deriv.\cite{labelnames} To refer to
Eq. (\ref{deriv}), we then type \ref{deriv}
.\cite{footnotes} Notice
that AJP’s style conventions also require you to put the equation number in
parentheses when you refer to it, and to abbreviate “Eq.” unless it’s at
the beginning of a sentence.
Some equations require more complicated layouts. In the equation
\begin{equation} E_{n}=(n+\tfrac{1}{2})\hbar,\quad\textrm{where}\ n=0,1,2,\ldots,\\ \end{equation}we’ve used \quad
to leave a wide space and \textrm
to put “where”
in plain Roman type. To create a matrix or column vector, as in
you can use the pmatrix and/or bmatrix environment,
for matrices delimited by parentheses and/or brackets. There’s also
a plain matrix environment that omits the delimiters.
In this and other examples of LaTeX tables and arrays, the &
character serves as a “tab” to separate columns, while the \\
control sequence marks the end of a row.
For a list of related equations, with nicely lined-up equals signs, use the eqnarray environment:
\begin{aligned} \oint\vec{B}\cdot d\vec{\ell} & = & -\frac{d\Phi_{E}}{dt}; \\ \oint\vec{E}\cdot d\vec{\ell} & = & \mu_{0}\epsilon_{0}\frac{d\Phi_{B}}{dt}+\mu_{0}I.\\ \end{aligned}You can also use eqnarray to make a multi-line equation, for example,
\begin{aligned} \mathcal{Z} & = & 1+e^{-(\epsilon-\mu)/kT}+e^{-2(\epsilon-\mu)/kT}+\cdots \\ & = & 1+e^{-(\epsilon-\mu)/kT}+(e^{-(\epsilon-\mu)/kT})^{2}+\cdots\nonumber \\ & = & \frac{1}{1-e^{-(\epsilon-\mu)/kT}}.\nonumber \\ \end{aligned}Here the first column of the second and third lines is empty. Note that you
can use \nonumber
within any line to suppress the generation of
an equation number; just be sure that each multi-line equation has at least
one number.
Another commonly used structure is the cases environment, as in
\begin{equation} m(T)=\begin{cases}0&T>T_{c}\,,\\ \bigl{(}1-[\sinh 2\beta J]^{-4}\bigr{)}^{1/8}&T<T_{c}\,.\end{cases}\\ \end{equation}At AJP we require that you put correct punctuation before and after every displayed equation, treating each equation as part of a correctly punctuated English sentence.\cite{mermin} The preceding examples illustrate good equation punctuation.