## Hypertext Help with LaTeX

### Math Formulas

There are four environments that put LaTeX in math mode:

- math (see below)
- displaymath
- eqnarray
- equation

All four of these environments are typeset in math mode, using a math italic font and LaTeX ideas about spacing in math mode. (See also math fonts and styles.)

The math environment is for formulas that appear right in the text. The displaymath, eqnarray, and equation environments are for formulas that apppear on their own line(s). The math environment can be used in both paragraph and LR mode, but displaymath, eqnarray, and equation environments can be used only in paragraph mode.

### Math environment

The math environment may be specified, as with all environments, by

\begin{math} math equation \end{math}

However, it is used so often that it has two equivalent shorter forms:

\( math equation \)

or just

$ math equation $

In LaTeX2e one can also use

\ensuremath{math equation}

For example, Subscripts and superscripts can only be used in math mode. To include these in running text one could use:

The formula for water is H$_2$O. If the hypotenuse is $c$, then $c^2=a^2+b^2$.

Note that it is standard to use math mode for letters, such as the
the `$c$` above, which are math variables.

### Related topics

- Math fonts and styles
- Subscripts and Superscripts
- Math Symbols
- Spacing in Math Mode
- Math Miscellany
- Ellipses

`\boldmath`for a bold math font`\frac`for generating built-up fractions`\stackrel`for putting things above each other`\sqrt`for square (and nth) roots

Back to the Table of Contents

Revised 31 May 1995.