-
Notifications
You must be signed in to change notification settings - Fork 5
/
vorlage.tex
252 lines (225 loc) · 7.17 KB
/
vorlage.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
%! LaTeX Vorlage
\documentclass[12pt, fleqn, captions=nooneline, titlepage, footsepline, headsepline, toc=sectionentrywithdots, listof=entryprefix, bibliography=totoc]{scrartcl}
\usepackage{silence} %unnötige Warnungen unterdrücken
\WarningFilter{latex}{You have requested}
\WarningFilter{scrlayer-scrpage}{\headheight to low}
\WarningFilter{scrlayer-scrpage}{\footheight to low}
\WarningFilter{scrlayer-scrpage}{Very small head height detected}
\ProvidesPackage{metadaten}
\usepackage{metadaten}
\usepackage{tocbasic}
\usepackage[ngerman]{babel}
\usepackage[backend=biber, style=authortitle, isbn=false]{biblatex}
%! Das Inhaltsverzeichnis wird an dieser Stelle formatiert.
\RedeclareSectionCommands[tocindent=0pt]{section, subsection, subsubsection}
\RedeclareSectionCommands[tocnumwidth=45pt]{section, subsection, subsubsection}
%! Formatierung aller Verzeichnisse
\renewcaptionname{ngerman}{\refname}{Quellenverzeichnis}
\setuptoc{toc}{totoc}
\setuptoc{lof}{totoc}
\setuptoc{lot}{totoc}
\renewcommand*\listoflofentryname{\bfseries\figurename}
\BeforeStartingTOC[lof]{\renewcommand*\autodot{\space\space\space\space}}
\addtokomafont{captionlabel}{\bfseries}
\renewcommand*\listoflotentryname{\bfseries\tablename}
\BeforeStartingTOC[lot]{\renewcommand*\autodot{\space\space\space\space}}
%? Anhangsverzeichnis
\providecaptionname{ngerman}{\listofatocentryname}{Anhang}
\DeclareTOCStyleEntry[
level=0,
indent=50pt,
numwidth=5cm,
entrynumberformat={Anlage}
]{tocline}{atoc}
\makeatletter
\AfterTOCHead[atoc]{\let\if@dynlist\if@tocleft}
\newcommand*{\useappendixtocs}{
\renewcommand*{\ext@toc}{atoc}
\RedeclareSectionCommands[tocindent=0pt]{section, subsection, subsubsection}
\RedeclareSectionCommands[tocnumwidth=85pt]{section, subsection, subsubsection}
\addtokomafont{sectionentry}{\mdseries}
\renewcommand*\listoflofentryname{\mdseries}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\@dotsep}{10000}
}
\newcommand*{\usestandardtocs}{
\renewcommand*{\ext@toc}{toc}
}
\makeatother
%! Ermöglicht die Ausgabe des aktuellen Titels
\usepackage{nameref}
\makeatletter
\newcommand*{\currentname}{\@currentlabelname}
\makeatother
%! Latex-Packages, die verwendet werden
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{tabularx}
\usepackage{setspace}
\usepackage{booktabs}
\usepackage{svg}
\usepackage{graphicx}
\usepackage{float}
\usepackage[a4paper,lmargin={2.5cm},rmargin={2.5cm},tmargin={2cm},bmargin={2cm}]{geometry}
\usepackage{csquotes}
%! Schriftart
\usepackage{helvet}
\usepackage{microtype}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[
hidelinks,
pdftitle={\titel},
pdfsubject={\kurzbeschreibung},
pdfauthor={\autoren},
]{hyperref}
\usepackage[numbered]{bookmark}
\usepackage{acronym}
\usepackage{caption}
\renewcommand*{\aclabelfont}[1]{\acsfont{#1}} %Abkürzungsverzeichnis - Formatierung
\usepackage{listings} %zB zum korrekten anzeigen von BASH-Befehlen
\lstset{ %listings Einstellungen
breaklines=true,
postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
}
%! Caption um Tabellen und Abbildungen richtig zu beschriften
\usepackage{caption}
\captionsetup{labelsep=none}
\renewcommand*{\figureformat}{%
\figurename~\thefigure%
\autodot{\space\space\space}
}
\renewcommand*{\tableformat}{%
\tablename~\thetable%
\autodot{\space\space\space}
}
%! Formatierung des Literaturverzeichnis
\DeclareFieldFormat{url}{In: \url{#1}}
\DeclareFieldFormat{urldate}{\space\mkbibparens{#1}}
\urlstyle{same}
\DeclareNameFormat{author}{%
\nameparts{#1}%
\usebibmacro{name:family-given}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}%
}
\DeclareFieldFormat{title}{#1}
\renewcommand{\multinamedelim}{\addsemicolon\space}
\renewcommand{\finalnamedelim}{\addsemicolon\space}
\renewcommand{\labelnamepunct}{\addcolon\space}
\renewcommand*{\finentrypunct}{}
\setlength\bibitemsep{\baselineskip}
\setlength\bibhang{0pt}
%! Formatierung der Fußnotenzitate / Literaturverzeichnis
\renewcommand*{\newunitpunct}{\addcomma\space}
%? Normales Zitat...
\DeclareCiteCommand{\zitat}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}
\setunit{\addnbspace}
\bibhyperref{\printnames{labelname}}
\setunit{\labelnamepunct}
\newunit
\printfield{year}
\newunit
\printfield{pages}}
{\addsemicolon\space}
{\usebibmacro{postnote}}
%? Online Zitat
\DeclareCiteCommand{\onlinezitat}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}
\setunit{\addnbspace}
online:
\bibhyperref{\printnames{labelname}}
\setunit{\labelnamepunct}
\newunit
\printfield{year}
\printtext{(}\printfield{urlday}\printtext{.}\printfield{urlmonth}\printtext{.}\printfield{urlyear}\printtext{)}}
{\addsemicolon\space}
{\usebibmacro{postnote}}
\renewcommand{\bibfootnotewrapper}[1]{\bibsentence#1}
\DeclareMultiCiteCommand{\zitate}[\mkbibfootnote]{\footpartcite}{\addsemicolon\space}
\addbibresource{literatur.bib}
%! Kopf- und Fußzeile
\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\clearscrheadings
\clearscrplain
\renewcommand*{\sectionmarkformat}{}
\rohead{\textnormal{\headmark}}
\lofoot{}
\cofoot{}
\rofoot{\textnormal{Seite}~\pagemark}
\makeatletter
\usepackage{geometry}
\setlength{\footheight}{18.85002pt}
\geometry{a4paper,
left=25mm,right=25mm,top=20mm,bottom=20mm,
includehead=false,
includefoot=false,
headheight = \baselineskip,
headsep = \dimexpr\Gm@tmargin-\headheight-10mm,
footskip = \dimexpr\Gm@bmargin-10mm,
%showframe,
bindingoffset=0mm}
\setlength{\footheight}{\baselineskip}
\makeatother
%! Versuch von besseren Seitenumbrüchen
\clubpenalty = 10000
\widowpenalty = 10000
\displaywidowpenalty = 10000
\widowpenalties= 3 10000 10000 150
\linespread{1.3}
\newcommand\frontmatter{%
\cleardoublepage
%\@mainmatterfalse
\pagenumbering{Roman}}
\newcommand\mainmatter{%
\cleardoublepage
% \@mainmattertrue
\pagenumbering{arabic}}
\newcommand\backmatter{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
% \@mainmatterfalse
}
%! INHALTSVERZEICHNIS / ANHANGSSVERZEICHNIS
\DeclareNewTOC[%
%owner=\jobname,
tocentrystyle=tocline,
tocentryentrynumberformat=\PrefixBy{Anhang},
listname={Anhangverzeichnis}% Titel des Verzeichnisses
]{atoc}% Dateierweiterung (a=appendix, toc=table of contents)
\usepackage{xpatch}
\xapptocmd\appendix{%
\useappendixtocs
\listofatocs
\addcontentsline{toc}{section}{Anhangverzeichnis}
\newpage
\pagenumbering{gobble}
\pagestyle{scrheadings}
\clearscrheadings
\clearscrplain
\rohead{\textnormal{Anhang~\arabic{section}}}
\lohead{\textnormal{\currentname}}
\lofoot{}
\cofoot{}
\rofoot{}
}{}{}
% ? Ab hier beginnen eigene Befehle um den Umgang zu erleichtern
\newcommand{\absatz}{\vspace{12pt}\noindent}
\newcommand{\logisch}[1]{$``#1``$}
\newcommand{\bild}[3][1.0]{\begin{figure}[H]
\centering
\includegraphics[width=#1\columnwidth]{bilder/#2}
\caption{#3}
\label{fig:#3}
\end{figure}}
\newcommand{\fullref}[1]{(siehe Kapitel \ref{#1} \nameref{#1})}
\newcommand{\striche}[1]{\glqq #1\grqq{}}