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.

4.3. Lists 73<br />

label. For the enumerate environment, this means that the corresponding<br />

counter is not au<strong>to</strong>matically incremented <strong>and</strong> the user must do the<br />

numbering manually.<br />

The optional label appears right justified within the area reserved for<br />

the label. The width of this area is the amount of indentation at that level<br />

less the separation between label <strong>and</strong> text; this means that the left edge<br />

of the label area is flush with the left margin of the enclosing level.<br />

It is also possible <strong>to</strong> change the st<strong>and</strong>ard labels for all or part of the<br />

document. The labels are generated with the internal comm<strong>and</strong>s<br />

\labelitemi , \labelitemii , \labelitemiii , \labelitemiv<br />

\labelenumi , \labelenumii , \labelenumiii , \labelenumiv<br />

The endings i, ii, iii, <strong>and</strong> iv refer <strong>to</strong> the four possible levels.<br />

These comm<strong>and</strong>s may be altered with \renewcomm<strong>and</strong>. For example,<br />

<strong>to</strong> change the label of the third level of the itemize environment from ∗<br />

<strong>to</strong> +, give<br />

\renewcomm<strong>and</strong>{\labelitemiii}{+}<br />

Similarly the st<strong>and</strong>ard labels for the enumerate environment may be<br />

changed. However, here there is an additional complication that there<br />

is a counter for each enumerate level, named enumi, enumii, enumiii,<br />

<strong>and</strong> enumiv. As explained in Section 8.1.4, the value of a counter can be<br />

printed using one of the comm<strong>and</strong>s \arabic, \roman, \Roman, \alph,<br />

or \Alph, where the style of each comm<strong>and</strong> should be obvious from its<br />

name. That is, \Roman{xyz} prints the current value of the counter xyz<br />

in upper case Roman numerals, whereas \alph{xyz} prints it as a lower<br />

case letter (with a corresponding <strong>to</strong> 1 <strong>and</strong> z <strong>to</strong> 26).<br />

These counters, <strong>to</strong>gether with the counter style comm<strong>and</strong>s, must be<br />

used in the redefinitions of the label comm<strong>and</strong>s. For example, <strong>to</strong> change<br />

the second-level label <strong>to</strong> Arabic numerals followed by ‘.)’, it is necessary<br />

<strong>to</strong> give<br />

\renewcomm<strong>and</strong>{\labelenumii}{\arabic{enumii}.)}<br />

which redefines \labelenumii <strong>to</strong> the value of counter enumii printed in<br />

Arabic, plus the characters ‘.)’. In this way, all the numbering levels may<br />

be changed. It is even possible <strong>to</strong> include more than one counter:<br />

\renewcomm<strong>and</strong>{\labelenumii}{\Alph{enumi}.\arabic{enumii}}<br />

which will produce for every call <strong>to</strong> \item at level two the value of the<br />

counter enumi as a capital letter followed by the value of counter enumii<br />

as a number: that is, in the form A.1, A.2, . . . , B.1, B.2, . . . <strong>and</strong> so on.<br />

If the new st<strong>and</strong>ard labels are <strong>to</strong> apply <strong>to</strong> the whole document, the<br />

redefining comm<strong>and</strong>s should be included in the preamble. Otherwise,<br />

they are valid only within the environment in which they appear.

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

Saved successfully!

Ooh no, something went wrong!