1

Possible Duplicate:
Excluding chapters from ToC in amsbook

is it possible in LaTeX to have numbered chapters inside the appendix, without having them appear in the Table of Contents (TOC)?

  • 1
    You can use {\renewcommand{\addtocontents}[2]{} \chapter{Appendix chapter}} to remove the appendix chapter from the ToC. Grouping the \renewcommand localizes the change. – Werner Aug 10 '12 at 2:38
  • It works but it doesn't show anything, neither the bibliography. I'd like hiding all chapters of appendix, but showing both appendix (only one generic entry for the start of the appendix) and bibliography. – auino Aug 17 '12 at 9:47
  • For a generic Appendix entry, insert \addtocontents{toc}{chapter}{Appendix}, followed by \let\oldaddtocontents\addtocontents \renewcommand{\addtocontents}[2]{} and then use your appendix chapters as usual. Then, before your Bibliography, add \let\addtocontents\oldaddtocontents. This assumes your document structure is such that you have a bibliography following you appendix. If this is not the case, you must have used the \renewcommand I suggested in the previous comment too soon. – Werner Aug 17 '12 at 15:37
0

Using the tip described on TeX Stack Exchange:

\addtocontents{toc}{\setcounter{tocdepth}{-1}}
\chapter{Preface}
\addtocontents{toc}{\setcounter{tocdepth}{2}}

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