| Publications Department of IMPAN |
| publ@impan.pl |
| https://www.impan.pl/en/publishing-house/for-authors |
April 11, 2018
amsart style or \usepackage{amsmath} and are of two types:
align, gather, multline and alignat encironments concern the whole equations, i.e. they replace equation
(an exception: align can be used inside gather);
split, aligned, gathered and alignedat are "subsidiary environments": they can only appear inside others, like equation, align or gather, and may embrace only some part of a displayed line.
\usepackage{mathtools} or \usepackage{enumitem}.
eqnarray!
amsart style, and also in IMPAN journals), the number is normally on the first line of a multiline formula;
if the numbers are on the right, it is on the last line.
(Warning: this convention is followed by many publishers, but not all: sometimes the number is centred.)
multline:
\[
\begin{multline}\label{E:m1}
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \\
+ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \\
\leq dddddddddddddddddddddddddddddddddddddd.
\end{multline}
\]
\begin{multline}\label{E:m1}
aaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
+ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\\
\leq dddddddddddddddddddddddddd.
\end{multline}
multline to the right or to the left by making it the argument of \shoveright or \shoveleft:
\[
\begin{multline}\label{E:m2}
aaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
\shoveleft{+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb+dddddddddd}\\
\shoveright{\times eeeeeeeeeeeeeeeeeeeeeeee}\\
\leq dddddddddddddddddddddddddd.
\end{multline}
\]
\begin{multline}\label{E:m2}
aaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
\shoveleft{+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb+dddddddddd}\\
\shoveright{\times eeeeeeeeeeeeeeeeeeeeeeee}\\
\leq dddddddddddddddddddddddddd.
\end{multline}
multline, using aligned:
\[
\begin{multline}\label{E:m3}
aaaaaaaaaaaaaaaaa + xxxxxxxxxxxx\\
\begin{aligned}
&< bbbbbbbbbbbbbbbbbbbbbbb\\
&\quad + ddddddddddddddddddddddddddddddddddddd\\
&< ccccccccccccccccccc.
\end{aligned}
\end{multline}
\]
\begin{multline}\label{E:m3}
aaaaaaaaaaaaaaaaa + xxxxxxxxxxxx\\
\begin{aligned}
&< bbbbbbbbbbbbbbbbbbbbbbb\\
&\quad + ddddddddddddddddddddddddddddddddddddd\\
&< ccccccccccccccccccc.
\end{aligned}
\end{multline}
gathered:
\[
\begin{equation}\label{E:pasc}
\mathrm{Pascal}_{4} =
\begin{gathered}
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1\\
1\ 4\ 6\ 4\ 1
\end{gathered}
\end{equation}
\]
\begin{equation}\label{E:pasc}
\mathrm{Pascal}_{4} =
\begin{gathered}
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1\\
1\ 4\ 6\ 4\ 1
\end{gathered}
\end{equation}
gathered[b] (then you have to add split to centre the equation number):
\[
\begin{equation}
\begin{split}
\begin{gathered}[b]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1
\end{gathered}
\qquad
\begin{gathered}[b]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1\\
1\ 4\ 6\ 4\ 1
\end{gathered}
\end{split}
\end{equation}
\]
\begin{equation}
\begin{split}
\begin{gathered}[b]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1
\end{gathered}
\qquad
\begin{gathered}[b]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1\\
1\ 4\ 6\ 4\ 1
\end{gathered}
\end{split}
\end{equation}
gathered[t], you get top alignment:
\[
\begin{equation*}
\begin{gathered}[t]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1
\end{gathered}
\qquad
\begin{gathered}[t]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1\\
1\ 4\ 6\ 4\ 1
\end{gathered}
\end{equation*}
\]
\begin{equation*}
\begin{gathered}[t]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1
\end{gathered}
\qquad
\begin{gathered}[t]
1\\
1\ 2\ 1\\
1\ 3\ 3\ 1\\
1\ 4\ 6\ 4\ 1
\end{gathered}
\end{equation*}
aligned[t] and aligned[b] constructions enable independent and/or nested alignments, e.g.,
aligned[t] inside aligned:
\[
\begin{equation}\label{E:top}
\begin{aligned}[t]
A &= xyzt = ztuv +
\begin{aligned}[t]
[& f_1(a,b,c,d,e,f,g,h),\\
& f_2(a,b,c,d,e,f,g,h),\\
& f_3(a,b,c,d,e,f,g,h)]
\end{aligned}\\
&= cccccccccccccc
\end{aligned}
\end{equation}
\]
\begin{equation}\label{E:top}
\begin{aligned}[t]
A &= xyzt = ztuv +
\begin{aligned}[t]
[& f_1(a,b,c,d,e,f,g,h),\\
& f_2(a,b,c,d,e,f,g,h),\\
& f_3(a,b,c,d,e,f,g,h)]
\end{aligned}\\
&= cccccccccccccc
\end{aligned}
\end{equation}
aligned[b] inside aligned:
\[
\begin{equation*}
\begin{aligned}
\begin{aligned}[b]
xxxxxxx + [& f_1(a,b,c,d,e,f,g,h),\\
& f_2(a,b,c,d,e,f,g,h),\\
& f_3(a,b,c,d,e,f,g,h)]
\end{aligned}
&= tttttttttttttttttttttttttt\\
&= bbbbbbbbbbbbbb.
\end{aligned}
\end{equation*}
\]
\begin{equation*}
\begin{aligned}
\begin{aligned}[b]
xxxxxxx + [& f_1(a,b,c,d,e,f,g,h),\\
& f_2(a,b,c,d,e,f,g,h),\\
& f_3(a,b,c,d,e,f,g,h)]
\end{aligned}
&= tttttttttttttttttttttttttt\\
&= bbbbbbbbbbbbbb.
\end{aligned}
\end{equation*}
MoveEqLeft with a positive or negative parameter
(this requires \usepackage{mathtools}):
\[
\begin{equation}\label{E:shove1}
\begin{aligned}[t]
xxxxx &= yyyyyyyyyyyyyy + [eeee \\
\MoveEqLeft \hspace{12em} \times zzzzzzzzzzzzzzzzzz] \\
&= tttttttttttttttttt \\
&= vvvvvvvvvvv.
\end{aligned}
\end{equation}
\]
\begin{equation}\label{E:shove1}
\begin{aligned}[t]
xxxxx &= yyyyyyyyyyyyyy + [eeee \\
\MoveEqLeft[-10] \times zzzzzzzzzzzzzzzzzz] \\
&= tttttttttttttttttt \\
&= vvvvvvvvvvv.
\end{aligned}
\end{equation}
⚠ Warning: breaks in Mathjax
\usepackage{enumitem}; the "leftmargin" parameter has to be adjusted according to the width of the formula number):
\newcommand{\Item}{\refstepcounter{equation}\item}
\begin{enumerate}[label=(\theequation), ref=\theequation, leftmargin=2.5em]
\Item\label{E:text4} Here you can place any statement, even taking several
lines of text and including displayed formulas, like
\[
aaaa=bbb.
\]
\Item\label{E:text5} Next item.
\end{enumerate}
⚠ Warning: breaks in Mathjax
gather:
\[
\begin{gather}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy, \label{E:g1}\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n. \label{E:g2}
\end{gather}
\]
\begin{gather}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy, \label{E:g1}\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n. \label{E:g2}
\end{gather}
\quad (small space), \quad\ (medium space)
or \qquad (large space).
\notag:
\[
\begin{gather}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy, \notag\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n. \label{E:g3}
\end{gather}
\]
\begin{gather}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy, \notag\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n. \label{E:g3}
\end{gather}
gather*:
\[
\begin{gather*}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy,\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n.
\end{gather*}
\]
\begin{gather*}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy,\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n.
\end{gather*}
gather use gathered inside equation:
\[
\begin{equation}\label{E:g4}
\begin{gathered}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy,\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n.
\end{gathered}
\end{equation}
\]
\begin{equation}\label{E:g4}
\begin{gathered}
aaaaaaaaaa=b, \quad\ cc=xxx, \quad\ dd=yyy,\\
mmmmmmmmmmmmm=0 \quad\ \text{for all }i=1,\ldots,n.
\end{gathered}
\end{equation}
multlined, available in mathtools, with optional parameters indicating the placement of formula numbers and the width of the formulas:
\[
\begin{gather}
\begin{multlined}[t][10cm]
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\\
\shoveright{\times yyyyyyyyyyy}\\
=xxxxxxxxxxxxxxxxxxxxxxxxxxxx, \notag
\end{multlined}\label{E:m4}\\
\begin{multlined}[t][10cm]
cccccccccccccccccccccccccccccccccccccccc\\
=ddddddddddddddddddddddddddddddddddddddddd. \notag
\end{multlined}\label{E:m5}
\end{gather}
\]
\begin{gather}
\begin{multlined}[t][10cm]
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\\
\shoveright{\times yyyyyyyyyyy}\\
=xxxxxxxxxxxxxxxxxxxxxxxxxxxx, \notag
\end{multlined}\label{E:m4}\\
\begin{multlined}[t][10cm]
cccccccccccccccccccccccccccccccccccccccc\\
=ddddddddddddddddddddddddddddddddddddddddd. \notag
\end{multlined}\label{E:m5}
\end{gather}
align:
\[
\begin{align}
xxxxx &= yyyyyyyyyyyyyy \label{E:a1}\\
&\quad + zzzzzzzzzzzzzzzzzz, \notag\\
bbb &= tttttttttttttttttt, \label{E:a2}\\
hh &= vvvvvvvvvvv. \label{E:a3}
\end{align}
\]
\begin{align}
xxxxx &= yyyyyyyyyyyyyy \label{E:a1}\\
&\quad + zzzzzzzzzzzzzzzzzz, \notag\\
bbb &= tttttttttttttttttt, \label{E:a2}\\
hh &= vvvvvvvvvvv. \label{E:a3}
\end{align}
&), should be placed
to the left of binary relation signs; if, as above, part of an expression is continued on the next line, put &\quad before the binary operation sign.
& signs anywhere:
the parts between two & signs and between & and \\ should be "separate formulas" (in the $\TeX$ sense), so you cannot e.g. put a & inside { } or inside \left - \right.
split or aligned inside equation:
\[
\begin{equation}\label{E:a4}
\begin{split}
xxxxx &= yyyyyyyyyyyyyy\\
&\quad + zzzzzzzzzzzzzzzzzz,\\
bbb &= tttttttttttttttttt,\\
hh &= vvvvvvvvvvv.
\end{split}
\end{equation}
\]
\begin{equation}\label{E:a4}
\begin{split}
xxxxx &= yyyyyyyyyyyyyy\\
&\quad + zzzzzzzzzzzzzzzzzz,\\
bbb &= tttttttttttttttttt,\\
hh &= vvvvvvvvvvv.
\end{split}
\end{equation}
split's inside align (this is the advantage of split over aligned):
\[
\begin{align}
\begin{split}
aaaaaaaaaaaaaaaaaaaaaaa &= bbbbbbbbbbbbb,\\
bbbb &= xxxxxx,
\end{split}\label{Ea5}\\
\begin{split}
ccccc &= yyyyyyy, \phantom{bbbbl}\\
dddddddd &= zzzzz.\label{E:a6}
\end{split}
\end{align}
\]
\begin{align}
\begin{split}
aaaaaaaaaaaaaaaaaaaaaaa &= bbbbbbbbbbbbb,\\
bbbb &= xxxxxx,
\end{split}\label{Ea5}\\
\begin{split}
ccccc &= yyyyyyy,\\
dddddddd &= zzzzz.\label{E:a6}
\end{split}
\end{align}
⚠ Warning: breaks in Mathjax
If you do not want "aligned alignments", usesplit or aligned inside gather:
\[
\begin{gather}
\begin{split}
& aaaaaaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbb,\\
& bbbbbbbbbbbbbbbbbbbbbbbb = xxxxxx,
\end{split}\label{E:a7}\\
\begin{split}
& ccccc = yyyyyyy,\\
& dddddddd = zzzzz.
\end{split}\label{E:a8}
\end{gather}
\]
\begin{gather}
\begin{split}
& aaaaaaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbb,\\
& bbbbbbbbbbbbbbbbbbbbbbbb = xxxxxx,
\end{split}\label{E:a7}\\
\begin{split}
& ccccc = yyyyyyy,\\
& dddddddd = zzzzz.
\end{split}\label{E:a8}
\end{gather}
align or align*, but you have to add additional ampersands separating the columns:
\[
\begin{align*}
aa &= bbbbb, & dd &= ee & &\text{(by Lemma 2),}\\
hh &= ii, & ll &= kkkkkk & &\text{(by \eqref{E:a8}).}
\end{align*}
\]
\begin{align*}
aa &= bbbbb, & dd &= ee & &\text{(by Lemma 2),}\\
hh &= ii, & ll &= kkkkkk & &\text{(by \eqref{E:a8}).}
\end{align*}
alignat (or alignat*),
which has a parameter (the number of columns) and requires specifying the intercolumn spaces:
\[
\begin{alignat}{3}
aa &= bbbbb,\quad\ & dd &= ee & &\text{(by Lemma 2),}\label{E:a9}\\
hh &= ii, & ll &= kkkkkk\quad\ & &\text{(by \eqref{E:a8}).}\label{E:a10}
\end{alignat}
\]
\begin{alignat}{3}
aa &= bbbbb,\quad\ & dd &= ee & &\text{(by Lemma 2),}\label{E:a9}\\
hh &= ii, & ll &= kkkkkk\quad\ & &\text{(by \eqref{E:a8}).}\label{E:a10}
\end{alignat}
alignat also has a subsidiary version, alignedat, which you can put inside equation if you need one centred number:
\[
\begin{equation}\label{E:a11}
\begin{alignedat}{3}
aa &= bbbbb,\quad\ & dd &= ee & &\text{(by Lemma 2),}\\
hh &= ii, & ll &= kkkkkk\quad\ & &\text{(by \eqref{E:a8}).}
\end{alignedat}
\end{equation}
\]
\begin{equation}\label{E:a11}
\begin{alignedat}{3}
aa &= bbbbb,\quad\ & dd &= ee & &\text{(by Lemma 2),}\\
hh &= ii, & ll &= kkkkkk\quad\ & &\text{(by \eqref{E:a8}).}
\end{alignedat}
\end{equation}
subequations, inside which you can place the previous constructs, e.g., alignat inside subequations:
\[
%\begin{equation}\label{E:suba}
\begin{alignat}{3}
aa &= bbbbb,\quad\ & dd &= ee & &\text{(by Lemma 2),}\tag{2.18a}\label{E:suba1}\\
hh &= ii, & ll &= kkkkkk\quad\ & &\text{(by \eqref{E:a8}).}\tag{2.18b}\label{E:suba2}
\end{alignat}
%\end{equation}
\]
\begin{subequations}\label{E:suba}
\begin{alignat}{3}
aa &= bbbbb,\quad\ & dd &= ee & &\text{(by Lemma 2),}\label{E:suba1}\\
hh &= ii, & ll &= kkkkkk\quad\ & &\text{(by \eqref{E:a8}).}\label{E:suba2}
\end{alignat}
\end{subequations}
⚠ Warning: breaks in Mathjax
orgather inside subequations:
\[
%\begin{subequations}\label{E:subg}
\begin{gather}
\begin{split}
& aaaaaaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbb,\\
& bbbbbbbbbbbbbbbbbbbbbbbb = xxxxxx,
\end{split}\tag{2.19a}\label{E:subg1}\\
\begin{split}
& ccccc = yyyyyyy,\\
& dddddddd = zzzzz.
\end{split}\tag{2.19b}\label{E:subg2}
\end{gather}
%\end{subequations}
\]
\begin{subequations}\label{E:subg}
\begin{gather}
\begin{split}
& aaaaaaaaaaaaaaaaaaaaaaa = bbbbbbbbbbbbb,\\
& bbbbbbbbbbbbbbbbbbbbbbbb = xxxxxx,
\end{split}\label{E:subg1}\\
\begin{split}
& ccccc = yyyyyyy,\\
& dddddddd = zzzzz.
\end{split}\label{E:subg2}
\end{gather}
\end{subequations}
⚠ Warning: breaks in Mathjax
Note the independent labels of the whole group and its parts; writing\eqref{E:suba}, we invoke the whole system
\eqref{E:suba}, while writing \eqref{E:suba1} we refer to \eqref{E:suba1}.
\intertext (this only works within align or align*, but not with aligned):
\[
\begin{align}\label{E:inter}
xxxxx &= yyyyyyyyyyyyyy + [eeee \\
\MoveEqLeft \hspace{11em} \times zzzzzzzzzzzzzzzzzz] \notag
\end{align}
\]
(note that we have not used the full strength of $(H)$ here, but only the concavity of $f$)
\[
\begin{align}
&= tttttttttttttttttt \phantom{zzzzzzzzzzzzzzzzzz} \notag\\
&= vvvvvvvvvvv. \notag
\end{align}
\]
\begin{align}\label{E:inter}
xxxxx &= yyyyyyyyyyyyyy + [eeee \\
\MoveEqLeft[-10] \times zzzzzzzzzzzzzzzzzz] \notag\\
\intertext{(\emph{note that we have not used the full strength
of $(H)$ here, but only the concavity of $f$})}
&= tttttttttttttttttt \notag\\
&= vvvvvvvvvvv. \notag
\end{align}
⚠ Warning: breaks in Mathjax
[1] G. Grätzer, More Math into $\LaTeX$, 4th ed., Springer, Berlin, 2007.