08.05.2014 Views

LATEX and WinEdt for MA4053

LATEX and WinEdt for MA4053

LATEX and WinEdt for MA4053

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

a_2 &= b_2+c_2-d_2+e_2<br />

\end{align}<br />

produces<br />

a 1 = b 1 + c 1 (4.4)<br />

a 2 = b 2 + c 2 − d 2 + e 2 (4.5)<br />

In fact you can have (almost) any odd number of & symbols in an align<br />

environment. The odd numbered ones indicate alignment points, <strong>and</strong> the<br />

even ones separate the columns. So<br />

\begin{align*}<br />

a_{11} &= b_{11} & a_{12} &= b_{12}\\<br />

a_{21} &= b_{21} & a_{22} &= b_{22}+c_{22}<br />

\end{align*}<br />

produces<br />

a 11 = b 11 a 12 = b 12<br />

a 21 = b 21 a 22 = b 22 + c 22<br />

If you have a number of equations or expressions to display over more<br />

than one line, but do not need to align them then there are the gather <strong>and</strong><br />

gather* environments. Once more \\ give the line breaks, but should be no<br />

&s present. For example<br />

\begin{gather}<br />

a_1 = b_1+c_1\\<br />

a_2 = b_2+c_2-d_2+e_2 \notag<br />

\end{gather}<br />

produces<br />

a 1 = b 1 + c 1 (4.6)<br />

a 2 = b 2 + c 2 − d 2 + e 2<br />

All of these environments produce output that stretches across the width<br />

of the page. If you need to create a block that is as wide as the text it<br />

produces in order to insert it within further displayed material then there<br />

are the environments aligned <strong>and</strong> gathered. For example<br />

{ }<br />

−1 if n is odd<br />

cos nπ =<br />

= (−1) n<br />

+1 if n is even<br />

is produced by<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!