I want to suppress the page numbers of chapters in the TOC of my document. A wme:



{ \huge \bfseries A title}


\chapter{First chapter}
\section{First section of first chapter}
Some blah, blah...
\section{Second section of first chapter}
Some more blah, blah...
\section{Third section of first chapter}
Some more blah, blah...


In the TOC the same page number, for the chapter and the sections, is repeated. This is the reason I want to avoid the page number for chapters. I have tried the ideas here: Omitting only the page number of chapter's heading in ToC but without luck. Also, the tocloft package seems not to work with the amsbook class. Any further idea?


1 Answer 1


It seems that amsbook is incompatible with tocloft so there's no easy way out. However let's try add this hack to the preamble (Edited based on Jubobs' suggestion):

  \ifnum #1>\c@tocdepth % then omit
    \par \addpenalty\@secpenalty\addvspace{#2}%
        \begingroup \hyphenpenalty\@M
      \@tempdima\csname r@tocindent\number#1\endcsname\relax
    \parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax
    \rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth
    #5\leavevmode\hskip-\@tempdima #6\nobreak\relax
    \ifnum #1=0
    \hfil\hbox to\@pnumwidth{}
    \hfil\hbox to\@pnumwidth{\@tocpagenum{#7}}\fi

This redefine the \@tocline command such that if the depth of the current line in the table of content is 0 (i.e. it is a chapter), then it will not print the page number.

Check out the result:

enter image description here

  • This solves the problem. Nice answer.
    – Grimolatto
    Commented Aug 4, 2013 at 16:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .