-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlectureClass.cls
345 lines (291 loc) · 13.9 KB
/
lectureClass.cls
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{lectureClass}[IAS lecture LaTeX class]
\LoadClass[aspectratio=169, usepdftitle=false, handout]{beamer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Class options %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifmarketing
\DeclareOption{marketing}{\marketingtrue} % Marketing option (target audience: external partners)
\ProcessOptions\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Class options %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newif\ifmarketing
\DeclareOption{marketing}{\marketingtrue} % Marketing option (target audience: external partners)
\ProcessOptions\relax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Very basic document style settings %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usetheme{Madrid}
\usecolortheme{dove}
\usefonttheme{professionalfonts}
\beamertemplatenavigationsymbolsempty % deactivate beamer class navigator bar
% toc style
\setbeamertemplate{section in toc}[ball]
\setbeamertemplate{subsection in toc}[square]
\setbeamercolor{section number projected}{fg = white, bg = uniblue}
\setbeamercolor{subsection number projected}{fg = white, bg = uniblue}
% toc automation
\AtBeginSection[]
{
\begin{frame}{Table of contents}
\tableofcontents[sectionstyle=show/hide,subsectionstyle=show/show/hide]
\end{frame}
}
\AtBeginSubsection[]
{
\ifnum\value{subsection} > 1 % show toc only again after second subsection onwards
\begin{frame}{Table of contents}
\tableofcontents[sectionstyle=show/hide,subsectionstyle=show/shaded/hide]
\end{frame}
\fi
}
%itemize / enumerate style
\setbeamertemplate{itemize items}[triangle]
\setbeamercolor{item}{fg = uniblue}
\setbeamercolor{subitem}{fg = uniblue}
\setbeamertemplate{itemize/enumerate body begin}{\vspace{0.5em}} % vertical space before itemize/enumerate
\setbeamertemplate{itemize/enumerate body end}{\vspace{0.5em}} % vertical space after itemize/enumerate
% Set title slide color to uniblue
\setbeamercolor{titlelike}{parent = structure, fg = uniblue}
\setbeamercolor{title}{parent = structure, fg = uniblue}
\setbeamercolor{author}{parent = structure, fg = uniblue}
\setbeamercolor{date}{parent = structure, fg = uniblue}
% set font color of footer information to uniblue
\setbeamercolor{title in head/foot}{fg = uniblue}
\setbeamercolor{author in head/foot}{fg = uniblue}
\setbeamercolor{page number in head/foot}{fg = uniblue}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% logo & author information for the entire slide set %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Set logo and author information
\ifmarketing
\titlegraphic{\href{https://www.eti.uni-siegen.de/ias/}{\includegraphics[height=1cm]{IAS.pdf}}}
\else
\titlegraphic{\href{https://www.eti.uni-siegen.de/ias/}{\includegraphics[height=1cm]{IAS.pdf}}\hspace{2cm} \href{https://creativecommons.org/licenses/by/4.0/}{\includegraphics[height=1cm]{CC-BY.pdf}}}
\fi
\author{N.N.}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Packages %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage[boxed, noend, noline]{algorithm2e}
\RequirePackage[utf8]{inputenc}
\RequirePackage{amsmath}
\RequirePackage{booktabs}
\RequirePackage{amsfonts}
\RequirePackage{subcaption}
\RequirePackage{ragged2e}
\RequirePackage{array}
\RequirePackage{hhline}
\RequirePackage{xcolor}
\RequirePackage{bm}
\RequirePackage{calc}
\RequirePackage{multirow}
\RequirePackage{animate}
\RequirePackage{xparse}
\RequirePackage{nicefrac}
\RequirePackage{tikzpeople}
\RequirePackage{multimedia}
\ifmarketing
\RequirePackage[toc = false]{glossaries-extra}
\else
\RequirePackage[automake, toc = false]{glossaries-extra} % automake option causes error if \makeglossaries is not used in main file
\fi
\RequirePackage{siunitx}
\RequirePackage{hyperxmp} % For pdf metadata
\RequirePackage{hyperref}
\RequirePackage[font=small,justification=centering]{caption}
\RequirePackage{tikz, pgfplots}
\RequirePackage[european, smartlabels, americaninductor]{circuitikz}
\RequirePackage{eurosym}
\RequirePackage[listings,theorems]{tcolorbox}
\RequirePackage[parent]{currfile}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SI setup %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\sisetup{
per-mode=fraction,
fraction-function=\tfrac,
input-digits = 0123456789\pi,
exponent-product=\ensuremath{\cdot},
inter-unit-product = {}
}
\DeclareSIUnit{\EUR}{\text{\euro}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Hyperref setup %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\hypersetup{colorlinks,
linkcolor=,
urlcolor=links,
pdfcopyright={Creative Commons BY 4.0},
pdflicenseurl={https://creativecommons.org/licenses/by/4.0/},
pdfauthor={Oliver Wallscheid},
pdfcontacturl={https://www.eti.uni-siegen.de/ias/},
pdftitle={Lecture slides}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Color Definitions %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definecolor{uniblue}{HTML}{00385F}
\definecolor{unilightblue}{HTML}{009ED4}
\definecolor{unigrey}{HTML}{64727f}
\definecolor{links}{HTML}{2A1B81}
\newcommand{\hl}[1]{\textcolor{signalred}{#1}} %Highlights in text
\newcommand{\hlh}[1]{\textbf{#1}} %Highlights in sub-headings
\definecolor{signalred}{rgb}{0.9047, 0.1918, 0.1988}
\definecolor{signalblue}{rgb}{0.2941, 0.5447, 0.7494}
\definecolor{signalgreen}{rgb}{0.3718, 0.7176, 0.3612}
\definecolor{signalorange}{rgb}{1.0000, 0.5482, 0.1000}
\definecolor{signalyellow}{rgb}{0.8650, 0.8110, 0.4330}
\definecolor{signalbrown}{rgb}{0.6859, 0.4035, 0.2412}
\definecolor{signallavender}{rgb}{0.55, 0.51, 0.71}
\colorlet{shadecolor}{gray!60}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% New footnote command without numbering %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Delete absolute page number depiction since \inserttotalframenumber is not updated to zero when using \part command %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\setbeamertemplate{footline}{
\leavevmode%
\hbox{%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex, left, leftskip=0.375cm]{author in head/foot}%
\usebeamerfont{author in head/foot}\insertshortauthor\expandafter\ifblank\expandafter{\beamer@shortinstitute}{}{~~(\insertshortinstitute)}
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}%
\begin{beamercolorbox}[wd=.333333\paperwidth,ht=2.25ex,dp=1ex,right, rightskip=0.25cm]{date in head/foot}%
\usebeamerfont{date in head/foot}\insertshortdate{}\hspace*{5em}
\insertframenumber{}%/\inserttotalframenumber
\hspace*{2ex}
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% check- and x-mark %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Centered p-box & m-box in table env. using array package %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% tikz and circuittikz%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usetikzlibrary{arrows,arrows.meta, shapes, shapes.symbols, positioning,shadows,trees,matrix, backgrounds, fit, calc, math, intersections, overlay-beamer-styles}
% Layered tree diagram
\tikzset{
basic/.style = {draw, text width=3cm, drop shadow, rectangle},
root/.style = {basic, rounded corners=2pt, thin, align=center,
fill=uniblue, text=white},
level 2/.style = {basic, rounded corners=4pt, thin,align=center, fill=unilightblue,
text width=8em},
level 3/.style = {basic, thin, align=left, fill=gray!25, text width=3cm}
}
% Block diagram
\tikzset{%
block/.style = {draw, thick, rectangle, minimum height = 3em,
minimum width = 4em},
bubble/.style = {draw, ellipse, thick, minimum height = 3em,
minimum width = 5em, fill = uniblue, text = white},
dot/.style = {circle, draw, fill=black, minimum size=3pt, inner sep=0pt, outer sep=0pt},
input/.style = {coordinate}, % Input
output/.style = {coordinate}, % Output
>={Latex[scale=1.25]} % Make the arrow heads larger
}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{groupplots, fillbetween}
\tikzstyle{ctrlblock} = [draw, rectangle, minimum height = 2em, minimum width = 3em, thick]
\ctikzset{bipoles/cuteswitch/thickness=0.15} % Thickness of cute switch
\ctikzset{diodes/scale=0.65} % Scale of diodes
\ctikzset{tripoles/nigbt/bodydiode scale=.5} % Scale of body diode
\ctikzset{tripoles/nigfete/bodydiode scale=.5} % Scale of body diode
\ctikzset{bipoles/currtap/dot size=0.3} % Scale of curr tab dot
\ctikzset{tripoles/adder/width=0.4} % Scale of adder
\ctikzset{tripoles/mixer/width=0.4} % Scale of adder
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Blocks / tcolorboxes %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% General blocks
\setbeamercolor{block body}{fg=black,bg=gray!15}
\setbeamercolor{block title}{fg=white,bg=uniblue}
\addtobeamertemplate{block begin}{}{\justifying} % justification of block content
% Centered block with adjustable width
\newenvironment<>{varblock}[2][.9\textwidth]{
\begin{center}
\begin{minipage}{#1}
\begin{actionenv}#3%
\def\insertblocktitle{#2}%
\par%
\usebeamertemplate{block begin}}
{\par%
\usebeamertemplate{block end}%
\end{actionenv}
\end{minipage}
\end{center}
}
% Math. definitions
\newtcbtheorem[number within=part, reset counter on overlays=true]{defi}{Definition}{grow to left by=0.15cm, grow to right by=0.15cm, left=0.05cm, right=0.05cm,bottom=0.05cm, top=0.05cm,arc=1mm, colback = gray!15, colframe = black!60}{defi}
% Math. theorems
\newtcbtheorem[number within=part, reset counter on overlays=true]{theo}{Theorem}{grow to left by=0.15cm, grow to right by=0.15cm, left=0.05cm, right=0.05cm,bottom=0.05cm, top=0.05cm,arc=1mm, colback = gray!15, colframe = black!60}{theo}
% Algorithms
\newtcbtheorem[number within=part, reset counter on overlays=true]{algo}{Algorithm}{grow to left by=0.15cm, grow to right by=0.15cm, left=0.05cm, right=0.05cm,bottom=0.05cm, top=0.05cm,arc=1mm, colback = gray!15, colframe = black!60}{algo}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% References %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\figref}[1]{\figurename~\ref{#1}}
\newcommand{\satzref}[1]{Theo.~\ref{#1}}
\newcommand{\defref}[1]{Def.~\ref{#1}}
\newcommand{\theoref}[1]{Theo.~\ref{#1}}
\newcommand{\tabref}[1]{\tablename~\ref{#1}}
\newcommand{\capref}[1]{\capname~\ref{#1}}
\newcommand{\apref}[1]{\apname~\ref{#1}}
\newcommand{\algname}{Algo.}
\newcommand{\algoref}[1]{\algname~\ref{#1}}
\setbeamertemplate{caption}{\raggedright\centering\insertcaption\par}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Numbering of captions %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{caption}[numbered] %Gives basic numbering to captions
\numberwithin{figure}{section} %Allows for \part.\figure style numbering
\renewcommand\figurename{Fig.}
\renewcommand{\thetable}{\arabic{table}}
\numberwithin{equation}{section} %Allows for \part.\equation style numbering
\numberwithin{table}{section} %Allows for \part.\table style numbering
\renewcommand\tablename{Tab.}
\renewcommand{\algorithmcfname}{Algo.} %Algorithm-Name
\numberwithin{algocf}{section} %Allows for \part.\algo style numbering
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Math short commands %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\E}[1]{\mathbb{E}\left[#1\right]} %Expected value
\newcommand{\Var}[1]{\mathrm{Var}\left[#1\right]} %Variance value
\newcommand{\El}[2]{\mathbb{E}_{#2}\left[#1\right]} %Expected value with lower index
\newcommand{\Pb}[1]{\mathbb{P}\left[#1\right]} %Propability
\newcommand{\T}{^{\mkern-1.5mu\mathsf{T}}} %Transpose
\newcommand{\iu}{\mathrm{j}\mkern1mu} %imaginary unit
\DeclareMathOperator*{\argmax}{arg\,max} % arg max
\DeclareMathOperator*{\argmin}{arg\,min} % arg min
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Glossaries %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newglossary{nomen}{nom}{nomc}{Nomnclature}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Misc. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\let\footnoterule\relax % Removes the horizontal line above footnotes
\graphicspath{{course_template/}{../course_template/}{fig/}{../fig/}} % Potential paths to figures