28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

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.

142 Chapter 5. Mathematical Formulas<br />

5.4.8 Framed or side-by-side formulas<br />

Displayed formulas or equations may be put in<strong>to</strong> vertical boxes of appropriate<br />

! width, that is, in a \parbox comm<strong>and</strong> or minipage environment. Within the vertical<br />

box, the formulas are horizontally centered or left justified with indentation<br />

\mathindent according <strong>to</strong> the selected document class option.<br />

Vertical boxes may be positioned relative <strong>to</strong> one another just like single<br />

characters (Sections 4.7.3 <strong>and</strong> 4.7.7). In this way the user may place displayed<br />

formulas or equations side by side.<br />

α = f (z) (5.8)<br />

β = f (z 2 ) (5.9)<br />

γ = f (z 3 ) (5.10)<br />

x = α 2 − β 2<br />

y = 2αβ<br />

The left-h<strong>and</strong> set of equations<br />

is set in a \parbox of width<br />

4 cm, the right-h<strong>and</strong> set in one<br />

of width 2.5 cm, while this text<br />

is inside a minipage of width<br />

4.5 cm.<br />

\parbox{4cm}{\begin{eqnarray} \alpha &=& f(z)...\end{eqnarray}}<br />

\hfill \parbox{2.5cm}{\begin{eqnarray*}<br />

x &=& \alphaˆ2 - \betaˆ2\\ y &=& 2\alpha\beta \end{eqnarray*}}<br />

\hfill \begin{minipage}{4.5cm} The left-h<strong>and</strong> ... \end{minipage}<br />

Vertical boxes can also be useful when equation numbers are placed in an<br />

! unconventional manner. The eqnarray environment generates an equation number<br />

for every line, which may be suppressed with \nonumber. To add a vertically<br />

centered equation number <strong>to</strong> a set of equations, for example,<br />

P(x) = a0 + a1x + a2x 2 + · · · + anx n<br />

P(−x) = a0 − a1x + a2x 2 − · · · + (−1) n anx n (5.11)<br />

the following text may be given:<br />

\parbox{10cm}{\begin{eqnarray*} ... \end{eqnarray*}} \hfill<br />

\parbox{1cm}{\begin{eqnarray}\end{eqnarray}}<br />

The actual set of equations is produced here in the eqnarray* environment,<br />

within a vertical box of width 10 cm, followed by an empty eqnarray environment<br />

in a box of width 1 cm that generates the equation number. Both boxes are<br />

vertically aligned along their center lines.<br />

Emphasizing formulas by framing requires no new construction elements. It<br />

! is sufficient <strong>to</strong> put them in<strong>to</strong> an \fbox (Section 4.7.7). Text formulas a + b<br />

are simply framed with \fbox{$a+b$}. For displayed formulas, \displaystyle<br />

(Section 5.5.2) must be issued, else they are set as text formulas.<br />

is produced with<br />

∞<br />

0<br />

f (x) dx ≈<br />

n<br />

wie xif (xi)<br />

\[\fbox{$\displaystyle \intˆ\infty_0 f(x)\,\mathrm{d}x ..$}\]<br />

An alternative method <strong>to</strong> frame displayed equations is with the A M S-L AT E X \boxed<br />

comm<strong>and</strong>, page 270.<br />

i=1

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

Saved successfully!

Ooh no, something went wrong!