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.

8<br />

User Cus<strong>to</strong>mizations<br />

L AT E X allows the user <strong>to</strong> define his or her own comm<strong>and</strong>s <strong>and</strong> environments.<br />

However, since these make extensive use of the L AT E X counters <strong>and</strong> lengths,<br />

we will first present a more detailed discussion of these objects <strong>and</strong> how<br />

they may be manipulated.<br />

8.1 Counters<br />

8.1.1 L AT E X counters<br />

L AT E X manages a number of counters by giving them initial values at the<br />

start <strong>and</strong> by changing these values when certain comm<strong>and</strong>s are called.<br />

Most of these counters have the same name as the comm<strong>and</strong>s that alter<br />

them:<br />

part chapter paragraph figure enumi<br />

section subparagraph table enumii<br />

subsection page footnote enumiii<br />

subsubsection equation mpfootnote enumiv<br />

The meanings of most of these counters are obvious from their names<br />

<strong>and</strong> need no further explanation. The counters enumi . . . enumiv refer <strong>to</strong><br />

the four levels of the enumerate environment (Sections 4.3.4 <strong>and</strong> 4.3.5),<br />

while the counter mpfootnote controls the footnote numbering within<br />

the minipage environment (Section 4.10.4).<br />

The value of a counter is an integer number, usually non-negative. A<br />

comm<strong>and</strong> may output several numbers at once: the current \subsection<br />

comm<strong>and</strong> outputs 8.1.1, which addresses three counters in all. For example,<br />

the \subsection comm<strong>and</strong> increments the value of the subsection<br />

counter by one, <strong>and</strong> prints the values of the chapter, section, <strong>and</strong><br />

subsection counters, separated by periods. At the same time, this comm<strong>and</strong><br />

sets the subsubsection counter <strong>to</strong> zero.<br />

181

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

Saved successfully!

Ooh no, something went wrong!