From b576e4d68fc0d73aff93bf322ebc47be84ea7c59 Mon Sep 17 00:00:00 2001 From: Maximilian Kenfenheuer Date: Wed, 16 Dec 2020 20:57:07 +0100 Subject: [PATCH] Fix Appendix --- .gitignore | 3 ++- appendix/01_example.tex | 4 ++++ appendix/appendix.tex | 12 ++---------- config.tex | 16 ++++++++++++++++ main.tex | 6 ++++-- 5 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 appendix/01_example.tex 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..61566e2 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}