I am very new to LaTeX and still more in a trial and error phase than on a real understanding level.
My goal is to have all appendices – which are chapters and I would like to keep it that way – to appear in the TOC as sections, under a 'chapter' appendices.
Here is what I tried, using the tocloft package
\newpage\phantomsection
\addcontentsline{toc}{chapter}{Appendices}
\appendix
\setlength{\cftchapindent}{\cftsecindent}
\renewcommand{\cftchapfont}{\cftsecfont}
\renewcommand{\cftchapleader}{\cftsecleader}
\chapter{chapter title}
So my idea was to just tell LaTeX to write chapters to the TOC as though they were sections. My code has no effect whatsoever. Any ideas/solutions are very much appreciated
Best Answer
You had the right idea, but you need to add your changes to the TOC itself rather than in the main document (and because of this you need to
\protect
some of the commands.) Note that this solution won't look very nice if your appendices have sections.