When preparing your publication, take care with fractions and any complex mathematical equations. It can sometimes be useful to create a PDF from the original Word document that you are editing to show how the equations should be displayed, in case the equation formatting is lost during editing. Decide in advance whether to use an equation editing tool, and try to use the same approach through out.
Inline versus displayed equations
Mathematics may be incorporated into the lines of text (‘inline’) or set off on its own lines (‘displayed’).
Inline:
We used Pythagoras’s theorem, \(a^2+b^2=c^2\), to find the long side of the triangle.
Displayed:
We used Pythagoras’s theorem,
\[a^2+b^2=c^2,\]
to find the long side of the triangle.
Mathematical text will usually use both inline and displayed equations:
- Use inline mathematics if the expression is simple and short, and does not need to be referred to later on.
- Use displayed mathematics if the expression is likely to have a line break in it, looks cramped, forces the lines of text apart or must be referred to later in the text (in which case it should be numbered).
Use different layouts for inline and displayed equations. Note the positions of the limits on the integral sign, for example:
Inline | Displayed |
---|---|
\( \int_0^1 f(x) dx = 3 \) | \[ \int_0^1 f(x) dx = 3 \] |
\(\sum_{i=0}^n a_i=1 \) | \[\sum_{i=0}^n a_i=1 \] |
\( \lim_{x \rightarrow \infty} f(x)=b \) | \[ \lim_{x \rightarrow \infty} f(x)=b \] |
\( \frac{x+y}{z} \) or (preferred if inline) \( (x+y)/z\) | \[ \frac{x+y}{z} \] |
The exact style of expression (e.g. whether the displayed equations are centred, left-aligned or indented) is determined by the publication you are writing for.
Caution! Microsoft Word has a bug that causes it to set any equation that shares a line with non-equation text as if it is inline rather than displayed. Putting the punctuation inside the equation environment may help, but only if the equations are not numbered.
Consider other tools for layout, such as MathType (which works with Word) or LaTeX (which is a Word alternative). (See Using LaTeX.)
Punctuating equations
Punctuate a sentence containing mathematics as if it were any other sentence, even if it includes displayed equations.
Punctuate according to the equation’s function in the sentence:
If \(x=1\), the model is a simple linear one.
The equation, \(x=1\), is acting as a verbal phrase, so add a comma after the introductory clause. Structurally, this sentence is the same as:
If Roger is tall, he might want to try out for the basketball team.
On the other hand:
If \(x=1\) is taken to hold for all \(y\) …
The equation is acting like a noun, so you do not add the comma. Structurally, it is the same as:
If Roger joins the basketball team …
Do not introduce every equation with a colon:
Bragg’s law may be written as
\[ d=\frac{n\lambda}{2\sin\theta} ,\]
and can be used to help us find the atomic separations.
Ensure that the punctuation stands out from the other symbols and does not get lost:
For all \(X>W\), \(X^\prime\) is also …
The comma between \(W\) and \(X\) can easily be lost, making it look like:
For all \(X>WX^\prime\) is also …
Rewrite the sentence:
For all \(X>W\), we find that \(X^\prime\) is also …
Spacing in equations
Equation editors automatically put correct spacing around symbols. If typing mathematics from the keyboard, use nonbreaking spaces, and consider using thin spaces to add clarity:
f(x,y) = x + y
not
f(x,y)=x+y
But compare these with the result from using an equation editor:
\(f\left(x,y\right)=x+y \)
The equation editor makes many spacing adjustments, and even modifies the parentheses, and never makes them italic by accident. In general, use an equation editor.
Line breaks in equations
If an equation breaks over the line, it is preferable to break before an operator (e.g. +, −, ×), and ideally not within a grouped expression (e.g. something surrounded by brackets). For a displayed equation, align the carried-over operator under the first symbol after the = sign in the top line:
\begin{aligned}f=&(a+b)-x^2(2e-cz) \\ &+4m+e+cz \end{aligned}
not
\begin{aligned}f=&(a+b)-x^2(2e \\ &-cz) +4m+e+cz \end{aligned}
If an equation must be broken more than once, align subsequent lines directly beneath the second line:
If the equation must be broken inside fences, indicate this by keeping all lines right-aligned within the fences:
If the left-hand side of the equation is long, indent the second line, with the carried-over operator aligned under the first operator in the top line:
\begin{aligned} (a&+b)-x^2(2e-cz)+4m \\ &= f \end{aligned}
but also consider swapping the sides:
Grouping and listing equations
When presenting a series of displayed equations without intervening text, do not add commas to the end of each one if they form a sequence:
We find that
\begin{aligned} f(x)&=(x-1)^2+(x+2)^2 \\ &=(x-1)(x-1)+(x+2)(x+2) \\ &=x^2-2x+1+x^2+4x+4 \\ &= 2x^2+2x+5 \end{aligned}
Note that these are aligned on the ‘=’ sign.
When presenting a list of equations not derived from each other, use commas:
Earlier results include
\begin{aligned} \psi_1(\theta)&=\frac{(m-1)}{p}\psi(\theta),\\ \zeta(s)&=\sum_{n=1}^\infty\frac{1}{n^s}, \\ f(u)&=\sqrt{1-c^2\phi^2(u)}. \end{aligned}
There is no need for and before the last equation, but it can be included.
When presenting many definitions of symbols, consider presenting them as a series of equations, rather than a bulleted list:
As is conventional, we define:
\(y_{i,j}=\) the observed result of using treatment \(i\) on cohort \(j\),
\(T_{i\cdot}=\) the sum of the observations for the \(i\)th treatment,
\(T_{\cdot{}j}=\) the sum of the observations for the \(j\)th cohort.
Numbering equations
Equations may be unnumbered, all numbered, or only numbered if cross-referenced. Always number sequentially. For long works, equations may be numbered by chapter. Usually, the numbers are in parentheses and right-aligned:
\begin{equation}\mathrm{~~~~~~~~~~~~~~~~} F_{hkl} = \sum_{j=1}^N f_j e^{-2\pi{}i\left(hx_i+ky_i+lz_i\right)} \mathrm{~~~~~~~~~~~~~(2)}\end{equation}
\begin{equation}\mathrm{~~~~~~~~~~~~~~~~~~~~~~~~}W = Fd\cos\theta \mathrm{~~~~~~~~~~~~~~~~~~(3.2)}\end{equation}
When presenting a sequence of equations as a block, the following options exist:
- All equations have their own numbers.
- The sequence is given a single number.
- Only the final result is numbered.
- The equations in the sequence have numbers of the form (2a), (2b) and so on.
Cite an equation in the text using a capital letter followed by the number; do not enclose the number in parentheses:
Equation 2 Equations 2–4
Refer to Equation 2.
Check the style guide of the publication you are writing for, and think about your own cross-referencing needs.