Mit meiner Arbeit bin ich fertig und habe sie bisher so:
\documentclass[listof=totoc]{scrreprt} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \begin{document} \tableofcontents \chapter{1}\chapter{2}\chapter{3} \listoffigures\listoftables \appendix \chapter{a}\chapter{b}\chapter{c} \addchap{Erklärung} \end{document}
Doch leider ist die Erklärung nun im Anhangsverzeichnis.
Wie bekomme ich die da wieder raus?
\documentclass[listof=totoc]{scrreprt} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \makeatletter% --> De-TeX-FAQ \newcommand*{\maintoc}{% Hauptinhaltsverzeichnis \begingroup \@fileswfalse% kein neues Verzeichnis öffnen \renewcommand*{\appendixattoc}{% Trennanweisung im Inhaltsverzeichnis \value{tocdepth}=-10000 % lokal tocdepth auf sehr kleinen Wert setzen }% \tableofcontents% Verzeichnis ausgeben \endgroup } \newcommand*{\appendixtoc}{% Anhangsinhaltsverzeichnis \begingroup \renewcommand\@pnumwidth{7ex} \edef\@alltocdepth{\the\value{tocdepth}}% tocdepth merken \setcounter{tocdepth}{-10000}% Keine Verzeichniseinträge \renewcommand*{\contentsname}{% Verzeichnisname ändern Anhangsverzeichnis}% \renewcommand*{\appendixattoc}{% Trennanweisung im Inhaltsverzeichnis \setcounter{tocdepth}{\@alltocdepth}% tocdepth wiederherstellen }% \tableofcontents% Verzeichnis ausgeben \setcounter{tocdepth}{\@alltocdepth}% tocdepth wiederherstellen \endgroup } \newcommand*{\appendixattoc}{% Trennanweisung im Inhaltsverzeichnis } \g@addto@macro\appendix{% \appendix erweitern \cleardoublepage% Neue Seite \addcontentsline{toc}{part}{\appendixname}% Eintrag ins Hauptverzeichnis \addtocontents{toc}{\protect\appendixattoc}% Trennanweisung in die toc-Datei } \makeatother \begin{document} \maintoc \chapter{1}\chapter{2}\chapter{3} \listoffigures\listoftables \appendix\appendixtoc \chapter{a}\chapter{b}\chapter{c} \addchap{Erklärung} \end{document}