[OS X TeX] multi lines

Maarten Sneep maarten.sneep at xs4all.nl
Wed Aug 31 22:37:29 CEST 2005


On 31 Aug 2005, at 22:17, Alain Schremmer wrote:

> William F. Adams wrote:
>
>> Have you tried:
>>
>> \begin{align*}
>> \mbox{Long line}\\
>>            &= \mbox{Line 1}\\
>>            &= \mbox{Line 2}
>> \end{align*}
>>
>
> This seems to be doing something similar to [equation,split] in  
> that the  = signs for Line 1 and Line 2 are lined up with the end  
> of Long line, as in
>
> Long line
>                = Line 1
>                = Line 2
>
> My problem, though, is that length(Long line) + length(Line 1) >  
> width(page) so that, for things to remain within the page, the =   
> of Line 1 and Line 2 have to line up with, say, about the middle of  
> Long line.

Since the & does not introduce any extra space when using the amsmath  
package (as opposed to standard LaTeX), you can use something like this:

\documentclass[a4paper,12pt]{article}

\usepackage{amsmath}

\begin{document}

\begin{equation*}
\begin{split}
     \int_a^b \biggl\{ \int_a^b &[ f(x)^2 g(y)^2 + f(y)^2 g(x)^2 ]
         -2f(x) g(x) f(y) g(y) \,dx \biggr\} \,dy \\
     &=\int_a^b \biggl\{ g(y)^2 \int_a^b f^2 + f(y)^2
         \int_a^b g^2 - 2f(y) g(y) \int_a^b fg \biggr\} \,dy \\
     &=\int_a^b \biggl\{ g(y)^2 \int_a^b f^2 + f(y)^2
         \int_a^b g^2 - 2f(y) g(y) \int_a^b fg \biggr\} \,dy
\end{split}
\end{equation*}
\end{document}

Note the extra ampersand I plunked in the middle (well the start) of  
the first line.

Maarten
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list