Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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

share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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