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
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
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}