# How to form Appendix under the heading Appendices in ToC

I want each appendix to be under the heading Appendices in the ToC. Here is my MWE:

\documentclass[12pt,oneside]{book}
\usepackage{titletoc}
\usepackage{appendix}

\begin{document}
\tableofcontents
\chapter{CHAPTERR}
\section{Sectionn}
Some stuff.
\chapter{CHAPTERRR}
\section{Sectionnn}
Other stuff.
\begin{appendices}
\chapter{TABLESS}
\section{DATA}
\chapter{FIGURESS}
\section{CODE}
\end{appendices}

\end{document}


My output is

But I want this:

I think you can use the command \addcontentline{toc} to add a line in the toc a the "part" level. It will work only if you have a document that accepts the "part" environment, which is the case here.

This is working :

\documentclass[12pt,oneside]{book}
\usepackage{titletoc}
\usepackage{appendix}

\begin{document}
\tableofcontents
\chapter{CHAPTERR}
\section{Sectionn}
Some stuff.
\chapter{CHAPTERRR}
\section{Sectionnn}
Other stuff.

\appendix

\chapter{TABLESS}
\section{DATA}
\chapter{FIGURESS}
\section{CODE}

\end{document}


For the ‘Appendices’ heading, since you load appendix, you simply have the [toc] option.

Also, if you don't want the appendix sections in table of contents, you can change toc depth at the beginning of the appendices environment:

\documentclass[12pt,oneside]{book}
\usepackage{titletoc}
\usepackage[toc]{appendix}
\usepackage{xpatch}
\appendixtocname}{%
\hspace{1.32em}\MakeUppercase{\appendixtocname}}{}{}

\begin{document}

\tableofcontents
\chapter{CHAPTERR}
\section{Sectionn}
Some stuff.
\chapter{CHAPTERRR}
\section{Sectionnn}
Other stuff.
\begin{appendices}
\chapter{TABLESS}
\section{DATA}
\chapter{FIGURESS}
\section{CODE}
\end{appendices}

\end{document}


• Thank you for this. But I want the word "Appendices" to be uppercase. Also, I want each Appendix to be indented under the heading "APPENDICES". – oa-90 Feb 19 '19 at 21:10
• @oa-90: You want what? – Bernard Feb 19 '19 at 21:30
• I want the word "Appendices" in ToC to be uppercase. Also, I want each appendix (i.e., TABLESS, FIGURESS) to be under the heading "APPENDICES" in an indented style like in the second picure I posted. – oa-90 Feb 19 '19 at 21:42
• The last point should be harder. I've posted a code which indents the word APPENDICES, on the contrary. After all, appendices chapters are chapters and should be aligned with the other chapters, don't you agree? – Bernard Feb 19 '19 at 21:48
• Thanks! My thesis is supposed to be in this format. On the other hand, I added \usepackage[colorlinks=true,breaklinks]{hyperref} in my preamble. In this case, the code which you posted to make Appendices uppercase in ToC gives an error. Do you have a solution for this issue? – oa-90 Feb 20 '19 at 6:32