# Problem with \appendix, want one main “Appendix” and then Appendix A, B, C etc

I have some problem using \appendix. I want one main "Appendix" page with a "table of content for the appendixes" and after that all the appendixes (by themselves) starting at the top of a new page. See picture made in paint, page brake illustrated by a line. Hope this i'sent to much asked. J

My code is now:

%%%%%%%%%%%%%%%%%%%%
%%% APPENDIX
%%%%%%%%%%%%%%%%%%%%
\appendix
%%%%%%%%%%%%%%%%%%%%
% Appendix A
%%%%%%%%%%%%%%%%%%%%
\chapter{Appendix A}
\section{Numerical results}\label{app:AppendixA}

\newpage
\pagestyle{empty} \cleardoublepage %\pagestyle{fancyplain}

%%%%%%%%%%%%%%%%%%%%
% Appendix B
%%%%%%%%%%%%%%%%%%%%
\chapter{Appendix B}
\section{Figures}\label{app:AppendixB}

\newpage
\pagestyle{empty} \cleardoublepage %\pagestyle{fancyplain}

• This can be achieved with any package that allow partial table of contents, etoc, tableof, titletoc,minitoc we need to know the class you use. – touhami Mar 2 '16 at 16:40
• I'm using \documentclass[a4paper, 12pt]{book}. The answer below did the trick! J – mwasberg Mar 3 '16 at 9:09

Here is two solutions.

With tableof package

\documentclass{book}
\usepackage{tableof}
\AtBeginDocument{\tofOpenTocFileForWrite}

\begin{document}
\tableofcontents % just to display the heading Contents
\tableof{}%  replace \tableofcontents i.e. display toc file
\chapter{First}
\section{Foo}

\appendix
\tableofcontents
\tableof{appendix}
\toftagstart{appendix}
\chapter{First appendix}
\section{Foo appendix}

\chapter{Last Appendix}
\section{Barappendix}
\toftagstop{appendix}
\end{document}


With titletoc package

\documentclass{book}
\usepackage{titletoc}

\begin{document}
\tableofcontents
\chapter{First}
\section{Foo}

\appendix
\startcontents
\printcontents{}{0}{%
\setcounter{tocdepth}{2}%
\tableofcontents}
\chapter{First appendix}
\section{Foo appendix}

\chapter{Last Appendix}
\section{Bar appendix}
\stopcontents
\end{document}

• The last one works perfect! Did some adding; e.g. put the table of content for Appendix in the main table of content using \addcontentsline{toc}{chapter}{Appendix} after \appendix. Exactly what i wanted! Big thanks! – mwasberg Mar 3 '16 at 9:07