Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

amsmath: split within align

224 views
Skip to first unread message

Liam Healy

unread,
Nov 30, 1995, 3:00:00 AM11/30/95
to
I would like to put a split environment within an align environment.
All the documentation (e.g., LaTeX Companion Sec. 8.5.5) explicitly
say this is possible, yet all the examples show split within equation.
The problem is how to distinguish the outer ampersand from the inner
ampersand.

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

Thomas R. Scavo

unread,
Dec 1, 1995, 3:00:00 AM12/1/95
to
In article <51ybsxh...@apogee.nrl.navy.mil>,

Liam Healy <liam....@nrl.navy.mil> wrote:
>
>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.

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/

0 new messages