This repository was archived by the owner on Dec 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.sty
More file actions
211 lines (159 loc) · 5.11 KB
/
template.sty
File metadata and controls
211 lines (159 loc) · 5.11 KB
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
% Package Information
\ProvidesPackage{template}[2017/12/18 v1.0]
%################## Packages ##################%
% Sprach- und Kodierungseinstellungen
\RequirePackage[utf8]{inputenc}
\RequirePackage[ngerman]{babel}
% Schriftart
\RequirePackage[default,bold]{sourceserifpro}
\RequirePackage[T1]{fontenc}
% Literaturverzeichnis
\RequirePackage{cite}
% Grafikpakete für Bilder und Vektorgraphiken
\RequirePackage{graphicx}
\RequirePackage{float}
% Für Euro Symbole
\RequirePackage{eurosym}
% Abkürzungsverzeichnis
\RequirePackage[printonlyused]{acronym}
% Um letzte Seite zu ermitteln
\RequirePackage{lastpage}
% Für Kopfzeile
\RequirePackage{fancyhdr}
% Für Überschriftenformatierung
\RequirePackage{titlesec}
% Für Zugriff auf Author, Datum und Titel
\RequirePackage{titling}
% Für Tabellen
\RequirePackage{booktabs}
\RequirePackage[table,xcdraw]{xcolor}
\RequirePackage[ngerman,bordercolor=white,color=green,colorinlistoftodos]{todonotes}
% Für leftbar
\RequirePackage{framed}
% Für URLs
\RequirePackage{url}
% Hyperlink Package
\RequirePackage{hyperref}
\RequirePackage[all]{hypcap}
% Weitere Pakete
\RequirePackage{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
%################## Configs ##################%
% Stil des Literaturverzeichnisses festlegen (möglich: plain, abbrv, alpha, unsrt, natbib)
\bibliographystyle{plain}
% Nummerierungstiefe einstellen
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
% Dokumentformatierung (möglich: plain, empty, headings, myheadings)
\pagestyle{fancy}
% Seitenzahlenstil (möglich: arabic, roman, Roman, alph, Alph)
\pagenumbering{arabic}
% Zeilenumbruch in URLs
\def\UrlBreaks{\do\/\do-}
% Fancy Pagestyle ändern
\fancypagestyle{plain}{}
% Platzhalter für die Bookmarks
\newcommand{\titlepagebookmark}{\pdfbookmark[0]{Titelseite}{Titelseite}}
\newcommand{\tocpagebookmark}{\pdfbookmark[0]{Inhaltsverzeichnis}{Inhaltsverzeichnis}}
% Kopfzeilenstil: Chapter/Section Seitenzahl
\DeclareOption{chapter}{\renewcommand{\chaptermark}[1]{\markboth{#1}{}}}
\DeclareOption{section}{
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\renewcommand{\titlepagebookmark}{\pdfbookmark[1]{Titelseite}{Titelseite}}
\renewcommand{\tocpagebookmark}{\pdfbookmark[1]{Inhaltsverzeichnis}{Inhaltsverzeichnis}}
}
\ExecuteOptions{chapter}
% Trennlinien für Kopfzeile
\DeclareOption{header-line}{\renewcommand{\headrulewidth}{0.4pt}}
\DeclareOption{no-header-line}{\renewcommand{\headrulewidth}{0pt}}
\ExecuteOptions{header-line}
% Trennlinien für Fußzeile
\DeclareOption{footer-line}{\renewcommand{\footrulewidth}{0.4pt}}
\DeclareOption{no-footer-line}{\renewcommand{\footrulewidth}{0pt}}
\ExecuteOptions{footer-line}
% Neue Bedingung für das Tauschen der Kopf- und Fußzeile
\newif\if@switchhf\@switchhffalse
\DeclareOption{switchhf}{\@switchhftrue}
% Platzhalter für das Fach und das Thema
\newcommand{\subject}{\textbackslash renewcommand\{\textbackslash subject\}\{Fachname\}}
\newcommand{\topic}{\textbackslash renewcommand\{\textbackslash topic\}\{Fachname\}}
% Platzhalter für die Seitennummer
\newcommand{\printpage}{\thepage}
\DeclareOption{last-page}{\renewcommand{\printpage}{\thepage/\pageref{LastPage}}}
% Blocksatzformatierung
\DeclareOption{block}{\addtolength\emergencystretch{0.2\linewidth}}
% Text "Kapitel" deaktivieren
\titleformat{\chapter}{\bfseries\Huge}{\thechapter\quad}{0em}{}
% Hurenkinder und Schusterjungen verhindern
\clubpenalty10000
\widowpenalty10000
\displaywidowpenalty=10000
% Optionen verarbeiten
\ProcessOptions\relax
%################## Seitenlayout ##################%
% Abstand zur Randnotiz
\setlength{\marginparsep}{0.5cm}
\setlength{\marginparwidth}{3cm}
%################## Bedingungen ##################%
% Tauschen der Kopf- und Fußzeile
\if@switchhf
% Kopfzeile
\fancyhead{} % Kopfzeile leeren
\lhead{\subject}
\rhead{\topic}
% Fußzeile
\fancyfoot{} % Fußzeile leeren
\lfoot{\leftmark}
\rfoot{\printpage}
\else
% Kopfzeile
\fancyhead{} % Kopfzeile leeren
\lhead{\leftmark}
\rhead{\printpage}
% Fußzeile
\fancyfoot{} % Fußzeile leeren
\lfoot{\subject}
\rfoot{\topic}
\fi
%################## Farben ##################%
\definecolor{light-gray}{gray}{0.80}
%################## Makros ##################%
% Bild (1: Pfad, 2: Bildunterschrift, 3: Breite, 4: Label)
\newcommand{\image}[4]{
\begin{figure}[H]
\centering
\includegraphics[width=#3\linewidth]{#1}
\caption{#2}
\label{#4}
\end{figure}
}
% Bild (1: Pfad, 2: Breite)
\newcommand{\smallimage}[2]{
\begin{figure}[H]
\centering
\includegraphics[width=#2\linewidth]{#1}
\end{figure}
}
% Automatisches Bookmark für die Titelseite
\newcommand{\maketitlenew}{
\titlepagebookmark
\maketitle
}
\newcommand{\tableofcontentsnew}{
\tocpagebookmark
\tableofcontents
}
\newcommand{\quotes}[1]{\glqq #1\grqq{}}
%################## Umgebungen ##################%
% grauer Balken links (für \cit)
\renewenvironment{leftbar}[1][\hsize] {
\def\FrameCommand{
{\color{light-gray}\vrule width 3pt}
\hspace{10 pt}
}
\MakeFramed{\hsize#1\advance\hsize-\width\FrameRestore}
}
{\endMakeFramed}
% end of the package
\endinput