Table of contents in LaTeX

Friday, May 29th, 2009
Advertisement

Subscribe.
Enter your email:

LaTeX has an ability to produce table of contents automatically for the whole document. Table of contents contain the section numbers and corresponding headings, together with the page numbers on which they begin. This article gives some introduction on generating and printing the table of content, as well as list of figures and tables in LaTeX.

Printing the table of contents

To display the table of contents, place the following command

\tableofcontents

at the location where the table of contents is to appear.

To set the depth of table of contents, use the following command.

\setcounter{tocdepth}{the number of depth}

To add additional entry to the table of contents, the commands

\addcontentsline{toc}{section name}{entry text}
\addtocontents{toc}{entry text}

may be used.

For example, to include a *-form subsection named Preface in table of contents.

\subsection*{Preface}
\addcontentsline{toc}{subsection}{Preface}

To include reference or bibliography entry in table of contents, use the following command right before the bibliography command.

\addcontentsline{toc}{section}{References}

To produce roman style page number for the table of contents and arabic style page number for the rest of the documents, use the following command.

\pagenumbering{roman} \tableofcontents \newpage \pagenumbering{arabic}
\tableofcontents

To change the title of table of contents, use the following command.

\renewcommand{\contentsname}{New table of contents title}

List of figures and tables

Besides table of contents, LaTeX can also produce list of figures and tables automatically.

The commands are

\listoffigures 	% to produce list of figures
\listoftables 	% to produce list of tables

The entries in these lists use the entries from the \caption command in the figure and table environments.

If you are new here, you might want to subscribe to the RSS feed or newsletter.

Enter your email address:

Creates the exact copy of your hard disk and allows you to instantly restore the entire machine.
New Acronis True Image Home 2010 is the most reliable and easy in use backup solution. Now with online backup option!
15% Discount Code: FMAATIH2010

What else?

Like this article? Share it

 Digg  del.icio.us  TwitThis  Facebook  Reddit  StumbleUpon

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>