# List of appendices with tocloft and memoir

I found a very nice example showing how to create a list of appendices here: How to get a list of appendices? but it doesn't seem to work with the memoir document class. I get the error message "Command \appendices already defined."

How can I create the same list of appendices with the memoir class?

-
Do you want to remove the appendices as the appear in the regular Table of Contents (as chapters) and just have them show up in a List of Appendices (with perhaps an entry in the Table of Contents pointing to the List of Appendices, just like one might have an entry to List of Tables)? –  Werner Jan 28 '12 at 3:59
Yes, that is exactly what I wanted! –  Katt Jan 29 '12 at 21:30

Here is one solution using the memoir toc code inserts:

\documentclass[a4paper]{memoir}
% sample data
\newcounter{dlf}
\newcommand\test{%
\stepcounter{dlf}
\chapter{Test chapter \thedlf}
\section{test section \thedlf}}
\cftinsertcode{preapp}{\setcounter{tocdepth}{-10}}
\newcommand\apptoc{
\begingroup
\cftinsertcode{prenorm}{\setcounter{tocdepth}{-10}}
\cftinsertcode{preapp}{\setcounter{tocdepth}{3}}
\renewcommand\contentsname{List of appendencies}
\tableofcontents*
\endgroup
}
\begin{document}
\cftinserthook{toc}{prenorm}

\tableofcontents*

\test\test\test

\appendix
\appendixpage
\cftinserthook{toc}{preapp}

\apptoc

\test\test\test

\end{document}

-
That seems to nearly do the trick! How would I make it so that there were dots after the appendix entries, and they were not bold? So that the list of appendices were really like the list of figures? –  Katt Jan 30 '12 at 21:11

Memoir already includes tocloft functionality. A minimal example of appendices would be:

\documentclass{memoir}
\begin{document}
\tableofcontents
\chapter{One}
\appendix
\appendixpage
\chapter{Alpha}
\end{document}


My mistake. I should have used \appendixpage instead, and it's fixed now. Will work up an example similar to other Lists of X for appendices shortly. –  Mike Renfro Jan 29 '12 at 22:53