12.07.2015 Views

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

The memoir class - The UK TeX Archive

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.

9. CONTENTS LISTSTable 9.1: Indents and Numwidths (in ems)Entry Level Standard <strong>memoir</strong> <strong>class</strong>indent numwidth indent numwidthbook -2 — — 0 —part -1 0 — 0 1.5chapter 0 0 1.5 0 1.5section 1 1.5 2.3 1.5 2.3subsection 2 3.8 3.2 3.8 3.2subsubsection 3 7.0 4.1 7.0 4.1paragraph 4 10.0 5.0 10.0 5.0subparagraph 5 12.0 6.0 12.0 6.0figure/table (1) 1.5 2.3 0 1.5subfigure/table (2) — — 1.5 2.3Each \l@kind macro is responsible for setting the general indent from the lefthand margin,and the numwidth. <strong>The</strong> \numberline macro is responsible for typesetting the numberflushleft in a box of width numwidth. If the number is too long for the box then it will protrudeinto the title text. <strong>The</strong> title text is indented by (indent + numwidth) from the lefthandmargin. That is, the title text is typeset in a block of width(\linewidth - indent - numwidth - \@tocrmarg).Table 9.1 lists the standard values for the indent and numwidth. <strong>The</strong>re is no explicitnumwidth for a part; instead a gap of 1em is put between the number and the title text. Notethat for a sectioning command the values depend on whether or not the document <strong>class</strong>provides the \chapter command; the listed values are for the book and report <strong>class</strong>es — inthe article <strong>class</strong> a \section is treated like a \chapter, and so on. Also, which somewhatsurprises me, the table and figure entries are all indented.\@dottedtocline{〈level〉}{〈indent〉}{〈numwidth〉}Most of the \l@kind commands are defined in terms of the \@dottedtocline command.This command takes three arguments: the 〈level〉 argument is the level as shown in Table9.1, and 〈indent〉 and 〈numwidth〉 are the indent and numwidth as illustrated in Figure 9.2.For example, one definition of the \l@section command is:\newcommand*{\l@section}{\@dottedtocline{1}{1.5em}{2.3em}}If it is necessary to change the default typesetting of the entries, then it is usually necessaryto change these definitions, but <strong>memoir</strong> gives you handles to easily alter things withouthaving to know the La<strong>TeX</strong> internals.You can use the \addcontentsline command to add \contentsline commands toa file.\addtocontents{〈file〉}{〈text〉}La<strong>TeX</strong> also provides the \addtocontents command that will insert 〈text〉 into 〈file〉. Youcan use this for adding extra text and/or macros into the file, for processing when the file istypeset by \tableofcontents (or whatever other command is used for 〈file〉 processing,such as \listoftables for a lot file).144

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

Saved successfully!

Ooh no, something went wrong!