# My Appendices sections do not appear in the ToC, while the head Appendix does?

I want to have each of my appendices in the ToC, though it somehow only shows the Appendix. I am using \usepackage{appendix}

I want it to look like this:

Appendices
A Appendix 1
B Appendix 2


At the moment it looks like this

Appendices


Relevant code:

\setcounter{tocdepth}{1}
\tableofcontents
\begin{appendix}
\appendixpage
\include{Appendix}
\end{appendix}


My appendices are included in the Appendix.tex and are each a section. In the ToC all chapters and sections are included, so the tocdepth of 1 seems right to me?

• That is not relevant code. We need a full minimal example we can copy and test as is. For example we do not know what you have in the Appendix.tex file (that include is probably not needed for this example). It might seem annoying to you that you have to do more work, but it makes helping you a lot easier for the rest of us, aka much faster answers for you. – daleif Apr 11 '18 at 9:40

As mentioned in the documentation of package appendix the marco \addappheadtotoc can not be followed by \include.

Use can use \input{Appendix}:

\begin{filecontents*}{Appendix.tex}
\blinddocument
\blinddocument
\end{filecontents*}
\documentclass{report}
\usepackage{blindtext}
\usepackage{appendix}
\setcounter{tocdepth}{1}
\begin{document}
\tableofcontents
\blinddocument
\begin{appendix}
\appendixpage
\input{Appendix}%<- changed
\end{appendix}
\end{document}


Or you can put \addappheadtotoc within the included file:

\begin{filecontents*}{App.tex}
\blinddocument
\blinddocument
\end{filecontents*}
\documentclass{report}
\usepackage{blindtext}
\usepackage{appendix}
\setcounter{tocdepth}{1}
\begin{document}
\tableofcontents
\blinddocument
\begin{appendix}
\appendixpage
\include{App}
\end{appendix}
\end{document}


The result is the same as above.

If the page number of the entry »Appendix« in ToC could/should be the number of the \appendixpage then you can use:

\begin{filecontents*}{Appendix.tex}
\blinddocument
\blinddocument
\end{filecontents*}
\documentclass{report}
\usepackage{blindtext}
\usepackage{appendix}
\setcounter{tocdepth}{1}
\begin{document}
\tableofcontents
\blinddocument
\begin{appendix}