I have a weird question, or rather two. I would like to hide a level of organization, e.g. chapters, from the table of contents. BUT I want to keep the lower levels (e.g. sections) and I also want to keep chapters for the pdf table of contents for navigation, and keep chapters for page headers. This prob sounds weird but in the book I'm editing it makes sense. (I have parts, chapters and sections. I will reformat the TOC with titletoc so it will look OK)
so the two questions are
- Is it possible to separate the in-document TOC from the one in the pdf, and how?
- What is the simplest way to omit chapters from the in-document TOC, but keep the chapter names, numbers etc for other purposes (headers, equation numbering, etc)?
I only want to keep chapters for headers and the pdf TOC, but I don't use them elsewhere. They are only for the headers, the non-print organization, and for equation numbering. I already don't display the chapter headings in the text using
\makeatletter
\newcommand{\unchapter}[1]{%
\begingroup
\let\@makechapterhead\@gobble % make \@makechapterhead do nothing
\chapter{#1}
\endgroup
}
\makeatother
Using chapter* doesn't work as that disables headers, counters, and the pdf TOC. I couldn't make \chapter[]{} work either with the above hack. I was trying to manipulate the TOC entries but that also manipulates the pdf navigation.
I was thinking of perhaps keeping the "real" TOC for the pdf navigation only, but not displaying it in the document, and crafting a custom TOC for display, if that is possible? (Not sure how to)
I appreciate if anybody has a suggestion.