# Excluding chapters from ToC in amsbook

I'm writing a book using the amsbook class, and I've included a page for acknowledgements using \chapter*{}, thinking it wouldn't show up in the ToC.

However, it does (and for some reason it's supposed to do so, according to the amsbook manual); so the question is, how do I get rid of it from the ToC?

-
As for the reason amsbook (and other ams classes) do this: The intended use of this class is a technical volume. The prototypical use of a starred chapter in a technical volume is an executive summary. The executive summary goes in the table of contents. – David Hammen Jun 12 '11 at 16:51

The amsmath FAQ has a solution. Here's a modification of it, in a complete example:

\documentclass{amsbook}
\DeclareRobustCommand{\gobblefour}[4]{}
\begin{document}
\tableofcontents
\SkipTocEntry\chapter*{Hidden chapter}
\chapter{Shown chapter}
\end{document}


Just place \SkipTocEntry before a TOC entry you would like to hide.

If you use hyperref, take one argument more:

\DeclareRobustCommand{\gobblefive}[5]{}

-
Many thanks, works like a charm! – Anto Jun 12 '11 at 17:03
@Stefan Kottwitz: Also works for chapters without *, this is great! – bkarpuz Mar 25 '13 at 8:27

You can change the value of the tocdepth counter just before the particular sectional unit which must not show in the ToC and then restore the original value:

\documentclass{amsbook}

\begin{document}
\tableofcontents
\chapter*{Preface}

\end{document}

-

Renewal of \addtocontents to gobble it's arguments can also be used to remove its entry into the ToC:

\documentclass{amsbook}
\begin{document}
\tableofcontents

Localization of the \renewcommand allows for it to work only within the group.