-
Notifications
You must be signed in to change notification settings - Fork 0
/
eidi_tut_compact.tex
122 lines (113 loc) · 4.83 KB
/
eidi_tut_compact.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
\errorcontextlines99999
\PassOptionsToClass{handout}{beamer}
\def\thpath{./data}
\RequirePackage{color-palettes}
\DefinePalette{Compact}
{Türkis,türkisfarben: RGB(21, 128, 112)}
{Türkis,türkisfarben: RGB(21, 128, 112)}
{Hellblau,hellbläulich: RGB(36, 102, 130)}
% {Blau,bläulich: RGB(21, 92, 148)}
{Grün,grünlich: RGB(21, 150, 90)}
\UsePalette{Compact}
\def\btdmopts{color=paletteA}%, footfade
\def\btdmmode{lightmode-fill}
\input{data/global.tex}
\UsePalette{Compact}
% re-inforce the palette in case compact changes
\usepackage{fmtcount}
\colorlet{MaterialHeaderColor}{paletteB!75!btdm@background}%
\colorlet{NextMaterialHeaderColor}{paletteB!65!btdm@background}%
\attachfilesetup{color=paletteB}
\fullfalse
\def\maxtut{11}
\titlenumber{0--\maxtut}
\title[Alle Tutorien 0--\maxtut]{Kompaktversion Tutorien\\\small Von pinguinreduzierten Tutorien 0--\maxtut}
\date{\sffamily\today}
\let\oldinputif\InputIfFileExists
\makeatletter
\usepackage{pgfcalendar}
\edef\semesterstartyear{2022}
\def\startkwofsemester{16} % used to detect year breaks
\newcount\@kwconverter
\newcount\@firstweekday
\DTMsetdatestyle{german}
\def\getstartdayofweek#1#2{% #1 is kw, #2 is day offset
% do we have a wraparoundi?
\ifnum#1<\startkwofsemester \edef\@year{\the\numexpr\semesterstartyear+1}%
\else\let\@year\semesterstartyear\fi
\pgfcalendardatetojulian{\@year-1-1}{\@kwconverter}\pgfcalendarjuliantoweekday\@kwconverter\@firstweekday
% we remove the first weekday as an offset
\edef\@day{\the\numexpr#1*7-\number\@firstweekday+#2\relax}%
\pgfcalendardatetojulian{\@year-1-1+\@day}{\@kwconverter}%
\pgfcalendarjuliantodate{\@kwconverter}\@year\@month\@day
\DTMdisplaydate\@year\@month\@day\m@ne\relax
}
\def\getKwRange#1{\getstartdayofweek{#1}0\,---\,\getstartdayofweek{#1}6}
% sub | title | path | file | num | KW
\newcommand\Load[5][]{%
\ifx!\detokenize{#1}!\def\@short{#2}\else\def\@short{#1}\def\beamer@shorttitle{#1}\fi
\SetNextSectionText{\getKwRange{#5}\\KW~#5}% 3 instead of two as this seems to pop more
\expandafter\section\expandafter[\@short]{#2}%
\begingroup\let\section\subsection
\let\subsection\subsubsection
% sub sub stays subsub?
% \let\subsubsection\paragraph
\gpreto\input@path{{#3/}}%
\def\curpath{#3/}% for rBash and rExecute
% we block global.tex form being loaded
% we keep the first for input
\def\InputIfFileExists##1##2##3{\relax \global\let\InputIfFileExists\oldinputif}%
% forbid additional loading:
\renewcommand*\usepackage[2][]{\typeout{gobble: ##1|##2}}
\renewcommand*\RequirePackage[2][]{\typeout{gobble: ##1|##2}}
% only fill if there is something?
\let\oldprintbibcommand\printBibCommand
\def\printBibCommand{\setbox0=\vbox{\oldprintbibcommand}\ifdim\wd0<3mm\relax \let\vfill\relax\else \box0\fi}%
\let\titleframe\relax % no extra titlepage
% get the date:
\typeout{Loading: #3/source_folien_#4.tex}
\begin{refsection}[#3/references.bib]% allow for sub bibliographies
\@input{#3/source_folien_#4.tex}
\ifnum#1=4\egroup\fi % FIXME: patching problems
\end{refsection}
\endgroup
}
% TODO: \outro soll die direkt ausgeben?
% update prepath
\setbeamercolor{section in toc}{fg=darkgray}
% we do not want footers
\BtdmNoSubsInFooter
\btdmsetfootlinethreshold{11}
\begin{document}
% \Titlepage{0--\maxtut}
\titleframe
\setcounter{tocdepth}{1}
{\def\ImpT#1{\textit{\color{btdm@primary}#1}}
\makeatletter\setfootmarker{\btdm@footbottomleft@title}% this way we get the titlemarker again
\begin{frame}[c]{}
\strut\vspace*{3em}\vfill\centering
% TODO: custom foot left bottom
\bfseries\color{btdm@primary!70!white}
Diese \ImpT{Kompaktversion} ist dazu gedacht, die wichtigsten Kommentare und Lösungen zu sammeln.
Sie ist allerdings \ImpT{ohne jede Garantie auf Vollständigkeit} aufzufassen. Zusätzliche Inhalte finden sich in den Folien zu den einzelnen Tutorien.\bigskip\par
Liebe Grüße, Flo
\vfill\strut
\end{frame}
}
\setcounter{tocdepth}{5}
% TODO: outro show each penguin
\def\sheet{\texorpdfstring{\\}{ --- }}
% \Load[Org]{Organisatorisches Tutorium}{Org-Tutorium}{org}{17}
\Load[0]{Blatt 0\sheet Hello World}{0-Tutorium}{0}{17}
\Load[1]{Blatt 1\sheet Algorithmenentwurf und -analyse}{1-Tutorium}{1}{18}
\Load[2]{Blatt 2\sheet Algorithmen, Datentypen, Boolesche Ausdrücke}{2-Tutorium}{2}{19}
\Load[3]{Blatt 3\sheet Kontrollstrukturen}{3-Tutorium}{3}{20}
\Load[4]{Blatt 4\sheet Schleifen, Arrays, Methoden}{4-Tutorium}{4}{21}
\Load[5]{Blatt 5\sheet Methoden und OOP}{5-Tutorium}{5}{22}
\Load[6]{Blatt 6\sheet Grundlagen der OOP}{6-Tutorium}{6}{24}
\Load[7]{Blatt 7\sheet Grundlagen der Rekursion}{7-Tutorium}{7}{25}
\Load[8]{Blatt 8\sheet Suchen und Sortieren}{8-Tutorium}{8}{26}
\Load[9]{Blatt 9\sheet Suchen und Sortieren~II}{9-Tutorium}{9}{27}
\Load[10]{Blatt 10\sheet Dynamische Datenstrukturen}{10-Tutorium}{10}{28}
\Load[11]{Blatt 11\sheet Dynamische Datenstrukturen II}{11-Tutorium}{11}{29}
\end{document}