28.03.2013 Views

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

Guide to LaTeX (4th Edition) (Tools and Techniques

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

562 Appendix H. Comm<strong>and</strong> Summary<br />

\newcomm<strong>and</strong>{com name}[narg][opt]{def } . . . . . . . (8.3) – 185<br />

Defines a user comm<strong>and</strong> with the name \com name <strong>to</strong> be def. The<br />

first optional argument narg ≤ 9 specifies how many variable arguments<br />

the comm<strong>and</strong> is <strong>to</strong> have, which appear in the def as the<br />

replacement characters #1 <strong>to</strong> #narg. If the second optional argument<br />

is present, the first argument of the new comm<strong>and</strong> is optional,<br />

<strong>and</strong> takes on the value opt if it is not explicitly given.<br />

\newcomm<strong>and</strong>*{com name}[narg][opt]{def } . . . . . . (D.2.6) – 445<br />

The same as \newcomm<strong>and</strong> except that the arguments <strong>to</strong> \com name<br />

must be ‘short’, not containing any new paragraphs.<br />

\newcounter{counter name}[in counter] . . . . . . . (8.1.2) – 182<br />

Establishes a new counter with the name counter name. The optional<br />

argument in counter is the name of an existing counter which, when<br />

incremented, resets the new counter <strong>to</strong> zero; that is, the new counter<br />

is a sub-counter of in counter.<br />

\newenvironment{env name}[narg][opt]{beg def }{end def }<br />

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (8.4) – 195<br />

Defines a user environment with the name env name which has the<br />

\begin definition beg def <strong>and</strong> the \end definition end def. The<br />

optional argument narg ≤ 9 specifies how many variable arguments<br />

the environment is <strong>to</strong> have, which appear in the beg def as the<br />

replacement characters #1 <strong>to</strong> #narg. If the second optional argument<br />

is present, the first argument of the \begin comm<strong>and</strong> is optional,<br />

<strong>and</strong> takes on the value opt if it is not explicitly given.<br />

\newenvironment*{env name}[narg][opt]{beg def }{end def }<br />

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . (D.2.6) – 445<br />

The same as \newenvironment except that the arguments <strong>to</strong><br />

\begin{env name} must be ‘short’, not containing any new paragraphs.<br />

\newfont{\font cmd}{\font name scaled size} . . . . . (4.1.5) – 66<br />

Establishes the relation between the font file name file name magnified<br />

by the scaling fac<strong>to</strong>r size <strong>and</strong> a font selection comm<strong>and</strong><br />

\font cmd. After \font cmd has been called, \baselineskip, the<br />

interline spacing, still has its previous value.<br />

\newlength{\length cmd} . . . . . . . . . . . . . . . . (8.2) – 185<br />

Creates a new length comm<strong>and</strong> with the name \length cmd <strong>and</strong><br />

initializes it <strong>to</strong> 0 pt. New values may be assigned as for all length<br />

comm<strong>and</strong>s with the \setlength comm<strong>and</strong>:<br />

\setlength{\length cmd}{length}<br />

The quantity length must have units (cm, pt, etc.) <strong>and</strong> may be a<br />

rubber length.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!