\title{Rechtevergabe Testdokument}
\addcontentsline{toc}{section}{Bereich A}
\addcontentsline{toc}{subsection}{Kapitel I}
\addcontentsline{toc}{subsection}{Kapitel II}
\addcontentsline{toc}{section}{Bereich B}

Gives me no TOC at all (after running pdflatex twice). Moving \addcontentsline to before \tableofcontents and removing \newpage did no change. I intend to obtain a document with TOC only. Thank you.


The \addcontentsline commands are written at \shipout. But your page is empty. Removing the \newpage after \tableofcontents should work (it does for me) or put something on the page with the \addcontentsline commands, e.g. \newpage\mbox{}.

|improve this answer|||||

If you want a document consisting of only a toc, this snippet (copied from Jevon) will help:

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy