Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
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

2 Answers 2

up vote 6 down vote accepted

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}
share|improve this answer
    
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}

enter image description here

See also memoir manual section 6.2.1.

share|improve this answer
    
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 '12 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. –  Mike Renfro Jan 29 '12 at 22:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.