6

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?

2
  • 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, 2012 at 3:59
  • Yes, that is exactly what I wanted!
    – Katt
    Jan 29, 2012 at 21:30

2 Answers 2

7

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}
1
  • 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, 2012 at 21:11
5

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}

enter image description here

See also memoir manual section 6.2.1.

2
  • I actually wanted a list of appendices, much like the listoffigures or listoftables. Isn't it also a bit strange that the page number for the Appendices in your example is 3, when actually Chapter One is on page 3! Perhaps there is something wrong with \addappheadtotoc?
    – Katt
    Jan 29, 2012 at 21:31
  • 1
    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. Jan 29, 2012 at 22:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .