Hi all,
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
Page Layout ⇒ Table of contents : different depth for different sections
Re: Table of contents : different depth for different sections
Hi,
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?
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
What I want is the following :
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.
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
For this you have to redefine the tocdepth counter inside the toc file:
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}
Re: Table of contents : different depth for different sections
if you are using memoir you can use cfthooks and cftcode, they are build for this kind of stuff, see the memoir manual for syntax