TransWikia.com

Appendices in tables of contents under Appendices section

TeX - LaTeX Asked by Warmley on December 3, 2020

I have a very simple article which consists of the following:

documentclass{article}
usepackage{appendix}

begin{document} 
tableofcontents

appendixtitleon
appendixtitletocon
section{Writing}
begin{appendices}
section{First appendix}
subsection{First}
subsection{Second}
section{Second appendix}
subsection{First}
subsection{Second}
end{appendices}

end{document}

This produces the following output:enter image description here

This is almost what I want, except, I actually want the appendices to come under an appendices section in the table of contents (everything indented a level so to speak). The output would be like:
enter image description here

One Answer

Add the [toc] option:

documentclass{article}
usepackage[toc]{appendix}

begin{document}

tableofcontents

appendixtitleon
appendixtitletocon
section{Writing}
begin{appendices}
section{First appendix}
subsection{First}
subsection{Second}
section{Second appendix}
subsection{First}
subsection{Second}
end{appendices}

end{document}

enter image description here

Answered by Bernard on December 3, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP