I am trying to exclude an entry from my table of contents, but I want to keep the numbering, so e.g. \chapter*{} won't work for me.

I googled around a bit, but all solutions seem to be equivalent to \chapter*{}.

The reason for my problem is that I'm adding a "list of appendices" below the TOC, so I need numbering for referencing, but it looks kind of dumb to have the list in the TOC as well.


Here's another proposition with tocdepth counter manipulation, however, this won't prevent the addition of the relevant chapter in the bookmarks.





\chapter{Foo chapter}

\chapter{List of Appendices}
\chapter{Other foo chapter}


The screen shot shows the unpleasant feature of the request: If there's another chapter afterwards, there's a gap in counting in the ToC, however, since it is the appendix, there are no further chapters after the appendix, most likely.

enter image description here

  • The unpleasant feature doesn't matter, the appendix is the last part of my document. – Anders Olsen Mar 17 '17 at 16:51
  • Your solution works, but in order to make it work as intended, I have to throw in the \hidefromtoc before the chapter previous from the one I want to hide, like this: \chapter{unhidden chapter} \hidefromtoc \chapter{last unhidden chapter} \appendix \chapter{first hidden chapter} .. \chapter{last hidden chapter} \unhidefromtoc \end{document} Maybe this is because of the appendix environment, I don't know. Either way, your solution works when I do that, so thanks a lot! – Anders Olsen Mar 17 '17 at 16:56
  • @AndersOlsen: Please consider to accept the solution then. – user31729 Mar 17 '17 at 17:04

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.