Difference between (split, align) and (gather, aligned)?
For the example alignment the following are equivalent; actually, the correct outer environment to use is equation
, as the following code will show; using split
or aligned
for the inner environment in this case doesn't matter.
\documentclass{article}
\usepackage{amsmath,lipsum,geometry}
\geometry{margin=1cm}
\begin{document}
%\thispagestyle{empty}
\lipsum*[2]
%==================
% equation+aligned
\begin{equation}\tag{EA}
\begin{aligned}
x &= a + b\\
y &= c+ d
\end{aligned}
\end{equation}
\lipsum*[2]
%==================
% equation+split
\begin{equation}\tag{ES}
\begin{split}
x &= a + b\\
y &= c+ d
\end{split}
\end{equation}
\lipsum*[2]
%==================
% gather+aligned
\begin{gather}\tag{GA}
\begin{aligned}
x &= a + b\\
y &= c+ d
\end{aligned}
\end{gather}
\lipsum*[2]
%==================
% gather+split
\begin{gather}\tag{GS}
\begin{split}
x &= a + b\\
y &= c+ d
\end{split}
\end{gather}
\lipsum*[2]
%==================
% align+split
\begin{align}\tag{AS}
\begin{split}
x &= a + b\\
y &= c+ d
\end{split}
\end{align}
\lipsum*[2]
%==================
% align+aligned
\begin{align}\tag{AA}
\begin{aligned}
x &= a + b\\
y &= c+ d
\end{aligned}
\end{align}
\lipsum*[2]
\end{document}
In the output it's possible to see that the correct spacing is obtained with equation
. Use align
or gather
only when there is really more than one equation to number.
One should also note that "equation+split" results in a different vertical spacing than "equation+aligned" (which isn't really expected).
split
can still work with narrow spaces while aligned
cannot!
\documentclass{article}
\usepackage[a6paper,margin=1cm,showframe]{geometry}
\usepackage{pst-node,multido}
\usepackage{amsmath}
\begin{document}
\multido{\n=0.5+0.1}{4}{%
\endgraf\noindent\pnode(.5\linewidth,0){T}
%
\begin{equation*}\!
\begin{aligned}
\framebox[\n\linewidth]{aligned \n}
\end{aligned}\tag*{Def}
\end{equation*}
%
\begin{equation*}
\begin{split}
\framebox[\n\linewidth]{split \n}
\end{split}\tag*{Def}
\end{equation*}
%
\endgraf\noindent\pnode(.5\linewidth,0){B}
\psset{linecolor=blue}
\ncline{T}{B}
\pcline[nodesep=-\dimexpr\n\linewidth/2](B)(B)}
\end{document}