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.

5.4. Additional elements 143<br />

5.4.9 Chemical formulas <strong>and</strong> bold face in math formulas<br />

In mathematics it is sometimes necessary <strong>to</strong> set individual characters or<br />

parts of the formula in bold face. This can be achieved simply with the<br />

math alphabet comm<strong>and</strong> \mathbf that we met in Section 5.4.2:<br />

$\mathbf{Sˆ{-1}TS = dg(\omega_1,\ldots,\omega_n) = \Lambda}$<br />

produces S −1 TS = dg(ω1, . . . , ωn) = Λ.<br />

In this example, the entire formula has been set as the argument of<br />

\mathbf so that everything should be set in bold face. In fact, only<br />

numbers, lower <strong>and</strong> upper case Latin letters, <strong>and</strong> upper case Greek letters<br />

are set in bold Roman with \mathbf. Lower case Greek letters <strong>and</strong> other<br />

math symbols appear in the normal math font.<br />

If only part of the formula is <strong>to</strong> be set in bold face, that part must be<br />

given as the argument of the \mathbf comm<strong>and</strong>.<br />

$\mathbf{2\sqrt{x}/y} = z$ 2 √ x/y = z<br />

The math font style comm<strong>and</strong> \boldmath will set all characters in<br />

bold face, with the following exceptions:<br />

• raised <strong>and</strong> lowered symbols (exponents <strong>and</strong> indices)<br />

• the characters + : ; ! ? ( ) [ ]<br />

• symbols that exist in two sizes (Section 5.3.7)<br />

The \boldmath declaration may not appear in math mode. It must<br />

be called before switching <strong>to</strong> math mode or within a parbox or minipage.<br />

The countercomm<strong>and</strong> \unboldmath resets the math fonts back <strong>to</strong> the<br />

normal ones.<br />

<br />

\boldmath \[ \oint\limits_C V<br />

V dτ = ∇ × V dσ \,\mathrm{d}\tau =\oint\limits_\Sigma<br />

\nabla\times V\,d\sigma \] \unboldmath<br />

C<br />

Σ<br />

If \boldmath has been turned on outside the math mode, it may be<br />

temporarily turned off inside with \mbox{\unboldmath$. . . $}.<br />

\boldmath\( P = \mbox{\unboldmath$m$}b\)\unboldmath<br />

yields: P = mb. Similarly, \boldmath can be temporarily turned on<br />

within math mode with the structure \mbox{\boldmath$. . . $}: Wr =<br />

M dϕ = r 2 mω 2 /2<br />

\( W_r = \int\mbox{\boldmath$M\,\mathrm{d}\varphi$} =..\)<br />

An alternative method of printing single symbols in bold face is provided<br />

by the bm package described on page 394.<br />

Chemical formulas are normally set in Roman type, not in italics as<br />

for mathematical formulas. This may be brought about by setting the<br />

formula as the argument of the font comm<strong>and</strong> \mathrm:<br />

$\mathrm{Fe_2ˆ{2+}Cr_2O_4}$ Fe 2+<br />

2 Cr2O4

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

Saved successfully!

Ooh no, something went wrong!