[Tex/LaTex] apphead appears in TOC after first appendix

appendicestable of contents

In my thesis, I do this:

\include{main/chapter1}
\include{main/chapter2}
\appendix
\noappendicestocpagenum
\addappheadtotoc
\include{main/appendixchapter1}

I should be getting the line "Appendices" (the apphead) before the first appendix in the TOC, but it comes out after it. How come?

Best Answer

I know this is a few months old, but i just ran into the same problem, and this is the leading thread on the problem as far as i can see.
The problem occurs when using \include after the \addappheadtotoc command, and is actually described in the manual for the appendix package in section 2.1 known problems.

A workaround is to have \addappheadtotoc in the beginning of the first included appendix. (or you can do as I, and include a seperate file containing only that command.)