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 '19 at 10:48

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}}