-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.tex
281 lines (238 loc) · 9.66 KB
/
preamble.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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
% set PDF output version to 1.7
\pdfminorversion=7
\documentclass[
fontsize=12pt, % Schriftgroesse
paper=a4, % Papiergroesse
captions=tableabove, % Beschriftungen fuer Tabellen oberhalb
titlepage=firstiscover, % Titelseite ist Umschlagseite
BCOR=5mm, % Korrektur fuer Bundsteg
toc=listof, % Abbildungs- und Tabellenverzeichnis im Inhaltsverzeichnis
open=right, % Kapitel beginnen auf rechter Seite
]{scrreprt}
\KOMAoptions{DIV=12}
% ----------------------------------------------------
% Essential packages
% ----------------------------------------------------
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% ----------------------------------------------------
% Packages for layout adjustments
% ----------------------------------------------------
% Adjust line spacing
\usepackage{setspace}
% Publication quality tables
\usepackage{booktabs}
% ----------------------------------------------------
% Fonts
% ----------------------------------------------------
\usepackage{lmodern}
\usepackage{fix-cm}
\rmfamily
\DeclareFontShape{T1}{lmr}{b}{sc}{<->ssub*cmr/bx/sc}{}
\DeclareFontShape{T1}{lmr}{bx}{sc}{<->ssub*cmr/bx/sc}{}
\usepackage{roboto}
\setkomafont{subject}{\large}
\setkomafont{title}{\LARGE\bfseries} % \robotocondensed yields font warning
\setkomafont{subtitle}{\Large} % \robotocondensed yields font warning
\setkomafont{author}{\Large}
\setkomafont{date}{\small}
%\addtokomafont{publishers}{\normalsize\robotocondensed}
% ----------------------------------------------------
% Colors
% ----------------------------------------------------
\usepackage{graphicx}
\usepackage[svgnames]{xcolor}
\definecolor{darkgreen}{rgb}{0.23,0.46,0.23}
\definecolor{smdsblue}{RGB}{0,69,134}
% ----------------------------------------------------
% Internal commands
% ----------------------------------------------------
\usepackage{etoolbox}
\makeatletter
\newcommand{\degree}[1]{\gdef\@degree{#1}}
\newcommand{\course}[1]{\gdef\@course{#1}}
\newcommand{\email}[1]{\gdef\@email{#1}}
\newcommand{\matrno}[1]{\gdef\@matrno{#1}}
\newcommand{\institute}[1]{\gdef\@institute{#1}}
\newcommand{\director}[4]{%
\gdef\@director@name{#1}%
\gdef\@director@title{#2}%
\gdef\@director@firstaffiliation{#3}%
\gdef\@director@secondaffiliation{#4}%
}
\newcommand{\coordinator}[4]{%
\gdef\@coordinator@name{#1}%
\gdef\@coordinator@title{#2}%
\gdef\@coordinator@firstaffiliation{#3}%
\gdef\@coordinator@secondaffiliation{#4}%
}
\newcommand{\organization}[3]{%
\gdef\@organization@name{#1}%
\gdef\@organization@address{#2}%
\gdef\@organization@city{#3}%
}
\makeatother
\input{settings}
% ----------------------------------------------------
% Multi-lingual documents with Babel
% ----------------------------------------------------
\usepackage{csquotes}
\usepackage[\languages]{babel}
% ----------------------------------------------------
% Hyperlinks in PDF documents
% ----------------------------------------------------
\usepackage[%
bookmarks=true, %
bookmarksopenlevel=1, %
bookmarksopen=true, %
bookmarksnumbered=true, %
plainpages=false, % correct hyperlinks
pdfpagelabels=true, % view TeX pagenumber in PDF reader
colorlinks=true, % color highlight links
allcolors=black, % make all links black by default
urlcolor=smdsblue, % URL color
]{hyperref}
\makeatletter
\AtEndPreamble{
\hypersetup{
pdftitle=\@title,
pdfauthor=\@author
}
}
\makeatother
% Provides a solution to the problem with hyperref that links
% to floats actually anchor to the place below the float's caption,
% instead of anchoring to the beginning of the float
\usepackage[all]{hypcap}
% ----------------------------------------------------
% Code listings
% ----------------------------------------------------
\definecolor{commentgreen}{rgb}{0,0.6,0}
\definecolor{stringmauve}{rgb}{0.58,0,0.82}
\usepackage{listings}
\renewcommand*{\lstlistlistingname}{List of Listings}
\lstset{%
frame=single, % Add a single line frame around listings
breaklines=true, % Automatic line breaks
backgroundcolor=\color{gray!3}, % Slight gray shade for listings
rulecolor=\color{black!30}, % Gray frame outline
xleftmargin=.05\textwidth, % Extra left margin
xrightmargin=.05\textwidth, % Extra right margin
basicstyle=\footnotesize\ttfamily, % General font style for listings
keywordstyle=\bfseries\color{blue}, % Font style for keywords
commentstyle=\color{commentgreen}, % Font style for comments
stringstyle=\color{stringmauve}, % Font style for string literals
numbers=left, % Show line numbers
stepnumber=1, % Step increments for line numbers
numberstyle={\sffamily\tiny\color{gray}}, % Font style for line numbers
numbersep=2em, % Space between line numbers and code
% captionpos=b, % Caption below listing
}
% ----------------------------------------------------
% Bibliography management
% ----------------------------------------------------
\usepackage[%
backend=biber, % Use biber to process bibliographies
natbib=true, % Provide natbib-compatible citation commands
%sorting=none, % Sort citations by occurrence in the document
sorting=nty, % Sort after name, title, year
style=numeric-comp, % Use compressed numeric citations, e.g. [1-3; 5]
block=space, % Add a little spacing inside bibliography entries
]{biblatex}
\addbibresource{literature.bib}
% Use main body font for URLs in bibliography
\urlstyle{same}
% Allow linebreaks in URLs to prevent really ugly overfull hboxes
\setcounter{biburllcpenalty}{7000}
\setcounter{biburlucpenalty}{8000}
% ----------------------------------------------------
% Localization / translations
% ----------------------------------------------------
\usepackage{translations}
% Generic translation used in template
\NewTranslation{ngerman}{coordinator}{Praktikumskoordinator}
\NewTranslation{ngerman}{director}{Praktikumsbetreuer}
\NewTranslation{ngerman}{matrno}{Matrikelnummer}
\NewTranslation{ngerman}{institute}{Computer Science Department\\École Polytechnique}
\NewTranslation{ngerman}{hostorga}{Host-Organisation}
\NewTranslation{ngerman}{duedate}{Abgabedatum}
\NewTranslation{ngerman}{dates}{Daten}
\NewTranslation{ngerman}{regularlit}{Literatur}
\NewTranslation{ngerman}{onlinelit}{Online-Quellen}
\NewTranslation{ngerman}{honesty@title}{Eidesstattliche Erkl\"{a}rung}
\NewTranslation{ngerman}{honesty@body}{%
Ich versichere, dass ich die vorliegende Arbeit ohne fremde Hilfe und ohne Benutzung anderer
als der angegebenen Quellen angefertigt habe, und dass die Arbeit in gleicher oder \"{a}hnlicher
Form noch keiner anderen Pr\"{u}fungsbeh\"{o}rde vorgelegen hat.\endgraf
Alle Ausf\"{u}hrungen der Arbeit, die w\"{o}rtlich oder sinngem\"{a}\ss{} \"{u}bernommen wurden, sind als solche
gekennzeichnet.
}
% English fallback text
\NewTranslationFallback{coordinator}{Internship coordinator}
\NewTranslationFallback{director}{Internship director}
\NewTranslationFallback{matrno}{Matriculation number}
\NewTranslationFallback{institute}{Computer Science Department\\École Polytechnique}
\NewTranslationFallback{hostorga}{Host organization}
\NewTranslationFallback{duedate}{Submission date}
\NewTranslationFallback{dates}{Dates}
\NewTranslationFallback{regularlit}{Literature}
\NewTranslationFallback{onlinelit}{Online resources}
\NewTranslationFallback{honesty@title}{Declaration of Academic Honesty}
\NewTranslationFallback{honesty@body}{%
Hereby, I declare that I have composed the presented paper independently on my own and without
any other resources than the ones indicated. All thoughts taken directly or indirectly from external
sources are properly denoted as such.\endgraf
This paper has neither been previously submitted to another authority nor has it been published yet.
}
% ----------------------------------------------------
% Additional packages and configuration
% ----------------------------------------------------
% Landscape pages
%\usepackage{lscape}
% Resolve float warnings referring to the ToC
\usepackage{tocbasic}
\usepackage{scrhack}
% Bibliography numbering independent of ToC and lists (of figures, tables, listings)
\usepackage{notoccite}
% Subfigures
\usepackage{caption}
\usepackage{subcaption}
% Improvements to math mode
\usepackage{amsmath}
\usepackage{amssymb}
% Table improvements
%\usepackage{longtable}
%\usepackage{multirow}
\usepackage{array}
\newcolumntype{P}[1]{>{\centering\arraybackslash}m{#1}} % Centered column with fixed width
\newcommand{\tabitem}[1]{{\textbullet}~{#1}}
\newcommand{\rotatecell}[1]{\begin{tabular}{@{}c@{}}\rotatebox[origin=c]{90}{#1}\end{tabular}}
% todonotes: Adds todo notes
%\setlength{\marginparwidth}{2cm}
%\usepackage[english]{todonotes}
% glossaries: Adds possibility to create a glossary
\usepackage[toc, automake, acronyms, nomain, shortcuts]{glossaries}
\makeglossaries
\GlsSetQuote{+}
% Footnote enhancements
% Don't reset footnote numbering for every chapter
\counterwithout{footnote}{chapter}
% Don't split footnote over several pages
\interfootnotelinepenalty=10000
% Enable emergency line breaks to prevent over-full boxes
\emergencystretch=1em
% Suppress PDF group warning, has no bad effect
\pdfsuppresswarningpagegroup=1
% Checkmark and crossmark
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}
\newcommand{\xmark}{\ding{55}}
% Additional cross referencing tools, like e.g. lowercase nameref
\usepackage{crossreftools}
% Intelligent cross-referencing
% Note: Must be loaded at end of preamble (esp. after hyperref)
\usepackage[nameinlink,noabbrev]{cleveref}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "Report"
%%% End: