Suppose I want
z + a = b
= d
z + a + e =f
i.e., I want the plus signs after each z aligned, and the first two equal
signs aligned. This is what comes to mind:
\begin{align}
\begin{split}
z &+ a &= b \\
&= d
\end{split} \\
z &+ a + e = f
\end{align}
but the first `&' in the split is not for the split but for the align.
Of course this gets an error. So: how to do it?
Thanks for the advice.
--
Liam Healy
Liam....@nrl.navy.mil
Unfortunately, the most natural approach to this problem doesn't
work:
\documentclass[]{article}
\usepackage[]{amsmath}
\begin{document}
% bugged: equation numbers missing or misplaced;
% tiny bit of whitespace before aligned:
\begin{align}
\begin{aligned}
z + a &= b \\
&= d
\end{aligned} \\
z + a + e = f
\end{align}
% bugged: equation number misplaced;
% tiny bit of whitespace before aligned:
\begin{align}
\begin{aligned}
z + a &= b \\
&= d
\end{aligned} \\
\begin{aligned}
z + a + e = f
\end{aligned}
\end{align}
% bugged: generates "extra &" error:
\begin{alignat}{1}
\begin{aligned}
z + a &= b \\
&= d
\end{aligned} \\
z + a + e = f
\end{alignat}
% works fine (equations centered):
\begin{gather}
\begin{aligned}
z + a &= b \\
&= d
\end{aligned} \\
z + a + e = f
\end{gather}
% works fine (one equation number):
\begin{equation}
\begin{array}{l}
\begin{aligned}
z + a &= b \\
&= d
\end{aligned} \\
\begin{aligned}
z + a + e = f
\end{aligned}
\end{array}
\end{equation}
% works fine:
\begin{eqnarray}
&&
\begin{aligned}
z + a &= b \\
&= d
\end{aligned} \\
&&
\begin{aligned}
z + a + e = f
\end{aligned}
\end{eqnarray}
\end{document}
Hope that helps,
--
Tom Scavo
mailto:trs...@syr.edu
http://web.syr.edu/~trscavo/