If you have ever wanted to create a Table of Contents section in appendix without the contents from the main paper — here is how you can do it.
\appendix
\clearpage % Start on a new page
% Local command to print the header without affecting ToC or bookmarks
\newcommand{\localheader}[1]{%
\vspace*{-\topskip}\vspace*{\dimexpr\topskip-\baselineskip\relax}
{\large\bfseries #1\par}
\vspace{\baselineskip}
}
% Print the local header
\localheader{Appendix Contents}
\begin{center}
\begin{minipage}{0.9\textwidth}
\startcontents[appendix] % Start a new table of contents for the appendix
\printcontents[appendix]{}{0}{% Print the appendix ToC
\renewcommand{\contentsname}{}% Remove default "Contents" heading
}
\end{minipage}
\end{center}
The good part is that it still maintains proper bookmarks in the exported pdf — and you can still use \tabaleofcontents
while drafting to get the complete Table of Contents.