I need to add 'Appendices' before Appendix A, Appendix B in the TOC. Below code successfully adds it.
\appendix
\addtocontents{toc}{\cftpagenumbersoff{chapter}}
\chapter*{APPENDICES}
\addtocontents{toc}{\protect\contentsline {chapter}{APPENDICES}{}{}}
\addtocontents{toc}{\cftpagenumberson{chapter}}
\makeatletter
\addtocontents{toc}{\let\protect\l@chapter\protect\l@section}
\makeatother
\include{appendix_materials}
\include{appendix_project}
The output is as follows:
APPENDICES
APPENDIX A
APPENDIX B
However, \chapter*{APPENDICES}
command adds an extra page and this is unwanted outcome. When the command removed output becomes as follows:
CHAPTER A
APPENDICES
APPENDIX B
Is there any way to get rid of extra chapter page? Or mainly how to add properly 'Appendices' to the TOC?
By the way Appendix A and Appendix B added as chapter because of styling issues.
My setup:
\documentclass[12pt]{report}
\usepackage[titletoc,title]{appendix}
\usepackage{tocloft}
Best Answer
The
appendix
package isn't really used correctly in the 'MWE' by the O.P.Calling
\usepackage[page,toc,titletoc,title]{appendix}
it is possible to haveAppendices
(orAppendix
, if there's only one appendix chapter or section (option page)Appendices
for the separate Appendix - page (option tocAppendix
as a title to the chapters or sections in the document body (option title)Appendix
in theToC
as well (option titletoc)However, this requires either the usage of multiple
\addappendixpage
etc. commands or\begin{appendices}...\end{appendices}
.