There are four environments that put LaTeX in math mode:
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.
\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.
Back to the Table of Contents