I'm very sorry but I have to ask for urgent help as I could not make sense of the individual questions I asked previously.

I'm required a separate list of appendices, i.e. the appendix is not to show up in the TOC except for the item Appendix, which can be manually created with


The appendix itself is supposed to be structured like

Appendix A
A.1 Title
A.2 Title

Appendix B
B.1 Title
B.2 Title

Tocloft provides a means to manually create a list, this example is taken from the documentation:

\newcommand{\listanswername}{List  of  Answers}

 \par\noindent\textbf{Answer  \theanswer.  #1}

creates the command \listofanswer which items are added to with


This results in

List of Answers
1 Hard ....... pageno

Several problems arise for me:

  • Decimal counter instead of alphabetic
  • no sub environment for the A.n scheme
  • no prefix like "Appendix A.1 Hard .... pageno"

So I need a list such as

List of Appendices

Appendix A    Code listings   ................. 187
Appendix A.1  Stackexchange generator ........  187
Appendix A.2  Stackexchange hack function .... 2179

Appendix B    Misc            ................ 2180
Appendix B.1  Overview Q&A Sites      ........ 2181
Appendix B.2  User psychoanalysis         .... 2378

I assume this may be solved by adding a second command in the manner presented by the tocloft documentation but I'm currently not capable of spending time figuring it out due to my desastrous state of the paper (of course, due tomorrow).

So if someone could provide the sub-command and a way to change enumeration to literals I'd greatly appreciate it. Sorry again, I'm in a state of mind where only a a bullet-proof for-dummies solution will get me somewhere.


3 Answers 3


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:

List of Appendices and Subappendices


\newcommand{\listappendixname}{List of Appendices}

  \section*{\theappendix\space #1}%

  \subsection*{\thesubappendix\space #1}%

\section{Foo} \lipsum[1]
\subsection{Bar} \lipsum[2]
\section{Additional Foo} \lipsum[3]
\subsection{Additional Bar} \lipsum[4]


\myappendix{Baz} \lipsum[5]
\subappendix{Qux} \lipsum[6]
\myappendix{Additional Baz} \lipsum[7]
\subappendix{Additional Qux} \lipsum[8]

I managed to correct the example from the tocloft documentation.

  • Two codelines are actually faulty -- one mandatory argument of \newlistentry is missing, as well as a closing brace in \addcontentsline. I have marked these corrections with "(!)".

  • Because you are using a document class without \chapter, some parameters had to be changed.

I have also taken the liberty to make changes in the vertical and horizontal spacing (marked with "Optional").



\newcommand{\listanswername}{List of Answers}

\newlistof[section]{answer}{ans}{\listanswername}% "section" instead of  "chapter"
\cftsetindents{answer}{0em}{1.8em}% Optional

  \bigskip% Optional
  \textbf{Answer~\theanswer. #1}%

\newlistentry[answer]{subanswer}{ans}{2}% "{ans}" added (!); "2" instead of "1"
\cftsetindents{subanswer}{1.8em}{2.9em}% Optional

  \smallskip% Opional
  \textbf{\thesubanswer) #1}%
  \addcontentsline{ans}{subanswer}% "}"after "subanswer" added (!)
  \quad\ignorespaces% Optional

\setcounter{ansdepth}{3}% "3" instead of "2"



Making a custom list with \texttt{tocloft}.

\answer{Harder} The \dots

\subanswer{Reformulate the problem } It assists \dots


  • Thanks so much for getting it to work. It's not quite what I need yet but I'll try to figure it out. Will get back to this in <24 hrs. Thanks again.
    – None
    Commented Jan 17, 2011 at 17:43
  • This results in 6.1.j Sublevel . .. . . . . . . . . . 66 6.2 Nexttoplevel . . . . . . . . . 66 6.2.a Nextsublevel . . . . . . . . . xx Could someone please help me out and tell me how to create the list as shown in my question? Sorry about the desparation :-(
    – None
    Commented Jan 18, 2011 at 8:09

Here's a solution that doesn't involve tocloft. The author is Markus Kohm; I have taken the code from this site, made minor modifications and translated Markus Kohm's comments.

%     "toc=flat,numbers=noenddot" ADDED, "scrartcl" INSTEAD OF "scrbook"

\usepackage[english]{babel}% "english" INSTEAD OF "ngerman"

\newcommand*{\maintoc}{% main table of contents
    \@fileswfalse% don't open new ToC file
    \renewcommand*{\appendixattoc}{% macro for separation of ToC contents
      \value{tocdepth}=-10000 % set tocdepth to very small value locally
    \tableofcontents% output ToC
\newcommand*{\appendixtoc}{% table of contents for appendix
    \edef\@alltocdepth{\the\value{tocdepth}}% save tocdepth
    \setcounter{tocdepth}{-10000}% no ToC entries
    \renewcommand*{\contentsname}{% change ToC name
      List of Appendices}% "List of Appendices" INSTEAD OF "Verzeichnis der Anh\"ange"
    \renewcommand*{\appendixattoc}{% macro for separation of ToC contents
      \setcounter{tocdepth}{\@alltocdepth}% restore tocdepth
    \tableofcontents% output ToC
    \setcounter{tocdepth}{\@alltocdepth}% restore tocdepth
\newcommand*{\appendixattoc}{% macro for separation of ToC contents
\g@addto@macro\appendix{% augment \appendix
%  \if@openright\cleardoublepage\else\clearpage\fi% new page; DELETED
  \clearpage% new page; ADDED
  \addcontentsline{toc}{section}{\appendixname}% entry into main ToC;
%     "section" INSTEAD OF "chapter"
  \addtocontents{toc}{\protect\appendixattoc}% macro for separation into ToC file
  \renewcommand*{\thesection}{Appendix~\Alph{section}}% ADDED


% \blinddocument% DELETED

% \blinddocument% DELETED


% Note that \maintoc only works if \appendixtoc is also present. Otherwise,
% the ToC will never be updated. If \appendixtoc is removed, one should use
% \tableofcontents instead of \maintoc.
  • 1
    It seems, that Appendix bookmark doesn't link on the correct page. In my case it is the subsubsection before List of Appendices. Adding \phantomsection after \clearpage% new page; ADDED solved the problem.
    – CSchulz
    Commented Aug 5, 2011 at 11:45
  • @lockstep I also need to use seperate list of appendixes.can i change above code for \documentclass[12pt,a4paper,oneside]{report} ?I try it .but errors...
    – Emalka
    Commented May 13, 2013 at 7:16

You must log in to answer this question.

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