4

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?

1
  • 1
    It would be nice if there is a MWE(Minimum Working Example) Apr 22, 2014 at 16:19

1 Answer 1

5

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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