Tag Archive for latex book section subsection numbering table of contents

Numbering subsections in the latex book class

TIPPINST – Sometimes there may be a requirement to have the subsections in a book class document have an associated numbe beside them e.g. 2.1.1.1. There is no need to edit the associated .cls files etc instead the following command allows you to set the depth of your numbering
\setcounter{secnumdepth}{3}
A depth of 3 includes subsections.
If you require the table of contents to list as far as sections only then use the following:
\setcounter{tocdepth}{2}
Both commands should be entered at the top of the document before the section \begin{document}