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.
This might be too late for the original poster, but here's what I came up with. Largely adapted from lockstep's answer, but matches the Appendix/Subappendix model, and follows the ToC style requested:
\documentclass[toc=flat,numbers=noenddot]{scrartcl}
\usepackage{lipsum}
\usepackage{tocloft}
\newcommand{\listappendixname}{List of Appendices}
\newlistof{appendix}{app}{\listappendixname}
\setcounter{appdepth}{2}
\renewcommand{\theappendix}{\Alph{appendix}}
\renewcommand{\cftappendixpresnum}{Appendix\space}
\setlength{\cftbeforeappendixskip}{\baselineskip}
\setlength{\cftappendixnumwidth}{1in}
\newlistentry[appendix]{subappendix}{app}{1}
\renewcommand{\thesubappendix}{\theappendix.\arabic{subappendix}}
\renewcommand{\cftsubappendixpresnum}{Appendix\space}
\setlength{\cftsubappendixnumwidth}{1in}
\setlength{\cftsubappendixindent}{0em}
\newcommand{\myappendix}[1]{%
\refstepcounter{appendix}%
\section*{\theappendix\space #1}%
\addcontentsline{app}{appendix}{\protect\numberline{\theappendix}#1}%
\par
}
\newcommand{\subappendix}[1]{%
\refstepcounter{subappendix}%
\subsection*{\thesubappendix\space #1}%
\addcontentsline{app}{subappendix}{\protect\numberline{\thesubappendix}#1}%
}
\begin{document}
\tableofcontents
\section{Foo} \lipsum[1]
\subsection{Bar} \lipsum[2]
\section{Additional Foo} \lipsum[3]
\subsection{Additional Bar} \lipsum[4]
\listofappendix
\myappendix{Baz} \lipsum[5]
\subappendix{Qux} \lipsum[6]
\myappendix{Additional Baz} \lipsum[7]
\subappendix{Additional Qux} \lipsum[8]
\end{document}
Best Answer
Here is one solution using the
memoir
toc code inserts: