I'm trying to remove a chapter in the ToC to instead replace it with a custom text. A easy way is do like this:

\addcontentsline{toc}{chapter}{Custom chapter name}

But this unfortunately removes all chapter numbers in the underlying sections and subsections.

How can I go around this?

  • Welcome to TeX.SX! Usually, we prefer to have a working document, not just fragments of code! In addition, it might confuse the reader to find different names of chapters in ToC and document – user31729 May 22 '16 at 15:05

Here's a somewhat cleaner way (in my point of view) to provide a different chapter number title:

Either manipulate the tocdepth counter temporarily or use \chapter[Other ToC Title]{Different in - body - title}.




\chapter{A regular chapter}
\addtocontents{toc}{\protect\setcounter{tocdepth}{-5}} % Switch off toc appeareance for a moment
\chapter{In - document chapter name}
\addcontentsline{toc}{chapter}{Custom chapter name}

\chapter[And yet another chapter title in ToC]{And this is the long chapter title that shouldn't appear in ToC!}
\section{Foo bar}

\chapter{Another regular Chapter}
\section{Foo bar bar}


enter image description here


Perhaps \refstepcounter{chapter} as in

\addcontentsline{toc}{chapter}{Custom chapter name}%

does the trick.

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.