[Tex/LaTex] Custom ToC for appendices

appendicesnumberingtable of contents

I would like to create a table of content for the Appendices that produce this result

Appendices
   A   First Appendix
   B   Second Appendix
   C   Third Appendix

So far I've tried with

\appendix
\addcontentsline{toc}{chapter}{Appendices}
\setcounter{section}{0}
\section{First Appendix}
\section{Second Appendix}
\section{Third Appendix}

which returns

Appendices
   .1   First Appendix
   .2   Second Appendix
   .3   Third Appendix

I know it's possible to change the numbering of sections to be alphabetical, but that will also affect all the sections in normal chapters.

Can you find a solution to this?

Best Answer

A change in the counter representation of section (i.e., \thesection) only works from the point at which you declare it. So, if the Appendix is the last chapter in your document, then you can adjust \thesection at that point with no ill effect to earlier sections:

\appendix
\chapter*{Appendices}% If \appendix doesn't insert a \chapter
\addcontentsline{toc}{chapter}{Appendices}% Print Appendix in ToC
\setcounter{section}{0}% Reset numbering for sections
\renewcommand{\thesection}{\Alph{section}}% Adjust section printing (from here onward)
\section{First Appendix}
\section{Second Appendix}
\section{Third Appendix}

Here is a complete minimal example highlighting the ToC output:

enter image description here

\documentclass{report}
\begin{document}

\tableofcontents

\chapter{A chapter}
\section{First section}
\section{Second section}
\section{Third section}

\appendix
\chapter*{Appendices}% If \appendix doesn't insert a \chapter
\addcontentsline{toc}{chapter}{Appendices}% Print Appendix in ToC
\setcounter{section}{0}% Reset numbering for sections
\renewcommand{\thesection}{\Alph{section}}% Adjust section printing (from here onward)
\section{First Appendix}
\section{Second Appendix}
\section{Third Appendix}

\end{document}