-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsimkey.cls
476 lines (416 loc) · 13 KB
/
simkey.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
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
%! TeX program = pdflatexpre
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Simple Keynote
% LaTeX Class
% Version 1.0 (10/11/20)
%
% This class originates by:
% Vel and Nicolas Diaz
%
% Authors:
% Muhammad Uliah Shafar
%
%
% Free License:
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% CLASS CONFIGURATION
%----------------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{simkey}[2020/11/10 Simart Class v1.0]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}} % Pass through any options to the base class
\ProcessOptions\relax % Process given options
\LoadClass{beamer} % Load the base class
\usepackage{beamer_digiPH}
\usepackage[bahasai]{babel}
%----------------------------------------------------------------------------------------
% FONTS
%----------------------------------------------------------------------------------------
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Use 8-bit encoding
\usepackage[protrusion=true, expansion=true]{microtype} % Better typography
\linespread{1.05} % Increase line spacing slightly; Palatino benefits from a slight increase by default
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\usepackage{comment}
\usepackage{lipsum}
\usepackage{graphicx}
\graphicspath{{figures/}{../figures/}{../logos}}
%Position figure in beamer using textblock*
\usepackage[absolute,overlay]{textpos}
%\usepackage[texcoord,grid,gridunit=mm,gridcolor=red!10,subgridcolor=green!10]{eso-pic} %showgrid
\usepackage{setspace}
\usepackage{subfiles}
\usepackage{booktabs}
\usepackage{csquotes}
\usepackage{xcolor}
% Turn off the floating in article mode
\usepackage{float}
\usepackage{xspace}
\newcommand{\zB}{z.\,B.\xspace}
\usepackage{xfrac}
\UseCollection{xfrac}{plainmath}
% Config Slide Notes
\usepackage{pgfpages}
%\setbeamercovered{transparent}
\setbeamertemplate{note page}{\pagecolor{yellow!5}\insertnote}\usepackage{palatino}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{array} %Mostly formatting columns and spacing
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} %centering elemen in table
\newcommand{\tabitem}{~~\llap{\textbullet}~~} % fake bullet itemize in table cell, don't use it on notes
\newcommand\boldblue[1]{\textcolor{blue}{\textbf{#1}}}
\newcommand\boldred[1]{\textcolor{red}{\textbf{#1}}}
\newcommand\boldwhite[1]{\textcolor{white}{\textbf{#1}}}
% Itemize
\usepackage{enumitem} %3 lines after this resolve bullet disappear and adjust spacing
\setitemize{label=\usebeamerfont*{itemize item}%
\usebeamercolor[fg]{itemize item}
\usebeamertemplate{itemize item},noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
%----------------------------------------------------------------------------------------
% SOMETHING ABOUT LABELING
%----------------------------------------------------------------------------------------
\makeatletter
\newenvironment{labeling}[2][]{%
\def\sc@septext{#1}%
\list{}{\settowidth{\labelwidth}{{%
#2%
\sc@septext%
}}%
\leftmargin\labelwidth \advance\leftmargin by \labelsep
\let\makelabel\labelinglabel
}%
}{%
\endlist
}
\newcommand\labelinglabel[1]{%
#1\hfil
\sc@septext%
}
\makeatother
%----------------------------------------------------------------------------------------
% New Environment/cmd
%----------------------------------------------------------------------------------------
%new block environemtn
\newenvironment{blockcolor}
{\begin{alertblock}
}
{
\centering
\includegraphics[width=2cm,trim={0cm 10cm 0cm 9cm}, clip]{figures/batik.png}
\end{alertblock}
}
% Creating centering notes
\newcommand{\notes}[1]{\note{\vfill
% \begin{center}
{#1}
% \end{center}
\vfill
}}
\newcommand{\vrtwoimg}[2]{
\begin{textblock*}{62mm}(64mm,25mm)
\includegraphics[width=64mm,height=35mm]{#1}
\end{textblock*}
\begin{textblock*}{62mm}(64mm,61mm)
\includegraphics[width=64mm,height=34mm]{#2}
\end{textblock*}
}
\newcommand{\vltwoimg}[2]{
\begin{textblock*}{64mm}(0mm,25mm)
\includegraphics[width=64mm,height=35mm]{#1}
\end{textblock*}
\begin{textblock*}{64mm}(0mm,61mm)
\includegraphics[width=64mm,height=34mm]{#2}
\end{textblock*}
}
\newcommand{\vrthreeimg}[3]{
\begin{textblock*}{44mm}(0mm,25mm)
\includegraphics[width=44mm,height=23mm]{#1}
\end{textblock*}
\begin{textblock*}{44mm}(0mm,49mm)
\includegraphics[width=44mm,height=23mm]{#2}
\end{textblock*}
\begin{textblock*}{44mm}(0mm,73mm)
\includegraphics[width=44mm,height=22mm]{#3}
\end{textblock*}
}
\newcommand{\vlthreeimg}[3]{
\begin{textblock*}{44mm}(0mm,25mm)
\includegraphics[width=44mm,height=23mm]{#1}
\end{textblock*}
\begin{textblock*}{44mm}(0mm,49mm)
\includegraphics[width=44mm,height=23mm]{#2}
\end{textblock*}
\begin{textblock*}{44mm}(0mm,73mm)
\includegraphics[width=44mm,height=22mm]{#3}
\end{textblock*}
}
\newcommand{\htwoimg}[2]{
\begin{textblock*}{63mm}(0mm,59mm)
\includegraphics[width=64mm,height=35mm]{#1}
\end{textblock*}
\begin{textblock*}{62mm}(65mm,59mm)
\includegraphics[width=64mm,height=35mm]{#2}
\end{textblock*}
}
\newcommand{\hthreeimg}[3]{
\begin{textblock*}{42mm}(0mm,66mm)
\includegraphics[width=42mm,height=24mm]{#1}
\end{textblock*}
\begin{textblock*}{42mm}(43mm,66mm)
\includegraphics[width=42mm,height=24mm]{#2}
\end{textblock*}
\begin{textblock*}{42mm}(86mm,66mm)
\includegraphics[width=42mm,height=24mm]{#3}
\end{textblock*}
}
\newcommand{\bimg}[2]{
\vspace{28mm}
\includegraphics[width=#1]{#2}
}
\newcommand{\limg}[1]{
\begin{textblock*}{60mm}(0mm,24mm)
\includegraphics[width=60mm,height=68mm]{#1}
\end{textblock*}
}
\newcommand{\rimg}[1]{
\begin{textblock*}{60mm}(68mm,24mm)
\includegraphics[width=60mm,height=68mm]{#1}
\end{textblock*}
}
\newcommand{\bgimg}[1]{
\begin{bgblock}{0mm}{0mm}%130x95
\includegraphics[width=\paperwidth]{#1}
\end{bgblock}
}
\newcommand{\hbgimg}[1]{
\begin{bgblock}{0mm}{0mm}%130x95
\includegraphics[height=\paperheight]{#1}
\end{bgblock}
}
\newcommand{\compactbgimg}[1]{
\begin{bgblock}{0mm}{0mm}%130x95
\includegraphics[width=\paperwidth, height=\paperheight]{#1}
\end{bgblock}
}
\newcommand{\ltxt}[3]{
\begin{textblock*}{62mm}(3mm,24mm)
\begin{tpblock}{#1}{#2}
#3
\end{tpblock}
\end{textblock*}
}
\newcommand{\rtxt}[3]{
\begin{textblock*}{60mm}(66mm,24mm)
\begin{tpblock}{#1}{#2}
#3
\end{tpblock}
\end{textblock*}
}
\newcommand{\utxt}[3]{
\begin{textblock*}{120mm}(5mm,26mm)
\begin{tpblock}{#1}{#2}
#3
\end{tpblock}
\end{textblock*}
}
\newcommand{\btxt}[3]{
\begin{textblock*}{120mm}(5mm,55mm)
\begin{tpblock}{#1}{#2}
#3
\end{tpblock}
\end{textblock*}
}
\newcommand{\txt}[3]{
\begin{tpblock}{#1}{#2}
#3
\end{tpblock}
}
%----------------------------------------------------------------------------------------
% BLOCK
%----------------------------------------------------------------------------------------
\usepackage[most]{tcolorbox}
\newtcolorbox{tpblock}[3][]
{%
code={%
\usebeamercolor{block title}
\colorlet{titlebg}{#2}
\colorlet{titlefg}{#3}
\usebeamercolor{block body alerted}
\colorlet{bodybg}{#2}
\colorlet{bodyfg}{#3}
},
enhanced,
boxsep=0.25ex,
arc=1.25ex,
opacityframe=0,
opacityback=.64,
colbacktitle=titlebg,
coltitle=titlefg,
colback=bodybg,
colupper=bodyfg,
boxrule=0pt,
#1
}
\makeatletter
\newbox\@bgblock
\newenvironment{bgblock}[2]{%
\global\setbox\@bgblock=\vbox\bgroup%
\unvbox\@bgblock%
\vbox to0pt\bgroup\vskip#2\hbox to0pt\bgroup\hskip#1\relax%
}{\egroup\egroup\egroup}
\addtobeamertemplate{background}{\box\@bgblock}{}
\makeatother
%----------------------------------------------------------------------------------------
% TIKZ PLOT CONFIGURATION
%----------------------------------------------------------------------------------------
% Paket zum Erstellen von Plots mit TikZ
\usepackage{pgfplots}
% immer die neueste Version benutzen
\pgfplotsset{compat=newest}
% Verbindung von Linien durch eine schräge Kante
\pgfplotsset{every axis/.append style={line join=bevel}}
% Formatvorlage für Präsentationen
\mode<beamer>{
\pgfplotsset{
beamer/.style={
width=0.8\textwidth,
height=0.45\textwidth,
legend style={font=\scriptsize},
tick label style={font=\footnotesize},
label style={font=\small},
max space between ticks=28,
}
}
}
\mode<handout>{
\pgfplotsset{
beamer/.style={
width=0.8\textwidth,
height=0.45\textwidth,
legend style={font=\scriptsize},
tick label style={font=\footnotesize},
label style={font=\small},
max space between ticks=25,
}
}
}
\mode<article>{
\pgfplotsset{
beamer/.style={
width=0.8\textwidth,
height=0.45\textwidth,
max space between ticks=35,
}
}
}
% neue Größenvorlage für zwei Plots nebeneinander anlegen
\pgfplotsset{
scriptsize/.style={
width=0.34\textwidth,
height=0.1768\textwidth,
legend style={font=\scriptsize},
tick label style={font=\scriptsize},
label style={font=\footnotesize},
title style={font=\footnotesize},
every axis title shift=0pt,
max space between ticks=25,
every mark/.append style={mark size=7},
major tick length=0.1cm,
minor tick length=0.066cm,
}
}
\pgfplotsset{
small/.style={
width=6.5cm,
height=,
tick label style={font=\footnotesize},
label style={font=\small},
legend style={font=\footnotesize},
max space between ticks=30,
}
}
% Legendeneintrage standardmäßig links ausrichten
\pgfplotsset{legend cell align=left}
% Hauptgitternetz zeichnen
\pgfplotsset{xmajorgrids}
\pgfplotsset{ymajorgrids}
% Anzahl der kleinen Teilstriche zwischen zwei großen Teilstrichen
%\pgfplotsset{minor x tick num={3}}
%\pgfplotsset{minor y tick num={3}}
% feines Gitternetz zeichnen
%\pgfplotsset{xminorgrids}
%\pgfplotsset{yminorgrids}
% nur nach den Achsen skalieren
\pgfplotsset{scale only axis}
% Farben wie in MATLAB definieren
\definecolor{matlab1}{rgb}{0,0,1}
\definecolor{matlab2}{rgb}{0,0.5,0}
\definecolor{matlab3}{rgb}{1,0,0}
\definecolor{matlab4}{rgb}{0,0.75,0.75}
\definecolor{matlab5}{rgb}{0.75,0,0.75}
\definecolor{matlab6}{rgb}{0.75,0.75,0}
\definecolor{matlab7}{rgb}{0.25,0.25,0.25}
% Farbreihenfolge wie in MATLAB definieren
\pgfplotscreateplotcyclelist{matlab}{
{matlab1,solid},
{matlab2,dashed},
{matlab3,dashdotted},
{matlab4,dotted},
{matlab5,densely dashed},
{matlab6,densely dashdotted},
{matlab7,densely dotted}% dies unterdrückt einen Fehler
}
% Farbreihenfolge wie in MATLAB benutzen
\pgfplotsset{cycle list name=matlab}
% Farbreihenfolge von pgfplots benutzen
%\pgfplotsset{cycle list name=color list}
% nur Graustufen benutzen
%\pgfplotsset{cycle list name=linestyles}
% Strichstärke auf 1pt festlegen
\pgfplotsset{every axis plot/.append style={line width=1pt}}
% für deutsche Dokumente ein Komma benutzen
\addto\extrasngerman{\pgfplotsset{/pgf/number format/.cd,set decimal separator={{{,}}}}}
% ein halbes Leerzeichen als Tausendertrennzeichen benutzen
%\pgfplotsset{/pgf/number format/.cd,1000 sep={\,}}
% kein Tausendertrennzeichen verwenden
\pgfplotsset{/pgf/number format/.cd,1000 sep={}}
% Zahlen kleiner als 0.1 auch im fixed-Format ausgeben
\pgfplotsset{/pgf/number format/.cd,std=-2}
% neue Positionen für Legenden anlegen
\pgfplotsset{/pgfplots/legend pos/north/.style={/pgfplots/legend style={at={(0.50,0.97)},anchor=north}}}
\pgfplotsset{/pgfplots/legend pos/south/.style={/pgfplots/legend style={at={(0.50,0.03)},anchor=south}}}
\pgfplotsset{/pgfplots/legend pos/east/.style={/pgfplots/legend style={at={(0.97,0.50)},anchor=east}}}
\pgfplotsset{/pgfplots/legend pos/west/.style={/pgfplots/legend style={at={(0.03,0.50)},anchor=west}}}
\pgfplotsset{/pgfplots/legend pos/outer north/.style={/pgfplots/legend style={at={(0.50,1.03)},anchor=south}}}
% Paket für SI-Einheiten
\usepackage[binary-units]{siunitx}
% Brüche aktivieren
\sisetup{per-mode=fraction}
% Dezimaltrennzeichen abhängig von der Sprache
\addto\extrasngerman{\sisetup{output-decimal-marker={,}}}
\addto\extrasenglish{\sisetup{output-decimal-marker={.}}}
% Trennzeichen für Bereiche
\addto\extrasngerman{\sisetup{range-phrase={ bis~}}}
\addto\extrasenglish{\sisetup{range-phrase={ to~}}}
% Bibliography
\usepackage[round]{natbib}
\setcitestyle{open={(},close={)}}
% How to remove some pages from the navigation bullets in Beamer?
% siehe: https://tex.stackexchange.com/questions/37127/how-to-remove-some-pages-from-the-navigation-bullets-in-beamer
\makeatletter
\let\beamer@writeslidentry@miniframeson=\beamer@writeslidentry
\def\beamer@writeslidentry@miniframesoff{%
\expandafter\beamer@ifempty\expandafter{\beamer@framestartpage}{}% does not happen normally
{%else
% removed \addtocontents commands
\clearpage\beamer@notesactions%
}
}
\newcommand*{\miniframeson}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframeson}
\newcommand*{\miniframesoff}{\let\beamer@writeslidentry=\beamer@writeslidentry@miniframesoff}
\makeatother