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 am trying to set the depth of the table of contents.

I used

\setcounter{tocdepth}{2}

This actually works fine, almost. The table of contents is showing subsections as well, but these are not pushed forward below the dominating section names. The list of sections and subsections is aligned to the left with the same margin.

Is there a way to fix it?

share|improve this question
    
What document class are you using? –  Werner Aug 30 '12 at 2:29
    
@Werner, amsbook. –  kloop Aug 30 '12 at 2:31

1 Answer 1

up vote 3 down vote accepted

Change the values used in \@tocline for \l@subsection:

\documentclass{amsbook}

\setcounter{tocdepth}{2}
\makeatletter
\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{5pc}{}}
\makeatother

\begin{document}

\tableofcontents

\chapter{Test Chapter}
\section{Test Section}
\subsection{Test Subsection}
\end{document} 

enter image description here

The original definition in amsbook.cls is

\def\l@subsection{\@tocline{2}{0pt}{1pc}{5pc}{}}

and the syntax for \@tocline is

\@tocline{<level>}{<space above>}{<indent from left margin>}{<hang indent>}{<font attributes>}

You can adjust the values according to your needs.

share|improve this answer

Your Answer

 
discard

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.