6

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?

2 Answers 2

5

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

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

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
\addappheadtotoc
%-----------------------------------
\chapter{First appendix}
\chapter{Second appendix}
%-----------------------------------
\end{document}
% ----------------------------------------------------------------

enter image description here

PS: May be you should add a complete MWE (instead of snippets) if it is still not working for you

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .