Home > LaTeX > LaTeX – customizing the depth of the table of contents for different parts of document

LaTeX – customizing the depth of the table of contents for different parts of document

You can set the general depth of the contents listing using:

\setcounter{tocdepth}{n} where n is the level, starting with 0 (chapters only)

in the preamble (i.e. before \begin{document}. This will work for the whole document.

If you want to have the appendixes listed only as chapters you can use the package tocvsec2 which allows you to change the depth level in different parts of the document. You can set the level up to sections in one part with:

\settocdepth{chapter}

and later set it to sections or subsections. The level will remain the way you set it until the next \settocdepth command. Be shure not to have a line \renewcommand{\tableofcontents} right before the \settocdepth.

Advertisements
Categories: LaTeX
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s