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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

18 Chapter 2. Text, Symbols, <strong>and</strong> Comm<strong>and</strong>s<br />

Comm<strong>and</strong> names are case sensitive, so \large, \Large <strong>and</strong> \LARGE<br />

are distinct comm<strong>and</strong>s.<br />

Many comm<strong>and</strong>s operate on some short piece of text, which then<br />

appears as an argument in curly braces following the comm<strong>and</strong> name.<br />

For example, \emph{stress} is given <strong>to</strong> print the word stress in an<br />

emphasized typeface (here italic) as stress. Such arguments are said <strong>to</strong> be<br />

m<strong>and</strong>a<strong>to</strong>ry because they must always be given.<br />

Some comm<strong>and</strong>s take optional arguments, which are normally employed<br />

<strong>to</strong> modify the effects of the comm<strong>and</strong> somehow. The optional<br />

arguments appear in square braces.<br />

In this book we present the general syntax of comm<strong>and</strong>s as<br />

\name[optional]{m<strong>and</strong>a<strong>to</strong>ry}<br />

where typewriter characters must be typed exactly as illustrated <strong>and</strong><br />

italic text indicates something that must be substituted for. Optional<br />

arguments are put in<strong>to</strong> square brackets [ ] <strong>and</strong> the m<strong>and</strong>a<strong>to</strong>ry ones in<strong>to</strong><br />

curly braces { }. A comm<strong>and</strong> may have several optional arguments, each<br />

one in its set of brackets in the specified sequence. If none of the optional<br />

arguments is used, the square brackets may be omitted. Any number of<br />

blanks, or even a single new line, may appear between the comm<strong>and</strong> name<br />

<strong>and</strong> the arguments, <strong>to</strong> improve legibility.<br />

Some comm<strong>and</strong>s have several m<strong>and</strong>a<strong>to</strong>ry arguments. Each one must<br />

be put in<strong>to</strong> a { } pair <strong>and</strong> their sequence must be maintained as given in<br />

the comm<strong>and</strong> description. For example,<br />

\rule[lift]{width}{height}<br />

produces a black rectangle of size width <strong>and</strong> height, raised by an amount<br />

lift above the current baseline. A rectangle of width 10 mm <strong>and</strong> height<br />

3 mm is made with \rule{10mm}{3mm}. Since the optional argument lift<br />

is omitted, the rectangle is set on the baseline with no lifting, as .<br />

The arguments must appear in the order specified by the syntax <strong>and</strong> may<br />

not be interchanged.<br />

Some comm<strong>and</strong>s have a so-called *-form in addition <strong>to</strong> their normal<br />

appearance. A * is added <strong>to</strong> their name <strong>to</strong> modify their functionality<br />

somehow. For example, the \section comm<strong>and</strong> has a *-form \section*<br />

which, unlike the regular form, does not print an au<strong>to</strong>matic section number.<br />

For each such comm<strong>and</strong>, the difference between the normal <strong>and</strong><br />

*-form will be explained in the description of the individual comm<strong>and</strong>s.<br />

Comm<strong>and</strong> names consist only of letters, with the first non-letter indicating<br />

the end of the name. If there are optional or m<strong>and</strong>a<strong>to</strong>ry arguments<br />

following the comm<strong>and</strong> name, then it ends before the [ or { bracket,<br />

since these characters are not letters. Many comm<strong>and</strong>s, however, possess<br />

no arguments <strong>and</strong> are composed of only a name, such as the comm<strong>and</strong><br />

\<strong>LaTeX</strong> <strong>to</strong> produce the L AT E X logo. If such a comm<strong>and</strong> is followed by

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

Saved successfully!

Ooh no, something went wrong!