Alan Munn amunn at gmx.com
Wed May 19 18:22:44 CEST 2010

On May 19, 2010, at 4:24 AM, Ferguson, Don wrote:

> Greetings  "Alan Munn" <amunn at gmx.com>
> On 18/05/2010 at 11:10 you wrote concerning
>
> Hello Alan,
>
> AM>> I am using \documentclass{amsbook} and within it want a table of
> AM>> contents. The current setup includes:
> AM>>
> AM>> 'chapter' and 'sections'. Would like entries for 'subsections'
> and
> AM>> 'subsubsections' as well. Since I have read documents which do
> have
> specify.
> AM>>
> AM>> So far any docs I've read say nothing about how to include
> AM>> 'subsections' and 'subsubsections'. Where should I be looking and
> AM>> how is it done?
>
>
> AM> The amsbook class is designed to meet the requirements of the
> AMS, and
> AM> isn't designed to be customised.  I would recommend that you use a
> AM> more general book class such as memoir for your project.
>
> Interesting! Memoir? Okay, I'll try it!
>
>
> AM> That being said, you could add the following to your document
> preamble
>
> AM> \setcounter{tocdepth}{4} %
> AM> \makeatletter
> AM> \expandafter\def\csname r at tocindent4\endcsname{0pt}
> AM> \makeatother
>
> Setting tocdepth to 4 with {amsbook} had no effect for me.

I don't know what this means.  By itself, it won't do anything. It's
true that for your purposes, setting it to 3 or 4 won't make a
difference.  (Setting it to 4 will allow \paragraph{} to be included

> However, the part
>
> r at tocindent4
>
> rang a bell.

I'm not sure what this means either.

> On setting tocdepth to 3, I was getting the error message:
>
> ---------
> ./Mechanics.tex:593: Missing number, treated as zero.
>                  \r at tocindent4
> l.593  F
>        or any vectors $\mathbf{a,b,x}$:
> -----------
>
> I could find no error in the text that supposedly lodged the
> complaint.
>

This isn't caused by the code I gave you, but by something else in
your document. The following minimal document compiles and does
exactly what you requested, so there's something else going on in your
document:

\documentclass{amsbook}
\setcounter{tocdepth}{3} %
\makeatletter
\expandafter\def\csname r at tocindent4\endcsname{0pt}
\makeatother
\begin{document}
\tableofcontents
\chapter{A chapter}
\section{A section}
\subsection{A subsection }
\subsubsection{A subsubsection}

\end{document}

Alan

--
Alan Munn
amunn at gmx.com