LaTeX Wiki
(Created page with "An "environment" is a region of the document within which certain commands are valid, and certain processing is performed by the TeX processor. An environment begins with the {{…")
 
Line 2: Line 2:
 
===Example===
 
===Example===
 
This example shows nested environments.
 
This example shows nested environments.
  +
<div style="padding-left:1cm">
 
<code>
 
<code>
 
\begin{document}
 
\begin{document}
Line 16: Line 17:
 
\end{document}
 
\end{document}
 
</code>
 
</code>
  +
</div>
  +
 
==See also==
 
==See also==
 
* [[List of LaTeX environments]]
 
* [[List of LaTeX environments]]

Revision as of 16:35, 8 October 2010

An "environment" is a region of the document within which certain commands are valid, and certain processing is performed by the TeX processor. An environment begins with the begin command, and ends with the end command. Environments can be nested within one another; the begins and ends must match.

Example

This example shows nested environments.

\begin{document}

... document text begins here, in paragraph mode.
\begin{equation}
\begin{split}
... math commands and symbols go here, in math mode
\end{split}
\end{equation}
... document text continues here, once again in paragraph mode
\begin{align}
... math mode again ...
\end{align}

\end{document}

See also