1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<html>
<head><title>\newenvironment</title></head>
<body>
<h1>\newenvironment</h1>
<P>
</P>
<PRE>
\newenvironment{nam}[args]{begdef}{enddef}
\newenvironment{nam}[args][default]{begdef}{enddef}
\renewenvironment{nam}[args]{begdef}{enddef}
</PRE>
<P>
These commands define or redefine an environment.
</P>
<DL COMPACT>
<DT><CODE>nam</CODE>
<DD>
The name of the environment. For <CODE>\newenvironment</CODE> there must be
no currently defined environment by that name, and the command
<CODE>\nam</CODE> must be undefined. For <CODE>\renewenvironment</CODE> the
environment must already be defined.
<DT><CODE>args</CODE>
<DD>
An integer from 1 to 9 denoting the number of arguments of
the newly-defined environment. The default is no arguments.
<DT><CODE>default</CODE>
<DD>
If this is specified, the first argument is optional, and <CODE>default</CODE>
gives the default value for that argument.
<DT><CODE>begdef</CODE>
<DD>
The text substituted for every occurrence of <CODE>\begin{nam}</CODE>; a
parameter of the form <CODE>#n</CODE> in <CODE>cmd</CODE> is replaced by the text of
the nth argument when this substitution takes place.
<DT><CODE>enddef</CODE>
<DD>
The text substituted for every occurrence of <CODE>\end{nam}</CODE>. It may
not contain any argument parameters.
</DL>
<p>--><a href="index.html">LaTeX index</a>
</body>
</html>
|