There's really no need to define a new command for the chapter in the appendices section; just before the appendices you can redefine the \@chapter
command (defined in report.cls
), to include the appendices in the new list instead of including them in the ToC; here's an example of such a redefinition; note that the second mandatory argument of \newlistof
must be used in the redefinition of \chapter
(see the lines marked with %NEW
):
\documentclass[12pt,draft,letterpaper]{report}
\usepackage{quotchap}
\usepackage[titles]{tocloft}
\usepackage{appendix}
\newlistof{appendixchapter}{apx}{List of Appendices}
\begin{document}
\tableofcontents
\listofappendixchapter
\addcontentsline{toc}{section}{List of Appendices}
\chapter{My first chapter}
This is Chapter 1's body.
\appendix
\makeatletter
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{apx}{chapter}%NEW
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{apx}{chapter}{#1}%NEW
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother
\chapter{My first appendix}
This is Appendix A's body.
\chapter{My second appendix}
This is Appendix B's body.
\end{document}
An excerpt from the resulting document showing the ToC and the LoA:
As requested, here's the code necessary to use a new command \appendixchapter
(similar to \chapter
) for the appendices; the new definition needs two new commands \appendixchapter
and \@appendixchapter
; only the first one will be used in the document body:
\documentclass[12pt,draft,letterpaper]{report}
\usepackage{quotchap}
\usepackage[titles]{tocloft}
\usepackage{appendix}
\makeatletter
\newcommand\appendixchapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@appendixchapter\@schapter}
\def\@appendixchapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{apx}{chapter}%NEW
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{apx}{chapter}{#1}%NEW
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\makeatother
\newlistof{appendixchapter}{apx}{List of Appendices}
\begin{document}
\tableofcontents
\listofappendixchapter
\addcontentsline{toc}{section}{List of Appendices}
\chapter{My first chapter}
This is Chapter 1's body.
\appendix
\appendixchapter{My first appendix}
This is Appendix A's body.
\appendixchapter{My second appendix}
This is Appendix B's body.
\end{document}
You can provide local redefinitions for \thechapter
, \thesection
, \thesubsection
, \thefigure
and \thetable
:
\documentclass{report}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage[title,titletoc]{appendix}
\begin{document}
\tableofcontents
\begin{appendices}
\renewcommand\thechapter{}
\renewcommand\thesection{\arabic{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thefigure{\arabic{figure}}
\renewcommand\thetable{\arabic{table}}
\chapter{}
\section{A test section}
Some text here
\subsection{A test subsection}
Some text here
\end{appendices}
\end{document}
An image of the resulting ToC:
An image of the Appendix in the document body:
Notice that this can produce ambiguity, since you will have two different objects with the same numbering (the first chapter of the document and the first section in the appendix are both numbered "1", for example). To avoid this, you could number the sections alphabetically or using Roman numerals:
\renewcommand\thechapter{}
\renewcommand\thesection{\Alph{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thefigure{\arabic{figure}}
\renewcommand\thetable{\arabic{table}}
or
\renewcommand\thechapter{}
\renewcommand\thesection{\Roman{section}}
\renewcommand\thesubsection{\thesection.\arabic{subsection}}
\renewcommand\thefigure{\arabic{figure}}
\renewcommand\thetable{\arabic{table}}
Best Answer