Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using a \documentclass[11pt]{book} document.

I have tried to define a TOC with a maximum depth of 4 with:


The resulting pdf document doesn't take into account my setting and goes to the deepest level in my TOC.

I have not see anything relevant in the console, but I'm really a novice in LaTeX.

share|improve this question
Welcome to TeX.SX! You are telling LaTeX to number sectional units introduced by \chapter (level 0), \section (level 1), \subsection (2), \subsubsection (3) and \paragraph (4), including them in the table of contents, which is produced by \tableofcontents and not by \makeindex. Please, try adding a minimal working example (MWE) that illustrates your problem. –  egreg Jun 24 '12 at 13:15
Well perhaps 4 is your deepest level (4 goes down to \paragraph). Try what happens if you use 0. If this doesn't change the toc then you probably reset the value somewhere else in your document. –  Ulrike Fischer Jun 24 '12 at 13:16
@UlrikeFisher You are right, I was misunderstanding TOC levels. A 0 level means my \chapter level was included in TOC, so for a depth of 4 like I need to set the depth to 3. –  David Casillas Jun 24 '12 at 13:35
add comment

1 Answer

up vote 14 down vote accepted

The sectional levels are numbered starting from 0:

\chapter is level 0
\section is level 1
\subsection is level 2
\subsubsection is level 3
\paragraph is level 4
\subparagraph is level 5

If you want to number up to four levels, you need to set


The independent counter for the inclusion in the table of contents is tocdepth and respects the same values.

The complete truth is that there is also a level –1, which corresponds to \part. So for no numbering whatsoever, use \setcounter{secnumdepth}{-2} or a lower value.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.