Merge branch '51-appendices-should-not-be-included-in-toc' into 'master'

Resolve "Appendices should not be included in TOC"

Closes #51

See merge request fastexitlane/latex-boilerplate!31
This commit is contained in:
Dominik Becker 2021-04-15 11:14:09 +00:00
commit a9cabfe3e7

View File

@ -22,17 +22,22 @@
]{geometry}
% Anhang inklusive Anhangsverzeichnis
\usepackage{tocvsec2}
\usepackage{titletoc}
\newenvironment{custom_appendix}{%
% ab hier keine Einträge mehr im Inhaltsverzeichnis - dafür haben wir das Anhangverzeichnis
\addtocontents{toc}{\string\setcounter{tocdepth}{0}}
\renewcommand{\thechapter}{\MakeUppercase{\Alph{chapter}}}%
\setcounter{chapter}{1}
\addchap{Anhang}
\startcontents[sections]
\startcontents
\section*{Anhangsverzeichnis}
\printcontents[sections]{l}{1}{\setcounter{tocdepth}{2}}
\printcontents{l}{1}{\setcounter{tocdepth}{2}}
\addtocontents{ptc}{\string\setcounter{tocdepth}{2}}
\newpage
}{
\stopcontents[sections]
%\stopcontents
\renewcommand{\thechapter}{\arabic{chapter}}%
\setcounter{chapter}{1}
}