I want to include a list of appendices after my ToC, which I to some extent have managed, with this code:



and by using the command


after my ToC and

\appendices{*name of appendix*}

under the specific appendix section I want to include.

The problem is, that in my text, the appendices is numbered A.1, A.2 etc, but in my tocloft list, they only appear as "name of appendix".

Is there any way I can add the section numbering to my list?


As long as \addcontentsline{...}{...}{#1} is used there will be no numbering. The usual way is to use \addcontentsline{...}{...}{\theappendices~#1}, i.e. printing the appendix number before the title.

I hope, that the appendix package is not used as well, otherwise this would cause a conflict with the appendices environment.

The way \appendices (in the OP) was defined is incomplete, it does neither print the title in the text nor does it make any use of the appendices counter by incrementing. Since it is very likely that there might be references to the relevant appendix section I've decided to use \refstepcounter{appendices}.

The \section*{#1 \theappendices} is just for convenience and can be replaced by other typesetting 'eye-candy' at will.

Also use \parindent=0em rather than \parindent=0mm



  \section*{#1 \theappendices}%
  \addcontentsline{apc}{appendices}{\theappendices~ #1}%




\appendices{Foo One}
\appendices{Foo Two}

enter image description here

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.