# apphead appears in TOC after first appendix

In my thesis, I do this:

\include{main/chapter1}
\include{main/chapter2}
\appendix
\noappendicestocpagenum
\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?

-

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.)

-
Well, for some reason I no longer manage to reproduce this bug... –  einpoklum Jul 12 '12 at 18:28
... let's take your word for it. –  einpoklum Apr 17 '13 at 13:58

The folowing MWE works well.

% ----------------------------------------------------------------
% Book Class (This is a LaTeX2e document)  ***********************
% ----------------------------------------------------------------
\documentclass[10pt]{book}
\usepackage[english]{babel}
\usepackage{appendix} % <-------------------Should be added to use \noappendicestocpagenum
%-----------------------------------
\begin{document}
\tableofcontents
%-----------------------------------
\chapter{First chapter}
\chapter{Second chapter}
%-----------------------------------
\appendix
\noappendicestocpagenum