This question already has an answer here:
- Excluding chapters from ToC in amsbook 3 answers
Of course, one can include individual elements into a table of contents by inclusion of
addcontentsline at the element to be included. I'm seeking the opposite: I want to prevent selected individual elements from appearing in the table of contents when they otherwise would be.
Note that changing the depth of element to be included will not work for my case. I may want some subsections to appear in the table of contents and not others. Changing the depth will permit or prevent all subsections from appearing in the table of contents.
Is there a command (e.g.,
deletecontentsline) that will allow me to selectively prevent individual items from otherwise appearing in the TOC?
For my case, there will be no problems with numbering. In particular, I want subsections just in one section to not appear in the table of contents. So, even though there is section 1, subsection 1.1, 1.2, etc., and section 2, subsection 2.1, 2.2, etc. I want my table of contents to have only 1, 1.1., 1.2, and 2. (not 2.1, 2.2, etc.).