2

This question already has an answer here:

I would like have sections in the appendix numbered but not appearing in the table of contents.

If I use the \section command then the section is numbered and appears in the table of contents. If I use the \section* command, then the section is removed from the table of contents but also the numbering is removed. How I can keep the numbering?

marked as duplicate by egreg sectioning Dec 9 '15 at 20:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Just add the following code after \section{}

\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}

If you want the next chapter to be included in the TOC you just paste this code after this command and set the counter to 1

  • 1
    I changed the answer now because I found another solution – SeRe Dec 9 '15 at 18:14

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