Page Layout ⇒ Table of contents : different depth for different sections
Table of contents : different depth for different sections
I would like my toc to display different subsection depth for different sections, how can I do that?
Or, is there a way to do the table of contents by hand rather than with \tableofcontents ?
Thank you
ET
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Table of contents : different depth for different sections
I don't really understand what you mean. Do you want all subsection entries in one section to have different indentations than all subsection entries in another section? Or do you want all subsection entries with one indentation and all section entries with another?
Re: Table of contents : different depth for different sections
For section 1, I want to see the section, subsections and subsubsections.
For section 2, I want to see only the section and subsections, not the subsubsections.
Table of contents : different depth for different sections
Code: Select all
\documentclass[english]{article}
\usepackage{babel}
\usepackage{blindtext}
\begin{document}
\tableofcontents
\addtocontents{toc}{\setcounter{tocdepth}{3}}
\Blinddocument
\addtocontents{toc}{\setcounter{tocdepth}{2}}
\Blinddocument
\end{document}