-
Notifications
You must be signed in to change notification settings - Fork 16
/
template.tex
executable file
·188 lines (163 loc) · 4.51 KB
/
template.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
\documentclass[
a4paper,
oneside,
10pt,
fleqn,
headsepline,
toc=listofnumbered,
bibliography=totocnumbered]{scrartcl}
% deutsche Trennmuster etc.
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english, ngerman]{babel} % \selectlanguage{english} if needed
\usepackage{lmodern} % use modern latin fonts
% Custom commands
\newcommand{\AUTHOR}{Michael Wieland}
\newcommand{\INSTITUTE}{Hochschule für Technik Rapperswil}
\newcommand{\GITHUB}{https://github.com/michiwieland/hsr-zusammenfassungen}
\newcommand{\LICENSEURL}{https://en.wikipedia.org/wiki/Beerware}
\newcommand{\LICENSE}{
"THE BEER-WARE LICENSE" (Revision 42):
Michael Wieland wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return.
}
% Jede Überschrift 1 auf neuer Seite
\let\stdsection\section
\renewcommand\section{\clearpage\stdsection}
% Multiple Authors
\usepackage{authblk}
% Include external pdf
\usepackage{pdfpages}
% Layout / Seitenränder
\usepackage{geometry}
% Inhaltsverzeichnis
\usepackage{makeidx}
\makeindex
\usepackage{url}
\usepackage[pdfborder={0 0 0}]{hyperref}
\usepackage[all]{hypcap}
\usepackage{hyperxmp} % for license metadata
% Glossar und Abkürzungsverzeichnis
\usepackage[acronym,toc,nopostdot]{glossaries}
\glossarystyle{altlist}
\usepackage{xparse}
\DeclareDocumentCommand{\newdualentry}{ O{} O{} m m m m } {
\newglossaryentry{gls-#3}{
name={#4 : #5},
text={#5\glsadd{#3}},
description={#6},
#1
}
\makeglossaries
\newacronym[see={[Siehe:]{gls-#3}},#2]{#3}{#4}{#5\glsadd{gls-#3}}
}
\makeglossaries
% Mathematik
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{enumitem}
% Images
\usepackage{graphicx}
\graphicspath{{images/}} % default paths
% Boxes
\usepackage{fancybox}
%Tables
\usepackage{tabu}
\usepackage{booktabs} % toprule, midrule, bottomrule
\usepackage{array} % for matrix tables
% Multi Columns
\usepackage{multicol}
% Header and footer
\usepackage{scrlayer-scrpage}
\setkomafont{pagehead}{\normalfont}
\setkomafont{pagefoot}{\normalfont}
\automark*{section}
\clearpairofpagestyles
\ihead{\headmark}
\ohead{\AUTHOR}
\cfoot{\pagemark}
% Pseudocode
\usepackage{algorithmic}
\usepackage[linesnumbered,ruled]{algorithm2e}
% Code Listings
\usepackage{listings}
\usepackage{color}
\usepackage{beramono}
\definecolor{bluekeywords}{rgb}{0,0,1}
\definecolor{greencomments}{rgb}{0,0.5,0}
\definecolor{redstrings}{rgb}{0.64,0.08,0.08}
\definecolor{xmlcomments}{rgb}{0.5,0.5,0.5}
\definecolor{types}{rgb}{0.17,0.57,0.68}
\lstdefinestyle{visual-studio-style}{
language=[Sharp]C,
columns=flexible,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
commentstyle=\color{greencomments},
morekeywords={partial, var, value, get, set},
keywordstyle=\bfseries\color{bluekeywords},
stringstyle=\color{redstrings},
breaklines=true,
breakatwhitespace=true,
tabsize=4,
numbers=left,
numberstyle=\tiny\color{black},
frame=lines,
showspaces=false,
showtabs=false,
escapeinside={£}{£},
}
\definecolor{DarkPurple}{rgb}{0.4, 0.1, 0.4}
\definecolor{DarkCyan}{rgb}{0.0, 0.5, 0.4}
\definecolor{LightLime}{rgb}{0.3, 0.5, 0.4}
\definecolor{Blue}{rgb}{0.0, 0.0, 1.0}
\lstdefinestyle{cevelop-style}{
language=C++,
columns=flexible,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
keywordstyle=\bfseries\color{DarkPurple},
commentstyle=\color{LightLime},
stringstyle=\color{Blue},
escapeinside={£}{£}, % latex scope within code
breaklines=true,
breakatwhitespace=true,
showspaces=false,
showtabs=false,
tabsize=4,
morekeywords={include,ifndef,define},
numbers=left,
numberstyle=\tiny\color{black},
frame=lines,
}
\lstdefinestyle{eclipse-style}{
language=Java,
columns=flexible,
showstringspaces=false,
basicstyle=\footnotesize\ttfamily,
keywordstyle=\bfseries\color{DarkPurple},
commentstyle=\color{LightLime},
stringstyle=\color{Blue},
escapeinside={£}{£}, % latex scope within code
breaklines=true,
breakatwhitespace=true,
showspaces=false,
showtabs=false,
tabsize=4,
morekeywords={length},
numbers=left,
numberstyle=\tiny\color{black},
frame=lines,
}
\lstset{style=eclipse-style}
% Theorems \begin{mytheo}{title}{label}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\newtcbtheorem[number within=section]{definiton}{Definition}%
{fonttitle=\bfseries}{def}
\newtcbtheorem[number within=section]{remember}{Merke}%
{fonttitle=\bfseries}{rem}
\newtcbtheorem[number within=section]{hint}{Hinweis}%
{fonttitle=\bfseries}{hnt}