Next: document, Previous: description, Up: Environments [Contents][Index]
displaymath
Synopsis:
\begin{displaymath} mathematical text \end{displaymath}
Environment to typeset the math text on its own line, in display style
and centered. To make the text be flush-left use the global option
fleqn
; see Document class options.
In the displaymath
environment no equation number is added to the
math text. One way to get an equation number is to use the
equation
environment (see equation).
LaTeX will not break the math text across lines.
Note that the amsmath package has significantly more extensive displayed equation facilities. For example, there are a number of ways in that package for having math text broken across lines.
The construct \[math text\]
is essentially a synonym for
\begin{displaymath}math text\end{displaymath}
but the
latter is easier to work with in the source file; for instance,
searching for a square bracket may get false positives but the word
displaymath
will likely be unique. (The construct
$$math text$$
from Plain TeX is sometimes
mistakenly used as a synonym for displaymath
. It is not a
synonym, because the displaymath
environment checks that it isn’t
started in math mode and that it ends in math mode begun by the matching
environment start, because the displaymath
environment has
different vertical spacing, and because the displaymath
environment honors the fleqn
option.)
The output from this example is centered and alone on its line.
\begin{displaymath} \int_1^2 x^2\,dx=7/3 \end{displaymath}
Also, the integral sign is larger than the inline version
\( \int_1^2 x^2\,dx=7/3 \)
produces.