# Separate List of Appendices in new page

I need to get a separate List of Appendices in a new page, but I get an error

Undefined control sequence


My code is

\documentclass[12pt,a4paper,oneside]{report}
\usepackage[titletoc]{appendix}
\usepackage{tocloft}
\begin{document}

\tableofcontents
\newpage

\listofappendices

\newpage

\chapter{a1}
aaaaaaaaaaaaaaaaaa
\chapter{b1}
bbbbbbbbbbbbbbbbbbbb

\begin{appendices}
\chapter{MY}
ccccccccccccccccccccccccccc
\chapter{DFG}
dddddddddddddddd
\end{appendices}

\end{document}

• Could you please see this: tex.stackexchange.com/questions/9138/… – kan May 12 '13 at 7:08
• It's not worked.My document class is report and i need to add appendix to table of contents as well as separate list.Can u please check my code and give me a simple solution for this matter..thank u – Emalka May 12 '13 at 7:41
• There is no \listofappendices. Do you need the package tocloft? – Marco Daniel May 12 '13 at 9:22

There is no environment appendices. There is a command appendix which introduce the appendix.

To get a list of appendix you need a new auxiliary file. In the example below the new auxiliary file gets the extension toa (t able o f a ppendix). In the next step you must declare that all entries of the appendix are written to the new file. Therefor I am using the package xpatch:

\listfiles
\documentclass[12pt,a4paper,oneside]{report}
\usepackage[titletoc]{appendix}
\usepackage{tocloft}
\usepackage{xpatch}
\makeatletter
\newcommand\listofappendixname{Table of \appendixname}

\newcommand\listofappendices{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listofappendixname
\@mkboth{%
\MakeUppercase\listofappendixname}{\MakeUppercase\listofappendixname}}%
\@starttoc{toa}%
\if@restonecol\twocolumn\fi
}
}
\makeatother
\begin{document}

\tableofcontents

\listofappendices

\newpage

\chapter{a1}
aaaaaaaaaaaaaaaaaa
\chapter{b1}
bbbbbbbbbbbbbbbbbbbb

\appendix

\chapter{MY}
ccccccccccccccccccccccccccc
\chapter{DFG}
dddddddddddddddd

\end{document}

• I cannot install the package{xpatch}. I try to search in MikTex package manager(Admin).There is no any package like xpatch.What is a solution for that? – Emalka May 12 '13 at 10:46
• @Emalka: Which version of MikTeX do you have? – Marco Daniel May 12 '13 at 10:53
• version 2.8.3761 – Emalka May 12 '13 at 10:55
• @Emalka: As far as I know the current version of MikTeX is 2.9. Maybe you need this version. I am working with TeX Live and the package is part of this. However CTAN tells us that xpatch is part of MikTeX: ctan.org/pkg/xpatch – Marco Daniel May 12 '13 at 10:58
• @Emalka According to miktex.org/releases v2.9 is the current version since October 2010 so your version seems to be quite outdated – cgnieder May 12 '13 at 11:52