1

for a book I am writing I'd like to insert a normal chapter (i.e. with normal numbering and correct headers and footers - I'm using 'fancyhdr') but preventing it from appearing in the ToC.

A ToC like:

Chapter 1
Chapter 2
Chapter 4
Chapter 5

With a gap in chapter numbering, it would be a "ghost" (from the ToC point of view) chapter.

I am finding advice on how to do the unnumbered chapter in ToC, i.e., using:

\chapter*{title...}

But I cannot find the opposite: 'numbered chapter not in ToC'.

Can you suggest a way to do it?

Thank you

  • Generally there is no method for removing a numbered chapter from the TOC (I've never even heard of such a requirement). But is is, for for that we'll need more information from you, like a minimal example, using the same documentclass that you'll use, and especially whether or not you are using hyperref (as it redefines an internal component to have more arguments than usual) – daleif Sep 11 at 10:48
1

Change tocdepth for the chapter to be eliminated

\documentclass{book}
\newcounter{foo}

\begin{document}
\tableofcontents



\chapter{title 1}
\chapter{title 2}

{
\setcounter{foo}{\value{tocdepth}}
\addtocontents{toc}{\protect\setcounter{tocdepth}{-10}}
\chapter{title 3}
\addtocontents{toc}{\protect\setcounter{tocdepth}{\value{foo}}}
}

\chapter{title 4}

\end{document}
  • this [SOLVED] my need perfectly, thank you! – atrent Sep 11 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.