-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.tex
214 lines (186 loc) · 7.68 KB
/
configuration.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
%% Basic Packages
% center stuff and maybe add bibliography? :D
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
\RequirePackage[defaultfam,light,tabular,lining]{montserrat}
\RequirePackage{sfmath,tikz,qrcode,tikz-qr}
% we need it anyways - will load xcolor
\usetikzlibrary{calc, arrows.meta, decorations, decorations.pathreplacing, graphs}
\RequirePackage[english,main=ngerman]{babel}
\RequirePackage{microtype,csquotes}
\RequirePackage[noguardspace]{sopra-listings}
\RequirePackage{sopra-models,sopra-attachments,array,booktabs,colortbl}
\solLoadLanguage{bash}
\RequirePackage[biber,style=numeric-comp]{lecture-bibliography}
%% Theme
\usepackage[emblem,theorems]{beamerthemecolorful-dream}
\colorlet{@primary}{btcd@color@primary}
\colorlet{@secondary}{btcd@color@secondary}
\colorlet{@alerted}{btcd@color@alerted}
\colorlet{@alternative}{btcd@color@alternative}
\colorlet{@black}{btcd@color@black}
\colorlet{@white}{btcd@color@white}
\colorlet{qr@fancy@gradient@tl}{@primary!96!@white!85!teal}
\colorlet{qr@fancy@gradient@br}{purple!54!@secondary}
\makeatletter
\lstcolorlet{keywordA}{@primary}
\lstcolorlet{keywordB}{@secondary}
\lstcolorlet{keywordC}{@secondary}
\lstcolorlet{comments}{@primary!20!@white!50!@black}
\lstcolorlet{numbers}{@alerted!90!@primary!90!@black}
\lstcolorlet{literals}{@alternative}
\sol@list@define@styles{%
{keywordA: \@declaredcolor{sol@colors@lst@keywordA}\bfseries},%
{keywordB: \@declaredcolor{sol@colors@lst@keywordB}},%
{keywordC: \@declaredcolor{sol@colors@lst@keywordC}},%
}
%% Extra Defs
% Taken from lilly code extensions
\newenvironment{lillyHighlight}[1][]
{\begingroup\tikzset{lilly@Highlight@par/.style={#1}}\begin{lrbox}{\@tempboxa}}
{\end{lrbox}\lilly@lsthighlight@box[lilly@Highlight@par]{\@tempboxa}\endgroup}
\newcommand*\@lillyLstHL[1][]{%
\begin{lillyHighlight}[#1]\bgroup\aftergroup\lilly@lsthighlight@endenv%
}
\def\lilly@lsthighlight@endenv{\end{lillyHighlight}\egroup}
\newcommand*\lilly@lsthighlight@box[2][]{%
\tikz[#1]{%
\pgfpathrectangle{\pgfpoint\p@\z@}{\pgfpoint{\wd #2}{\ht #2}}%
\pgfusepath{use as bounding box}%
\node[anchor=base west, outer sep=\z@,inner xsep=\p@, inner ysep=-1.105\p@, rounded corners=1.65\p@, minimum height=\ht\strutbox+\p@,#1]{\raisebox\p@{\strut}\strut\usebox{#2}};
}%
}
\def\lstHLZWS{\@lillyLstHL[fill=@primary!21,draw=@primary!21]}
\def\lstHLVGL{\@lillyLstHL[fill=@alerted!36!@primary!21,draw=@alerted!36!@primary!21]}
\def\lstHLINK{\@lillyLstHL[fill=@alternative!60!@primary!21,draw=@alternative!60!@primary!21]}
\def\lstHLDEK{\@lillyLstHL[fill=@secondary!60!@primary!21,draw=@secondary!60!@primary!21]}
\lstdefinelanguage{xJava}{
language=lJava,
moredelim=**[is][{\lstHLZWS}]{|zws|}{|zws|},%
moredelim=**[is][{\lstHLVGL}]{|vgl|}{|vgl|},%
moredelim=**[is][{\lstHLINK}]{|inc|}{|inc|},%
moredelim=**[is][{\lstHLDEK}]{|dec|}{|dec|}%
}
\def\linksort#1{\hyperlink{mrk:sort-#1}{#1}}
\def\alglabel#1{\hypertarget<1>{mrk:sort-#1}{}}
\def\<{\ensuremath{\langle}}\def\>{\ensuremath{\rangle}}
\def\mto{\ensuremath{\to}}\def\mprec{\ensuremath{\prec}}
%% General
\usepackage{lecture-algorithms,lilly-dir,xfrac}
\SetFolderFileSameIndent
\setcounter{tocdepth}{4}
\newcounter{ctrtasks}
\def\Task#1{\only<1>{\stepcounter{ctrtasks}\pdfbookmark[4]{Aufgabe \thectrtasks: #1}{id@bkmrk@e@\thectrtasks}}}
\def\Time#1{\ifx!#1!\else\null\hfill(#1\;\ifnum#1=1\relax Minute\else Minuten\fi)\fi}
\colorlet{solidF}{@primary}
\colorlet{fillA}{@primary!15!white}
\colorlet{fillB}{@secondary!15!white}
\colorlet{fillC}{@alerted!15!white}
\long\def\hl#1{\textcolor{@secondary}{#1}}
\long\def\imp#1{{\sbfamily#1}}
\let\say\enquote
\def\widei{\itemsep1em}
\newlength\@bdescdyn \@bdescdyn=3.5\p@ \@plus\z@ \@minus2\p@
\appto\@@description{\itemsep=\@bdescdyn}
\newcommand\twosplit[3][t]{%
\begin{columns}[#1]
\begin{column}{.475\linewidth}#2\end{column}\hfill
\begin{column}{.475\linewidth}#3\end{column}
\end{columns}}
\def\O{\ensuremath{\mathcal{O}}}
\let\emptyset\varnothing
\AtBeginDocument{%
\tikzumlset{fill class=@white,font=\small\ttfamily,fill object=@white}%
\attachfilesetup{color=@primary,author={Florian Sihler}}%
}
\usepackage[chess]{eagle-maps}
\usepackage[glows,manual-layers]{tikzpingus}
\def\sbfamily{\fontseries{sb}\selectfont}
%% TikZ
\tikzset{
block/.style={rectangle,draw,#1,font=\@declaredcolor{@black},minimum height=\baselineskip,execute at begin node={\strut},rounded corners=\p@},
block/.default=solidF,
iblock/.style={block=@primary,fill=@primary!21!@white},
ball/.style={circle,draw,#1,font=\@declaredcolor{@black}},
iball/.style={ball=@primary,fill=@primary!21!@white},
oball/.style={ball=@secondary,fill=@secondary!21!@white},
ball/.default=solidF, link/.style={-Kite},
enode/.style={inner sep=\z@},%
every picture/.append style={line join=round,line cap=round}%
}
\def\mtx@blk{X}
\def\mtx@k{6mm}
% calculate the number of steps required to stay visible
\mode<presentation>{
\def\mtx@split@gol#1|handout:#2\@nil{\the\numexpr#1-\beamer@slideinframe\relax}
\def\mtx@split@tar#1|handout:#2\@nil{}
}\mode<handout>{% TODO: for handout, subtract handout trigger ids
\def\mtx@split@gol#1|handout:#2\@nil{%
\ifnum\beamer@slideinframe=1
\the\numexpr#1-\triga\relax
\else\ifnum\beamer@slideinframe=2
\the\numexpr#1-\trigb\relax
\else\ifnum\beamer@slideinframe=3
\the\numexpr#1-\trigc\relax
\else\ifnum\beamer@slideinframe=4
\the\numexpr#1-\trigd\relax
\else\ifnum\beamer@slideinframe=5
\the\numexpr#1-\trige\relax
\ifnum\beamer@slideinframe=6
\the\numexpr#1-\trigf\relax
\fi\fi\fi\fi\fi\fi
}
\let\mtx@split@tar\mtx@split@gol
}
\tikzset{MTX@BLK/.style={rectangle,minimum size=\mtx@k,inner sep=\z@,outer sep=\z@,fill=#1,draw=@primary!90!white,line width=.66\p@}}
\def\Matrix#1#2#3#4#5#6#7#8#9{%
\def\triga{#4}\def\trigb{#5}\def\trigc{#6}\def\trigd{#7}\def\trige{#8}\def\trigf{#9}
\scope[scale=1.4,every node/.append style={transform shape}]
\scope
\clip[rounded corners=\p@] (.5*\mtx@k, -.5*\mtx@k) rectangle ++(#2*\mtx@k, -#3*\mtx@k);
\foreach[count=\y] \line in {#1} {
\foreach[count=\x] \tar/\gol/\ded in \line {
\ifx\tar\mtx@blk
\node[MTX@BLK=gray!38!white] (\x-\y) at (\x*\mtx@k, -\y*\mtx@k) {};
\else
\edef\mtx@tmp{\gol}%
% overdraw me baby
\node[MTX@BLK=white,text=lightgray] (\x-\y) at (\x*\mtx@k, -\y*\mtx@k) {\footnotesize\expandafter\mtx@split@tar\mtx@tmp\@nil};
\only<\tar>{
\node[MTX@BLK=@alternative!30!white,text=gray] (\x-\y) at (\x*\mtx@k, -\y*\mtx@k) {\footnotesize\expandafter\mtx@split@gol\mtx@tmp\@nil};
}
\only<\gol>{
\node[MTX@BLK=@secondary!40!white] (\x-\y) at (\x*\mtx@k, -\y*\mtx@k) {};
}
\only<\ded>{
\node[MTX@BLK=gray!20!white] (\x-\y) at (\x*\mtx@k, -\y*\mtx@k) {\T{\color{gray!80!white}\textbullet}};
}
\fi\
}
}
\endscope
\draw[rounded corners=\p@,@primary!90!white,line width=1.65\p@] (.5*\mtx@k, -.5*\mtx@k) rectangle ++(#2*\mtx@k, -#3*\mtx@k);
\endscope}
%% Heap and Stack
\usepackage{lecture-heap-n-stack}
\let\lhnselementformat\texttt
\def\lhnsielementformat#1{\textbf{\vphantom{A}#1}}
\let\lhnselementbox\pbox
\lhns@minborderheight=4.75cm
\lhns@borderbuff=1.33em
\tikzset{lhns@impstyle/.style={}}%
%% Different Versions
\usepackage{lithie-profiles}
\RegisterProfile{short}{}
\newif\ifull
\ifprofile{default}{%
\def\profileshorttitle{Volle Version}\ulltrue
}{\ifprofile{short}{%
\def\profileshorttitle{Kurze Version}\ullfalse
}{}}
% => empty übungsaufgaben (gray + no link)
\ifull\let\fullsubsection\subsection
\else\let\fullsubsection\fakesubsection\fi
\makeatother
\addbibresource{data/references.bib}
\nocite{gh:tikzpingus, gh:recursion, gh:heaps, gh:traversals}