Rooting through the cls file in the link posted above, I tried to dissect the following block, which looked rather promising:
\newcommand\listofappendices{%
\@chapteronefalse
\if@arabic\relax\else\renewcommand{\thepage}{\roman{page}}\fi
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapteruaf*{\listappname
\@mkboth{\uppercase{\listappname}}%
{\uppercase{\listappname}}}%
\@chapteronetrue
%% get this in contents as a section
\addcontentsline{toc}{section}{\listappname}
\@starttoc{loa}%
\if@restonecol\twocolumn\fi
\newpage\renewcommand{\thepage}{\arabic{page}}}
Basically, I realized that this command was setting up the List of Appendices for me, all I needed was a way to automatically populate it, instead of manually adding entries to the loa file.
At the head of each Appendix:
\chapter*{This is the first appendix}
\addcontentsline{loa}{appendix}{This is the entry for the first appendix in the List of Appendices}
The \chapter* suppresses a TOC entry for the appendix, while the \addcontentsline adds the entry to the LOA file. To get the style to match, I added the following line to the end of the code block in the cls file:
\newcommand\l@appendix{\@dottedtocline{1}{1.5em}{2.3em}}
Works perfectly now, and I don't have to worry about manually creating the List of Appendices every time I build my document.
Call the appendix
package with the [titletoc]
package option. From the appendix
documentation:
The appendices
environment can be used instead of the \appendix
command. [...]
The functions of the appendices
environment are usually accessed through
the package options, but there are declarations that may be used instead.
The options are:
toc
Put a header (e.g., Appendices
) into the Table
of Contents (the ToC) before listing the appendices. (This
is done by calling the \addappheadtotoc
command.)
[...]
titletoc
Adds a name (e.g., Appendix
) before each
appendix listed in the ToC.
The name is given by the value of \appendixname
.
[...]
Here is a minimal example:
\documentclass{report}
\usepackage[titletoc]{appendix}
\begin{document}
\tableofcontents
\chapter{A chapter}
\chapter{Another chapter}
\begin{appendices}
\chapter{}
\chapter{}
\end{appendices}
\end{document}
Best Answer
This can be easily done with the help of the
titletoc
package and its features for partial lists;\startlist
,\printlist
,\stoplist
; the idea is to have to partial lists; the first one stops just before the appendices and at this point, the second list begins; a little example:An image of the main list:
An image of the list for images in appendices:
Without additional packages this can also be done with a little more work; the idea now is to change
\ext@figure
(controlling the extension of the auxiliary file in which the information for figure captions is written to) just at the beginning of the appendixes and to have a new list of figures through a new command defined in a similar way to the standard\listoffigures
; a patch of\@chapter
is necessary in order to have the default spacing (10pt
) in the new list when a new chapter begins: