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 used AMS LaTeX template with gsm-l package to write my teacher's book.

The table of content that produced has the following form:

enter image description here

in which 1, 2, 3.... are sections and 3.1, 3.2, 4.1, 4.2,.... are the subsection.

I want to indent the subsection with respect to the section, like this (it's ok without dots, though):

enter image description here

share|improve this question
    
For the future, it's best if you can provide a complete MWE as part of your question –  cmhughes May 15 at 17:24

1 Answer 1

up vote 5 down vote accepted

The class gsm-l is based on amsbook and subsection entries in the ToC are typeset according to \l@subsection from amsbook with definition:

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

The third mandatory argument for \@tocline controls the indent for the entries; change 1pt to 2.5pc (or to the value that suits your needs):

\documentclass{gsm-l}

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

\begin{document}

\tableofcontents
\chapter{Test chapter}
\section{Test section}
\subsection{Test subsection}
\subsection{Test subsection}
\section{Test section}
\subsection{Test subsection}
\subsection{Test subsection}

\end{document}

enter image description here

Perhaps you might also want to change the fourth argument (controlling the hanging indentation for entries spanning more than one line), so perhaps

\def\l@subsection{\@tocline{2}{0pt}{2.5pc}{4pc}{}}

could also be a sensible redefinition.

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.