카테고리 없음 | Posted by 알 수 없는 사용자 2009. 3. 24. 10:35

Contents Tables and Indices

All LaTeX needs to do is harvest all the headings from your document as it processes it. Basically, all you need to do is to tell LaTeX that you actually want the TOC to appear (a bit like how you need to tell it to show the document title information with \maketitle.

All you need to do is add the following command at the point in the document where the TOC is expected to appear (somewhere inbetween the title and the content):

\tableofcontents

TOC Counter Depth

As happy as you may be with the results (especially given the relatively little effort) there are often things that one may wish to tweak, and the counter depth is perhaps the most common. By default LaTeX TOCs will display to the third level (which is subsection for the book class, or subsubsection in the article class), so we see 1.1.1 in the sample book.

To alter this, use the \setcounter command: \setcounter{tocdepth}{depth}

\setcounter{tocdepth}{1}

Other built-in tables/lists

It's often the case in academic manuscripts, such as theses and text books a List of Tables and List of Figures accompany the Table of Contents. LaTeX also provides convience commands to issue the production of such lists.

\listoffigures
\listoftables
Are all you need to type in order to have these lists automatically generated. It should be obvious, however, that these commands are looking for instances of the figure and table environments.