-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreamble.tex
145 lines (125 loc) · 5.8 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
\errorcontextlines 999999
\usepackage[ngerman]{babel}
\usepackage[%
sopra-listings={encoding,cpalette,highlights},%
sopra-tables={cpalette}, color-palettes={addons},%
lecture-bibliography={biber,style=numeric-comp},%
util, lithie-boxes={germanenv,koma,overwrite},%
lithie-task-boxes={cpalette}, lecture-links={patchurl},%
lecture-personal-resize,
lecture-registers={disable}% would interfere with beamer
]{lithie-util}
\usepackage{forest}
\makeatletter
\sol@list@define@styles{%
{keywordA: \@declaredcolor{sol@colors@lst@keywordA}\bfseries},%
{keywordC: \@declaredcolor{sol@colors@lst@keywordB}\bfseries},%
}
\makeatother
\RestyleAlgo{plain}
\lstset{lineskip=5.5pt}
\lstfs{10}
\DefinePalette{Heaps}
{Grün,grünlich: RGB(37,126,99)}% gen viridian
{Magenta,magenta: RGB(138, 49, 104)}
{Gelb,gelblich: RGB(255, 200, 87)}
{Blau,bläulich: RGB(21, 92, 148)}
\SetShadeContrast{45}
\UsePalette{Heaps}
\usetheme[libs,nofootfade,centerfoot]{dividing-lines}
\SetColorProfile*{paletteA}{paletteB}{paletteC}
\usetikzlibrary{arrows.meta,decorations,decorations.pathreplacing,shapes.multipart,tikzmark,shapes.symbols}
\def\info#1{\bgroup\scriptsize\textcolor{gray}{(#1)}\egroup}
\SetAllLinkStyle{#1}
\def\fillfont{\def\mdseries@sf{medium}\sffamily}
\colorlet{lgray}{lightgray!48!white}
\tikzset{
ldesc/.style={gray,font=\sffamily\sbfamily},
lrel/.style={fill=white,rounded corners,minimum width=28mm,minimum height=7.5mm,align=center},
lrel2/.style={fill=white,rounded corners,minimum width=28mm,minimum height=7.5mm*2,align=center},
lsf/.style={fill=white,rounded corners,minimum width=28mm,minimum height=7.5mm*2,align=center,
rectangle split, rectangle split parts=2},
blob/.style={circle,draw, minimum size=1.9em,align=center},
lblob/.style={blob,writ,font=\fillfont,#1},%
lblob/.default={fill=lgray, draw=lgray,text=black},
every picture/.append style={line join=round,line cap=round},%
every node/.append style={font=\sffamily},%
lblock/.style={block,writ,font=\fillfont,#1},%
lblock/.default={fill=lgray, draw=lgray,text=black},
block/.style={rectangle,draw, align=center, minimum height=1.25em,rounded corners=1.55pt},%
}
\newcommand\parallelcontent[3][t]{%
\begin{columns}[#1]
\begin{column}{.475\linewidth}#2\end{column}\hfill
\begin{column}{.475\linewidth}#3\end{column}
\end{columns}
}
\usepackage[glows]{tikzpingus}
\usetikzlibrary{decorations.text,graphs}
\hypersetup{colorlinks=false}
\title{Fantastische Heaps}
\subtitle{\ldots\ und wo sie zu finden sind.\\Datastructure Love!}
\institute{SP, Universität Ulm}
\author{Florian Sihler}
\email{[email protected]}
\date{\today}
\outro{Ulm, \today}
\license[]{All rights reserved}
\def\PreTitlepage{\begingroup%
\let\oldinserttitle\inserttitle% allow it to be white on second slide
\let\oldinsertsubtitle\insertsubtitle% allow it to be white on second slide
\colorlet{PINGU@WHITE}{pingu@white}% hacksies for the whites
\only<2|handout:2>{\def\inserttitle{\color{pingu@white}\oldinserttitle}\def\insertsubtitle{\textcolor{pingu@white}{\oldinsertsubtitle}}}%
\onslide<2|handout:2>{%
\savebox0{\tikz{\pingu[lightsaber left=paletteC!90!white,left item angle=-20,eyes=shiny,right wing grab,tie=paletteA,tie dots,body=paletteA!20!black,lightsaber left outer glow factor=.09,headband]}}%
\begin{tikzpicture}[overlay,remember picture]%
% beamer does not support changes of full background easily. so we do hacksies
\pgfonlayer{background}
\path[fill,black!99] (current page.north west) rectangle (current page.south east);
\endpgfonlayer
\node[above right=.15cm,scale=.65,xshift=.15cm] (pingu) at(current page.south west) {\usebox0};
\node[below right,pingu@white,text width=.6\paperwidth,align=flush left] at(pingu.north east){Officially supported by the Pingu-Foundation for Emotional Support. There will be light and there will be cute waddlers!};
\end{tikzpicture}}%
}
\def\PostTitlepage{\endgroup}
\addbibresource{./references.bib}
\setcounter{tocdepth}{4}
\newsavebox\pinguA \newsavebox\pinguB \newsavebox\pinguC
\usepackage[link]{qrcode}
\outroright{\smash{\raisebox{1.33cm/2}{\qrcode[height=1.33cm]{https://github.com/EagleoutIce/Episode-Heaps}}}\begin{tikzpicture}[remember picture,overlay]
\node[above left,btdl@color@white,scale=.475] at (current page.south east) {\href{https://github.com/EagleoutIce/Episode-Heaps}{Slides and \LaTeX-sources on GitHub!}};
\end{tikzpicture}}
\newcommand*\heap[2][]{\downsize{\linewidth}{\begin{forest}for tree={lblob,minimum width=2.5em,s sep=4em-level*.5em,edge={line width=3pt,lgray},#1}#2\end{forest}}}
\makeatletter
% 4 empty => ship arbitrary with 5
\long\def\hsStep{\@ifstar\@hsStep\@@hsStep}
\long\def\@hsStep#1#2#3#4#5{\@@@hsStep{#1}{#2}{#3}{#4}{#5}{Kite-}}
\long\def\@@hsStep#1#2#3#4#5{\@@@hsStep{#1}{#2}{#3}{#4}{#5}{Kite-Kite}}
\long\def\@@@hsStep#1#2#3#4#5#6{%
\begin{center}
\savebox0{\heap{#1}}\parbox[c][12em]{16.25em}{\centering\scalebox{.9}{\usebox0}\vfill\null}\hfill\begin{tikzpicture}
\foreach[count=\i,remember=\i as \li (initially 0)] \l in {#2} {
\xdef\curmax{\i}
\ifnum\li=0
\node[lblock,minimum size=2.25em,fill=white,very thick,right,outer sep=0pt] (1) at (0,0) {\l};
\else
\node[lblock,minimum size=2.25em,fill=white,right,outer sep=0pt,very thick] (\i) at (\li.east) {\l};
\fi
}
\draw[lgray,rounded corners=1.55pt,ultra thick] (1.south west) rectangle (\curmax.north east);
\pgfinterruptboundingbox
\foreach \i in {1,...,\curmax} {
\ifnum\i=#3
\node[below=1mm,paletteA,font=\sbfamily,scale=.6] (d\i) at (\i.south) {\strut\the\numexpr\i-1};
\else
\node[below=1mm,gray,font=\sbfamily,scale=.6] (d\i) at (\i.south) {\strut\the\numexpr\i-1};
\fi
}
\ifx!#4! #5\else
\draw[gray,thick,#6] (d#4.south) to[bend right=20] (d#5.south);
\fi
\endpgfinterruptboundingbox
\end{tikzpicture}
\end{center}}
\makeatother
\hfuzz=5cm