I am writing a paper which has an appendix. The main part of the paper looks like this:
I want to put a table of contents in the appendix. I want the table of contents to list only the sections/subsections in the appendix and not those in the main part of the paper. What I have now also lists the section from the main part of the paper:
How can I find a way not to include sections/subsections from the main part of the paper into the appendix table of contents? I am looking for a simple solution, if possible. Will appreciate any help. Here is my MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tocloft}
\renewcommand\cftsecleader{\cftdotfill{\cftdotsep}}
\usepackage[colorlinks,linktoc=all]{hyperref}
\title{Paper-A}
\begin{document}
\maketitle
\section{Introduction}
In \autoref{app:eqcond}, I show in detail the equilibrium conditions of the
model. \autoref{app:staeq} lists the stationary equilibrium of the economy.
\newpage
\appendix
\begin{center}
\section*{\textsc{ONLINE APPENDIX}}
\end{center}
\tableofcontents
\section{Equilibrium Conditions}\label{app:eqcond}
\subsection{Further Explanation}
\section{Stationary Equilibrium}\label{app:staeq}
\end{document}
I also had this curiosity whether the leaders between the text and page numbers in TOC can also be hyperlinked (so that if one clicks the leaders, it takes one to the relevant page)?