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

align inside gather - does not center properly (AMSMATH/LaTeX)

757 views
Skip to first unread message

porky_...@my-deja.com

unread,
Dec 29, 2004, 11:00:50 PM12/29/04
to
I'm reading 'Math into LaTeX' by Gratzer (3rd edition), and in section
5.6.2 which discusses Split, there is an example of split (and align)
inside a gather environment:
\begin{gather}\label{E:mm10}
\begin{split}
f &= (x_{1} x_{2} x_{3} x_{4} x_{5} x_{6})^{2}\\
&= (x_{1} x_{2} x_{3} x_{4} x_{5}
+ x_{1} x_{3} x_{4} x_{5} x_{6}
+ x_{1} x_{2} x_{4} x_{5} x_{6}
+ x_{1} x_{2} x_{3} x_{5} x_{6})^{2}\\
&= (x_{1} x_{2} x_{3} x_{4}
+ x_{1} x_{2} x_{3} x_{5}
+ x_{1} x_{2} x_{4} x_{5}
+ x_{1} x_{3} x_{4} x_{5})^{2}
\end{split}\\
\begin{align*}
g &= y_{1} y_{2} y_{3}\\
h &= z_{1}^{2} z_{2}^{2} z_{3}^{2} z_{4}^{2}
\end{align*}
\end{gather}

In a book, everything is typeset just fine and perfectly centered.
However I just can't get the same result. 'Split' part comes out fine,
but 'align' part comes out shifted to the right. Now idea what's going
on. Can anyone shed the light?

I'm using MikTeX which I've downloaded sometime early September 2004,
runing on Windows XP. I run 'latex', then 'dvips', and look at the
result with GSView 4.6.
I've tried to run this example in both 'article' and 'book' latex
environments, each time with the same result.

TIA.

(Sorry, example is nicely indented, but somehow when I post it from
Google, all indentation disappears. Boo hoo)

Christian Auner

unread,
Dec 30, 2004, 2:17:17 AM12/30/04
to
On 29 Dec 2004 20:00:50 -0800, "porky_...@my-deja.com"
<porky_...@my-deja.com> wrote:


>In a book, everything is typeset just fine and perfectly centered.
>However I just can't get the same result. 'Split' part comes out fine,
>but 'align' part comes out shifted to the right. Now idea what's going
>on. Can anyone shed the light?

Use aligned instead of align.

Chris

porky_...@my-deja.com

unread,
Dec 30, 2004, 3:26:21 PM12/30/04
to

Thanks, that worked fine. I probably will be contacting the author of
this book to find out what is the story. Either the statement he
provided as an example wasn't the one he used to typeset, or something
else is wrong.

Thanks again.

Christian Auner

unread,
Dec 30, 2004, 6:16:46 PM12/30/04
to
On 30 Dec 2004 12:26:21 -0800, "porky_...@my-deja.com"
<porky_...@my-deja.com> wrote:


>Thanks, that worked fine. I probably will be contacting the author of
>this book to find out what is the story. Either the statement he
>provided as an example wasn't the one he used to typeset, or something
>else is wrong.
>
>Thanks again.

You're welcome.

A very good reference is the amsmath documentation. If your install of
MikTeX is complete you already have it. Just open a shell and type
"texdoc amsldoc" to view it. Another very good reference is "Math
mode" written by Herbert Voss, you can find it here:
http://www.perce.de/LaTeX/math/Mathmode.pdf. It covers the amsmath
package in great detail, has a large number of examples and is typeset
nicely!

Chris

0 new messages