diff --git a/.gitignore b/.gitignore index f8c2b5e..88ec3e7 100644 --- a/.gitignore +++ b/.gitignore @@ -238,4 +238,5 @@ TSWLatexianTemp* /auto/* # expex forward references with \gathertags -*-tags.tex \ No newline at end of file +*-tags.tex +main.ptc diff --git a/appendix/01_example.tex b/appendix/01_example.tex new file mode 100644 index 0000000..e8004c1 --- /dev/null +++ b/appendix/01_example.tex @@ -0,0 +1,4 @@ +%!TEX root = ../main.tex + +\section{Example} +\label{app:example} \ No newline at end of file diff --git a/appendix/appendix.tex b/appendix/appendix.tex index 086af11..464a38a 100644 --- a/appendix/appendix.tex +++ b/appendix/appendix.tex @@ -1,13 +1,5 @@ %!TEX root = ../main.tex -\addchap{Anhang} -\label{appendix} - -% create a table of appendices here manually like this: -% \contentsline{section}{\numberline{1}AppendixTitle}{\pageref{app:appendixlabel}}{app:appendixlabel} - -\newpage - % input the appendix files here like this: -% \input{appendix/appendix1.tex} -% \newpage +\input{appendix/01_example.tex} +\newpage diff --git a/config.tex b/config.tex index f9c2acd..6a95926 100644 --- a/config.tex +++ b/config.tex @@ -21,6 +21,22 @@ bottom=25mm ]{geometry} +% Anhang inklusive Anhangsverzeichnis +\usepackage{titletoc} +\newenvironment{custom_appendix}{% + \renewcommand{\thechapter}{\MakeUppercase{\Alph{chapter}}}% + \setcounter{chapter}{1} + \addchap{Anhang} + \startcontents[sections] + \section*{Anhangsverzeichnis} + \printcontents[sections]{l}{1}{\setcounter{tocdepth}{2}} + \newpage +}{ + \stopcontents[sections] + \renewcommand{\thechapter}{\arabic{chapter}}% + \setcounter{chapter}{1} +} + % Reduzierung der Abstände zwischen Überschriften und Text \RedeclareSectionCommand[afterskip=.0001\baselineskip]{section} \RedeclareSectionCommand[afterskip=.0001\baselineskip]{subsection} diff --git a/main.tex b/main.tex index 216791a..e5a00d9 100644 --- a/main.tex +++ b/main.tex @@ -78,8 +78,10 @@ \newpage % appendix - uncomment if needed - % \input{appendix/appendix.tex} - % \newpage + % \begin{custom_appendix} + % \input{appendix/appendix.tex} + % \newpage + % \end{custom_appendix} % affirmation \input{additionals/affirmation.tex} diff --git a/templates/markdown.main.tex b/templates/markdown.main.tex index a1a90cd..f0711a4 100644 --- a/templates/markdown.main.tex +++ b/templates/markdown.main.tex @@ -74,8 +74,10 @@ \newpage % appendix - uncomment if needed - % \input{appendix/appendix.tex} - % \newpage + % \begin{custom_appendix} + % \input{appendix/appendix.tex} + % \newpage + % \end{custom_appendix} % affirmation \input{additionals/affirmation.tex}