I am writing a large article type document with a series of complex appendices in it.
I have included a local table of contents with each appendix that lists the sections and subsections within that specific appendix (the local TOC for Appendix A lists only that appendix's subsections, etc) using tools from the etoc package.
What I would like to do is have my appendix sections contain numbered subsections/subsubsections, but have the subsections/subsubsections only appear in the appendix local TOC. However I still want the appendix sections to appear in the main TOC.
Here is a rough approximation of my setup:
\documentclass{article} \usepackage{tocloft} % Adds tools for TOC customization \usepackage{etoc} % Local toc \usepackage[titletoc,title]{appendix} \begin{document} \setcounter{tocdepth}{3} \tableofcontents \section{First section} \subsection{a Subsection} \section{Second section} \subsection{a Subsection} \subsection{Another Subsection} \begin{appendix} \section{Appendix A} % <- I want this to appear in the main TOC \etocsetnexttocdepth{2} \localtableofcontents \subsection{Appendix Subsection} % <- I want this to appear in the local TOC, but not the main TOC \end{appendix} \end{document} And the output:

