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.

4.4. Generalized lists 75<br />

However, the label is often required <strong>to</strong> contain a sequential numeration.<br />

For this purpose, a counter must be created with the \newcounter{name}<br />

comm<strong>and</strong>, where name is its designation. This comm<strong>and</strong> must appear<br />

before the first application of the counter in a list environment. Suppose<br />

a counter named marker has been defined for this use, then the argument<br />

stnd lbl could be any of the comm<strong>and</strong>s for printing counters described in<br />

Section 4.3.5: for example, \arabic{marker} produces a running Arabic<br />

number.<br />

Even more complex labels can be made up in this way. If the sequential<br />

labels are <strong>to</strong> be A–I, A–II, . . . , stnd lbl is set <strong>to</strong> A--\Roman{marker}.<br />

Before a counter can function properly within the st<strong>and</strong>ard label, it<br />

must be associated with that list by including in the list decl the comm<strong>and</strong><br />

\usecounter{counter}, where counter is the name of the counter <strong>to</strong> be<br />

assigned (marker in the above example).<br />

The st<strong>and</strong>ard label is actually generated by the comm<strong>and</strong> \makelabel{label},<br />

! which is called by the \item comm<strong>and</strong>. The user can redefine \makelabel with<br />

the aid of the \renewcomm<strong>and</strong> in the list declaration:<br />

\renewcomm<strong>and</strong>{\makelabel}{new definition}<br />

If the st<strong>and</strong>ard label is defined in this manner, the corresponding entry in the<br />

list environment is left blank. This is because \makelabel is the more general<br />

comm<strong>and</strong> <strong>and</strong> overrides the other definition.<br />

4.4.2 List style parameters<br />

There are a number of style parameters used for formatting lists that<br />

are set by L AT E X <strong>to</strong> certain st<strong>and</strong>ard values. These values may be altered<br />

by the user in the list decl for that particular list. The assignment is<br />

made in the usual way with the \setlength comm<strong>and</strong>. However, if the<br />

assignment is made outside the list environment, in most cases it will<br />

simply be ignored. This is because there are preset default values for<br />

each parameter at each level that can only be overridden by list decl.<br />

The style parameters are listed below <strong>and</strong> are also illustrated in Figure<br />

4.1 on the next page, which is based on one taken from Lamport (1985,<br />

1994).<br />

\<strong>to</strong>psep<br />

is the vertical spacing in addition <strong>to</strong> \parskip that is inserted<br />

between the list <strong>and</strong> the enclosing text above <strong>and</strong> below. Its<br />

default value is set at each list level <strong>and</strong> cannot be globally<br />

redefined outside the list decl.<br />

\par<strong>to</strong>psep<br />

is the vertical spacing in addition <strong>to</strong> \<strong>to</strong>psep + \parskip that<br />

is inserted above <strong>and</strong> below the list when a blank line precedes<br />

the first or follows the last \item entry. It may be redefined<br />

globally, but only for the first <strong>and</strong> second levels.

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

Saved successfully!

Ooh no, something went wrong!