-
Notifications
You must be signed in to change notification settings - Fork 0
/
ms.tex
executable file
·1543 lines (1315 loc) · 48.2 KB
/
ms.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
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
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\pdfoutput=1
% set main document class (KOMA-Script's scrbook)
%\documentclass[
% % align equation numbers left to the equation
% leqno,
%]{scrbook}
\documentclass[fleqn,reqno,a4paper,parskip=half]{scrbook}
% include packages
% because of arxiv's requirements, the preamble has to be completely inline
% -----------------------------
\usepackage{charter} %Charter fuer englische Texte
%\linespread{1.05} % Durchschuss für Charter leicht erhöhen
\usepackage[utf8]{inputenc}
\usepackage{pmboxdraw}
% utf8x is incompatible with biblatex, the following trick is a remedy
% source: https://tex.stackexchange.com/a/213177
\input{binhex}
\makeatletter
\def\uc@dclc#1#2#3{%
\ifnum\pdfstrcmp{#2}{mathletters}=\z@
\begingroup\edef\x{\endgroup
\noexpand\DeclareUnicodeCharacter{\hex{#1}}}\x{#3}%
\fi
}
\input{uni-3.def}
\def\uc@dclc#1#2#3{%
\ifnum\pdfstrcmp{#2}{default}=\z@
\begingroup\edef\x{\endgroup
\noexpand\DeclareUnicodeCharacter{\hex{#1}}}\x{#3}%
\fi
}
\input{uni-34.def}
\makeatother
\usepackage[tbtags,sumlimits,intlimits,namelimits]{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bbm}
\usepackage{ulem}
\usepackage{tikz}
\usepackage{pgf}
\usepackage{ifpdf}
\usepackage{color}
\usepackage{esint}
\usepackage{framed}
\usepackage{wasysym} % \ocircle
\usepackage{makecell} % \makecell{...\\...} to break in table cell
\usepackage{textcomp}
\usepackage{fancyvrb} % improved verbatim
%\usepackage[colorlinks=true,linkcolor=black,citecolor=black,urlcolor=black]{hyperref} % print
%\usepackage[colorlinks=true,linkcolor=blue,citecolor=blue,pdfpagelabels,plainpages=false]{hyperref} % web
%\usepackage{hyperref} % plain
\usepackage[top=2.3cm, bottom=3.45cm, left=2.3cm, right=2.3cm]{geometry}
%\numberwithin{equation}{section}
\usepackage{chngcntr}
\counterwithin*{section}{part}
%\graphicspath{{images/png/}{images/}} % Pfad, in dem sich Grafikdateien befinden
%\usepackage{subfigure} % Unterbilder, deprecated
%\usepackage(subfig}
%\usepackage{cite} % Literatur
\usepackage{graphicx} % Bilder in Tabellen
\usepackage{float} % eigene Float-Umgebungen, H-Option, um Bilder an der aktuellen Stelle anzuzeigen
\usepackage{caption}
\usepackage{subcaption,array}
%\usepackage{array}
\restylefloat{figure} % Bilder an der Stelle, wo sie eingebunden werden
\usepackage{multirow}
\usepackage{listings} % Darstellung von Source-Code
\usepackage{framed} % Rahmen um Text
\usepackage{arydshln} % gestrichelte Linie in Tabelle mit \hdashline
\usepackage{longtable} % Tabellen mit automatischen Seitenumbruch
\usepackage{layouts} % textwidth in cm: \printinunitsof{cm}\prntlen{\textwidth}
%\usepackage{ziffer} % Komma in Dezimalzahlen
\usepackage{url} % Links
%% end old
\definecolor{darkblue}{rgb}{0,0,.5}
\definecolor{black}{rgb}{0,0,0}
\usepackage[framemethod=TikZ]{mdframed} % Rahmen um Text und Gleichungen
%\usepackage{arydshln} % gestrichelte Linie in Tabelle mit \hdashline
\usepackage{dirtytalk} % \say{...} erzeugt (deutsche) Anführungszeichen
\usepackage{tipa}
\usepackage{transparent} % needed for inkscape generated pdf_tex files
\usepackage{multicol} % multiple columns
\usepackage{moreverb} % verbatimwrite
\usepackage{verbatimbox} % \begin{verbbox}
\usepackage{booktabs}
\usepackage{morefloats} % Increase the number of simultaneous LaTeX floats
\usepackage{enumitem} % more control oover itemize
%\usepackage{algorithm2e}
%\usepackage{algorithmic}
%\usepackage{algpseudocode}
\newsavebox\lstbox
\mdfdefinestyle{MyFrame}{%
innertopmargin=0pt,
innerbottommargin=10pt,
innerrightmargin=20pt,
innerleftmargin=20pt}
\definecolor{darkgreen}{HTML}{009900}
% settings for algorithm
\lstset{literate=%
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}1
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
{⇐}{{$\leftarrow$}}1
{>=}{{$\geq$}}1
{~}{{\textasciitilde}}1
{`}{\textquotedbl}1,
language=C++,
numbers=none,
numberstyle=\tiny,
xleftmargin=2.0ex,
%basicstyle=\small, % print whole listing small
basicstyle=\small\ttfamily,
morekeywords={elif,do,end,then,proc,local,Eingabe,Ausgabe,alignof,loop,each},
deletekeywords={new},
columns=flexible, % alignment
tabsize=2, % size of tabs
keepspaces,
gobble=2, % remove 2 characters at begin of each line
mathescape % wandle $$ in latex um
}
% Versuche stärker, Abbildungen dort einzubinden, wo sie definiert wurden
\renewcommand{\topfraction}{.85} % Anteil, den floats auf einer Seite von oben her einnehmen dürfen
\renewcommand{\bottomfraction}{.7} % Anteil, den floats auf einer Seite von unten her einnehmen dürfen
\renewcommand{\textfraction}{.15} % Anteil der Seite, der mind. für Text zur Verfügung steht
\renewcommand{\floatpagefraction}{.66} % Anteil der Seite, der belegt sein muss, bevor eine weitere Seite angelegt wird
\setcounter{topnumber}{9} % maximale Anzahl floats, die im oberen Bereich der Seite sein dürfen
\setcounter{bottomnumber}{9} % maximale Anzahl floats, die im unteren Bereich der Seite sein dürfen
% language-specific things (hyphenation, ...)
\usepackage[ngerman,main=american]{babel}
% biblatex package wants to have csquotes (otherwise: warning)
\usepackage{csquotes}
% lower-case page header
\usepackage[markcase=upper]{scrlayer-scrpage}
% dummy texts
\usepackage[math]{blindtext}
% amsmath with improvements
\usepackage{mathtools}
% math theorems
%\usepackage{amsthm}
% format math theorems
\usepackage{thmtools}
% for setting size of text area
\usepackage{geometry}
% for \luadirect command
%\usepackage{luacode}
% check mode
%\iftoggle{checkMode}{
% show non-whitelisted hyphenations
% \usepackage[mark]{lua-check-hyphen}
%}{}
% debug mode
%\iftoggle{debugMode}{
% % show boxes, glues, and kerning
% \usepackage{lua-visual-debug}
%}{}
% use GoMono as typewriter font
\usepackage[
% otherwise, bold is not available ("undefined font shape" warnings)
type1,
% scale to match main font size
scale=0.88,
]{GoMono}
% use TeX Gyre Heros as sans-serif font
\usepackage{tgheros}
% need T1 font encoding for Charter,
% otherwise there will be "undefined font shape" warnings
\usepackage[T1]{fontenc}
% use Bitstream Charter as main font
\usepackage[bitstream-charter]{mathdesign}
% do not use mathcal of mathdesign, but replace by standard mathcal
\DeclareSymbolFont{usualmathcal}{OMS}{cmsy}{m}{n}
\DeclareSymbolFontAlphabet{\mathcal}{usualmathcal}
% micro-typographic adjustments
\usepackage[
% don't deactivate extensions due to document class draft option
final,
% increase letter spacing in small-caps
tracking=smallcaps,
% font expansion: don't stretch/shrink lines by more than 1%,
% default of 2% looks a bit weird
stretch=10,
shrink=10,
]{microtype}
% reference last page of document
\usepackage{lastpage}
% extract number from page reference
\usepackage{refcount}
% graphics
\usepackage{graphicx}
% colors, load colortbl for coloring table rows
%\usepackage[table]{xcolor}
% contours around text
\usepackage{contour}
% additional space in table cells
\usepackage{cellspace}
% custom float captions, subfigures
\usepackage{subcaption}
% allows to put float caption beside image
\usepackage{sidecap}
% L, C, R column types for tables
\usepackage{array}
% X column type for tables (filling rest of line)
\usepackage{tabularx}
% more beautiful tables
\usepackage{booktabs}
% table cells spanning multiple rows
\usepackage{multirow}
% for controlling space in enumerate and itemize
\usepackage{enumitem}
% disable "Column type for cellspace package moved to 'C'." warning
% when loading siunitx
% (this is due to the cellspace package loaded above)
\usepackage{expl3}
\ExplSyntaxOn
\msg_redirect_name:nnn{siunitx}{moved-cellspace-column}{none}
\ExplSyntaxOff
% consistent style of units and numbers
\usepackage[binary-units=true]{siunitx}
% watermarks
\usepackage{everypage}
% rules left of theorems
%\usepackage[framemethod=tikz]{mdframed}
% drawings
\usepackage{tikz}
% styling of table of contents
\usepackage{tocbasic}
% local table of contents (mini TOC)
\usepackage{etoc}
% wrap text around boxes
\usepackage{wrapfig}
% initials/dropped captial letters at beginning of chapters
\usepackage{lettrine}
% inclusion of external PDFs
\usepackage{pdfpages}
% reference current chapter, section, subsection, ...
\usepackage{nameref}
% line spacing (one and a half lines)
\usepackage[onehalfspacing]{setspace}
% filter specific warnings
%\usepackage{silence}
% patch hard-coded stuff in packages
\usepackage{regexpatch}
% allow breaking after hyphens in long URLs
%\usepackage[hyphens]{url}
% PDF links
\usepackage{hyperref}
\usepackage[all]{hypcap}
% \cref verbessert
\usepackage[
% capitalize names automatically
capitalise,
% mark all of "Lemma 1" as a link, not only "1"
nameinlink,
% pass language used in document to enable cleveref in otherlanguage env
ngerman,english,
]{cleveref}
% generate Eqs. instead of Equations
\crefmultiformat{equation}{#2Eqs.~(#1)#3}{ and~#2(#1)#3}{, #2(#1)#3}{ and~#2(#1)#3}
%\crefrangemultiformat{equation}{#2Eqs.~(#1)#3}{ and~#2(#1)#3}{, #2(#1)#3}{ and~#2(#1)#3}
%\crefrangemultiformat{equation}
% {Eqs. #3(#1)#4 to #5(#2)#6}
% { and #3(#1)#4 to #5(#2)#6}
% {, #3(#1)#4 to #5(#2)#6}
% { and #3(#1)#4 to #5(#2)#6}
% algorithms
\usepackage{algorithm}
\usepackage{algorithmicx}
% pseudo-code
\usepackage[noend]{algpseudocode}
% create custom PDF bookmarks
\usepackage{bookmark}
% old formatting using the titlesec package, which is now obsolete
%\usepackage{titlesec} % space before chapter head
%\titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\renewcommand*{\chapterformat}{\normalfont\large\bfseries Chapter~\thechapter\autodot\enskip}
%Chapter~\fontsize{60}{68}\selectfont\color{gray} \thechapter\autodot\enskip}
\renewcommand\chapterlinesformat[3]{\ifstr{#2}{}{}{#2\vspace*{5mm}\\*}{\Huge #3}}
% analogous to \cleardoublepage but for left page
\newcommand*\cleartoleftpage{%
\clearpage
\ifodd\value{page}\hbox{}\newpage\fi
}
% BibLaTeX
\usepackage[
% abbreviate author names
giveninits=true,
% only show years in dates
date=year,
% use alphabetic style instead of numeric
style=alphabetic,
% only use first author's name for the style
maxalphanames=1,
]{biblatex}
%\usepackage{scrhack}
% named references
%\usepackage[
% % capitalize names automatically
% capitalise,
% % mark all of "Lemma 1" as a link, not only "1"
% nameinlink,
% % pass language used in document to enable cleveref in otherlanguage env
% ngerman,english,
%]{cleveref}
% -------------------------------------------
% end of packages
% set packages options
% ======================================================================
% Meta-Data
% ======================================================================
% meta-data variables
\newcommand*{\thetitle}{%
Scalable Biophysical Simulations\texorpdfstring{\\}{}
of the Neuromuscular System%
}
\newcommand*{\theapproval}{%
Vom Stuttgarter Zentrum für Simulationswissenschaften (SC SimTech) und\\
der Fakultät für Informatik, Elektrotechnik und Informationstechnik\\
der Universität Stuttgart zur Erlangung der Würde eines Doktors\\
der Naturwissenschaften (Dr.\ rer.\ nat.) genehmigte Abhandlung%
}
\newcommand*{\theauthor}{Benjamin Maier}
\newcommand*{\thebirthplace}{Waiblingen}
\newcommand*{\thedefensedate}{22. Juni 2021}
\newcommand*{\thedate}{April 22, 2021}
\newcommand*{\theyear}{2021}
\newcommand*{\theuniversity}{Universität Stuttgart}
\newcommand*{\theinstitute}{Institut für Parallele und Verteilte Systeme}
\newcommand*{\theadvisor}{Prof.\ Dr.\ Miriam Schulte}
\newcommand*{\theexamineri}{Prof.\ Dr.\ Hans-Joachim Bungartz}
\newcommand*{\theexaminerii}{}
% ======================================================================
% KOMA-Script and Text Area
% ======================================================================
% options for KOMA-Script
\KOMAoptions{
% choose font size (PO: should be between 12pt and 14pt)
fontsize=12pt,
% suppress "very small head height detected" warning
DIV=12,
% don't end section numbers with period despite appendices
numbers=noendperiod,
% set linespacing of header and footer to 1.5
% (otherwise, the header will "jump" back and forth from normal
% pages and pages with single line spacing, e.g., table of contents)
onpsinit=\onehalfspacing,
% use \section for headings of list of figures/tables/algorithms
listof=leveldown,
}
% binding offset that will be substracted from inner margins
\newcommand*{\bindingoffset}{10mm}
% set page margins
\geometry{
bindingoffset=\bindingoffset,
inner=15mm,
outer=30mm,
top=20mm,
bottom=30mm,
includehead=true,
}
% ======================================================================
% Graphics
% ======================================================================
% location of graphics files
\graphicspath{{../gfx/}}
\graphicspath{
{images/summer_school_study/png/}
{images/summer_school_study/}
{images/summer_school_study/plots/}
{images/summer_school_study/2018/}
{images/fiber_creation/}
{images/parallel_fiber_estimation/}
{images/motor_unit_assignment/}
{images/implementation/}
{images/theory/}
{images/results/basic}
{images/results/application}
{images/results/studies}
{images/logos}
}
% TikZ libraries
\usetikzlibrary{
% arrow types
arrows.meta,
% coordinate calculations
calc,
% zig-zag lines
decorations.pathmorphing,
% curly braces
decorations.pathreplacing,
% text along paths
decorations.text,
% color gradients
fadings,
% shadows
shadows,
}
% set default line width to same as in Matplotlib plots
% created by helper.figure
\tikzset{every picture/.style={line width=1pt}}
% set default arrow tip
\tikzset{>={Stealth[length=5.5pt,width=5.5pt]}}
% draw circle arc around center (standard in TikZ is
% the specification of the first point on the arc)
% [draw options] (center) (initial angle:final angle:radius)
\def\centerarc[#1](#2)(#3:#4:#5){
\draw[#1] ($(#2)+({(#5)*cos(#3)},{(#5)*sin(#3)})$) arc (#3:#4:#5);
}
% width of contours around text with \contour
\contourlength{1.5pt}
% ======================================================================
% Cross-References
% ======================================================================
% define abbreviated names for cross-references
\crefname{algorithm}{Alg.}{Algorithms}
\Crefname{algorithm}{Algorithm}{Algorithms}
\crefname{chapter}{Chap.}{Chapters}
\Crefname{chapter}{Chapter}{Chapters}
\crefname{corollary}{Cor.}{Corollaries}
\Crefname{corollary}{Corollary}{Corollaries}
\crefname{definition}{Def.}{Definitions}
\Crefname{definition}{Definition}{Definitions}
\crefname{equation}{Eq.}{Equations}
\Crefname{equation}{Equation}{Equations}
\crefname{figure}{Fig.}{Figures}
\Crefname{figure}{Figure}{Figures}
\crefname{lemma}{Lemma}{Lemmas}
\Crefname{lemma}{Lemma}{Lemmas}
\crefname{line}{line}{lines}
\Crefname{line}{Line}{Lines}
\crefname{proposition}{Prop.}{Propositions}
\Crefname{proposition}{Proposition}{Propositions}
\crefname{section}{Sec.}{Sections}
\Crefname{section}{Section}{Sections}
\crefname{table}{Tab.}{Tables}
\Crefname{table}{Table}{Tables}
\crefname{theorem}{Thm.}{Theorems}
\Crefname{theorem}{Theorem}{Theorems}
% reference theorems with their name appended
\newcommand*{\thmref}[1]{\hyperlink{#1}{\cref*{#1}~(\nameref*{#1})}}
\newcommand*{\Thmref}[1]{\hyperlink{#1}{\Cref*{#1}~(\nameref*{#1})}}
% ======================================================================
% Tables of Contents, Figures, Tables, Algorithms, and Theorems
% ======================================================================
% remove indentation for lists of figures and tables
\DeclareTOCStyleEntry[indent=0em]{tocline}{figure}
\DeclareTOCStyleEntry[indent=0em]{tocline}{table}
% -- this fails
% declare algorithm float environment, create list of algorithms,
% use same formatting as for figures and tables
%\DeclareNewTOC[
% type=algorithm,
% name=Algorithm,
% listname={List of Algorithms},
% float,
% floattype=4,
% floatpos=tp,
% counterwithin=chapter,
% tocentrynumwidth=2.3em,
% tocentryindent=0em,
%]{loa}
% create list of theorems,
% use same formatting as for figures, tables, and algorithms
% (thmtools's thm-listof.sty is unfortunately a little buggy,
% as it causes the flip book images to jump; using KOMA-Script for
% all lists is more consistent and less error-prone)
\DeclareNewTOC[
type=mytheorem,
name=Theorem,
listname={List of Theorems},
tocentrynumwidth=2.3em,
tocentryindent=0em,
]{lop}
% add code that adds the theorem to the *.lop file to hook
\addtotheorempostheadhook{%
\addxcontentsline{lop}{mytheorem}{\csname ll@\thmt@envname\endcsname}%
}
% use single spacing in
% tables of contents, figures, tables, algorithms, and theorems
\AfterTOCHead{\begin{spacing}{1}}
\AfterStartingTOC{\end{spacing}}
% exclude subsections from table of contents
\setcounter{tocdepth}{\sectionnumdepth}
% increase space of page numbers
% (default values of 1.55em and 2.55em are too small for three-digit numbers)
%\renewcommand*{\@pnumwidth}{2em}
%\renewcommand*{\@tocrmarg}{3em}
% ======================================================================
% Dictums
% ======================================================================
% don't use sans-serif font for dictums
\addtokomafont{dictum}{\rmfamily}
% shortcut for setting the dictum for a chapter
\newcommand*{\setdictum}[3][0.54\textwidth]{%
\setchapterpreamble{%
\cleanchapterquote{#1}{#2}{#3}%
\chapterheadendvskip%
}%
}
% fancy quotes (taken from cleanthesis.sty, slightly adapted)
\newcommand*{\hugequote}{%
\fontsize{75}{80}\selectfont%
\hspace*{-0.6em}\color[rgb]{0.6,0.6,0.6}%
\textit{``}%
\vskip -0.8em%
}
\newcommand*{\cleanchapterquote}[3]{%
\begin{minipage}{\textwidth}%
\begin{flushright}
\begin{minipage}{#1}%
\begin{flushleft}
{\hugequote}\textit{#2}
\end{flushleft}
\begin{flushright}
\small--- #3
\end{flushright}
\end{minipage}%
\end{flushright}
\end{minipage}%
\bigskip
}
% ======================================================================
% Page Headers and Footers
% ======================================================================
% all-caps sans-serif page header
\setkomafont{pageheadfoot}{%
\normalfont\normalcolor\sffamily%
\fontsize{9.5}{12}\selectfont\lsstyle%
}
\setkomafont{pagenumber}{\usekomafont{pageheadfoot}\bfseries}
% move page number to page header
\clearscrheadfoot
\lehead[\pagemark]{\pagemark}
\rehead[]{\headmark}
\lohead[]{\headmark}
\rohead[\pagemark]{\pagemark}
\lefoot[]{}
\rofoot[]{}
% prepend "Chapter X: " in front of the chapter name in page headers
\renewcommand*{\chaptermarkformat}{\chapapp{} \thechapter: }
% ======================================================================
% Initials
% ======================================================================
% indent right of initial
\setlength{\DefaultNindent}{0.5em}
% use height of upper-case letters for height of initial
\renewcommand*{\LettrineSecondString}{X}
% enlarge initial (grows to the top, aligned on baseline of bottom line)
\renewcommand*{\DefaultLoversize}{0.07}
% make initial bold
\renewcommand*{\LettrineFontHook}{\bfseries}
% don't use small caps for rest of first word, make bold
\renewcommand*{\LettrineTextFont}{\normalfont\bfseries}
% custom command: \initial[options]{0.5em}{L}{etter}
% is like \lettrine[options]{L}{etter}, except that the first line
% is moved to the left by 0.5em
\newcommand*{\initial}[4][]{%
\lettrine[%
findent=\dimexpr-#2\relax,%
nindent=\dimexpr#2+\DefaultNindent\relax,%
#1%
]{#3}{#4}%
}
% ======================================================================
% Tables
% ======================================================================
% fixed-width column types with left, center, and right alignment
\newcolumntype{L}[1]{%
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}p{#1}%
}
\newcolumntype{D}[1]{%
>{\centering\let\newline\\\arraybackslash\hspace{0pt}}p{#1}%
}
\newcolumntype{R}[1]{%
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}%
}
% colors of table lines and rows
\newcommand*{\tablelinecolor}{mittelblau}
\newcommand*{\headerrowcolor}{mittelblau!40}
\newcommand*{\headerrowtextcolor}{black}
\newcommand*{\oddrowcolor}{mittelblau!10}
\newcommand*{\evenrowcolor}{mittelblau!20}
% \setnumberoftableheaderrows has to be put before every tabular environment,
% sets the \rownum counter such that the 1st content row has row number 1
\newcommand*{\setnumberoftableheaderrows}[1]{%
\rowcolors{1}{\oddrowcolor}{\evenrowcolor}%
\global\rownum=\numexpr-#1\relax%
}
% set text color per row, use it like this: \begin{tabular}{=l+l+l+l} ...
% (a single \color command wouldn't suffice, as tabular cells have
% their own boxes, i.e., the font color is reset after every cell)
%\newcommand*{\@rowstyle}{}
%\newcommand*{\rowstyle}[1]{\gdef\@rowstyle{#1}\@rowstyle\ignorespaces}
%\newcolumntype{=}{>{\gdef\@rowstyle{}}C}
%\newcolumntype{+}{>{\@rowstyle}C}
% \headerrow has to be put before every tabular header row,
% sets background and text color
\newcommand*{\headerrow}{%
\rowcolor{\headerrowcolor}%
\rowstyle{\color{\headerrowtextcolor}}%
}
% automatically select header or odd/even row color
% for the current tabular row
\newcommand*{\autorowcolor}{%
\ifnum\rownum<1%
\headerrowcolor%
\else%
\ifodd\rownum\oddrowcolor\else\evenrowcolor\fi%
\fi%
}
% automatically select header or odd/even row color
% for the previous tabular row
\newcommand*{\prevautorowcolor}{%
\ifnum\rownum<2%
\headerrowcolor%
\else%
\ifodd\rownum\evenrowcolor\else\oddrowcolor\fi%
\fi%
}
% set thickness of table rules
\setlength{\heavyrulewidth}{0.10em}
\setlength{\lightrulewidth}{0.06em}
% like \toprule, except that the space below the rule has the color
% given in the argument
\newcommand*{\toprulecustom}[1]{%
\arrayrulecolor{\tablelinecolor}%
\specialrule{\heavyrulewidth}{\abovetopsep}{0pt}%
\arrayrulecolor{#1}%
\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{black}%
}
% like \midrule, except that the space above and below the rule has the colors
% given in the arguments
\newcommand*{\midrulecustom}[2]{%
\arrayrulecolor{#1}%
\specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{\tablelinecolor}%
\specialrule{\lightrulewidth}{0pt}{0pt}%
\arrayrulecolor{#2}%
\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{black}%
}
% like \bottomrule, except that the space above the rule has the color
% given in the argument
\newcommand*{\bottomrulecustom}[1]{%
\arrayrulecolor{#1}%
\specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{\tablelinecolor}%
\specialrule{\heavyrulewidth}{\belowbottomsep}{0pt}%
\arrayrulecolor{black}%
}
% commands like \toprule, \midrule, and \bottomrule,
% but automatically guessing the right background colors
% for the spaces above/below the rules
\newcommand*{\toprulec}{\toprulecustom{\autorowcolor}}
\newcommand*{\midrulec}{%
\midrulecustom{\prevautorowcolor}{\autorowcolor}%
}
\newcommand*{\bottomrulec}{\bottomrulecustom{\prevautorowcolor}}
% ======================================================================
% Algorithms
% ======================================================================
% disable ligatures ("fi" etc.) in monospace font
\DisableLigatures{encoding=*,family=tt*}
% line number format
\algrenewcommand{\alglinenumber}[1]{\footnotesize\color{anthrazit}{\texttt{#1}}}
\algrenewcommand{\algorithmicrequire}{\qquad\textbf{Input:}}
\algrenewcommand{\algorithmicensure}{\qquad\textbf{Output:}}
% function name
\algrenewcommand{\textproc}{}
% bold keywords
\algnewcommand{\Break}{\textbf{break}}
\algnewcommand{\Continue}{\textbf{continue}}
\algnewcommand{\True}{\textbf{true}}
\algnewcommand{\False}{\textbf{false}}
\algnewcommand{\Null}{\textbf{null}}
\algrenewcommand{\algorithmicend}{\textbf{end}}
\algrenewcommand{\algorithmicdo}{\textbf{do}}
\algrenewcommand{\algorithmicwhile}{\textbf{while}}
\algrenewcommand{\algorithmicfor}{\textbf{for}}
\algrenewcommand{\algorithmicforall}{\textbf{for all}}
\algrenewcommand{\algorithmicloop}{\textbf{loop}}
\algrenewcommand{\algorithmicrepeat}{\textbf{repeat}}
\algrenewcommand{\algorithmicuntil}{\textbf{until}}
\algrenewcommand{\algorithmicprocedure}{\textbf{procedure}}
\algrenewcommand{\algorithmicfunction}{\textbf{function}}
\algrenewcommand{\algorithmicif}{\textbf{if}}
\algrenewcommand{\algorithmicthen}{\textbf{then}}
\algrenewcommand{\algorithmicelse}{\textbf{else}}
\algrenewcommand{\algorithmicreturn}{\textbf{return}}
\algnewcommand{\algorithmicforever}{\textbf{for ever}}
\algdef{S}[FOR]{ForEver}{\algorithmicforever\ \algorithmicdo}
\algnewcommand{\algorithmicgoto}{\textbf{go to}}
\algnewcommand{\Goto}[1]{\algorithmicgoto\ \cref*{#1}}
\algnewcommand{\ForOneLine}[2]{%
\State\algorithmicfor\ #1\ \algorithmicdo\ #2%
}
\algnewcommand{\IfOneLine}[2]{%
\State\algorithmicif\ #1\ \algorithmicthen\ #2%
}
\algnewcommand{\ElseOneLine}[1]{%
\State\algorithmicelse\ #1%
}
% small monospace font in algorithms
%\g@addto@macro\ALG@beginalgorithmic{\small\ttfamily}
% comment format
\algrenewcomment[1]{\hfill$\rightsquigarrow$\;{\normalfont\emph{#1}}}
% set indentation to two characters
\algrenewcommand{\algorithmicindent}{\widthof{AB}}
% make [email protected] counters unique,
% otherwise hyperlinks to algorithm lines won't work
% (they will always point to the line with the same number,
% but in the first algorithm of the thesis)
\newcounter{algorithmicH}
\let\oldalgorithmic\algorithmic
\renewcommand*{\algorithmic}{\stepcounter{algorithmicH}\oldalgorithmic}
%\renewcommand*{\theHALG@line}{ALG@line.\thealgorithmicH.\arabic{ALG@line}}
% ======================================================================
% Mathematics
% ======================================================================
% automatically replace "l" with \ell in math mode
%\mathcode`l="8000
%\begingroup
%\lccode`\~=`\l
%\DeclareMathSymbol{\lsb@l}{\mathalpha}{letters}{`l}
%\lowercase{\gdef~{\ifnum\the\mathgroup=\m@ne \ell \else \lsb@l \fi}}%
%\endgroup
% change QED symbol to filled square
%\renewcommand*{\qedsymbol}{\textcolor{mittelblau}{\blacksquare}}
% redefine own proof environment (prohibits \qedhere)
%\renewenvironment{proof}[1][Proof]{%
% \noindent{\formatcaption{#1}\hspace{1em}}%
%}{\qed\par}
% siunitx setup
\sisetup{
% reduce space between units
inter-unit-product={\hspace{0.03em}},
% use fractions for inverse units
per-mode=fraction,
% use dot for product between number and power of ten
exponent-product=\cdot,
}
% add \permille macro
\DeclareSIUnit{\permille}{\text{\textperthousand}}
% add \hms command similar to \ang to describe durations
% (e.g., computation times), use as \hms{1;2;3} ==> 1h 02min 03s
\ExplSyntaxOn
\NewDocumentCommand\hms{o>{\SplitArgument{2}{;}}m}{
\group_begin:
\IfNoValueF{#1}{\keys_set:nn{siunitx}{#1}}
\siunitx_hms_output:nnn #2
\group_end:
}
\cs_new_protected:Npn \siunitx_hms_output:nnn #1#2#3
{
\IfNoValueF{#1}{
\tl_if_blank:nF{#1}{
\SI{#1}{\hour}
\IfNoValueF{#2}{~}
}
}
\IfNoValueF{#2}{
\tl_if_blank:nF{#2}{
\IfNoValueF{#1}{\tl_if_blank:nF{#1}{\sisetup{minimum-integer-digits=2}}}
\SI{#2}{\minute}
\IfNoValueF{#3}{~}
}
}
\IfNoValueF{#3}{
\tl_if_blank:nF{#3}{
\IfNoValueF{#1}{\tl_if_blank:nF{#1}{\sisetup{minimum-integer-digits=2}}}
\IfNoValueF{#2}{\tl_if_blank:nF{#2}{\sisetup{minimum-integer-digits=2}}}
\SI{#3}{\second}
}
}
}
\ExplSyntaxOff
% make spacing after partial sign smaller
\edef\partial{\mathchar\number\partial\noexpand\mkern-2mu}
% ======================================================================
% Dummy Text
% ======================================================================
% insert dummy text with TODO, warn for every usage
\newcommand*{\dummytext}[1][\value{blindtext}]{%
\todo{write}
\textcolor{gray}{\blindtext[#1]}%
}
% ======================================================================
% Dynamic Commands
% ======================================================================
% get name of current label (chapter, section, subsection, ...)
%\newcommand*{\currentname}{\@currentlabelname}
% calculate difference between page numbers
\newcommand*{\pagedifference}[2]{%
\number\numexpr\getpagerefnumber{#2}-\getpagerefnumber{#1}\relax%
}
% custom TODO command with warning
% (all packages that were tried produced problems)
\newcommand*{\todo}[1]{%
\GenericWarning{}{%
LaTeX Warning (\thesubsection\space\currentname): TODO "#1"%
}%
\textcolor{red}{TODO: #1}%
}
% set up versioning information
%\luaexec{require("version")}
% convenience commands for title page and watermarks
\newcommand*{\gitCommitText}[1][]{%
\texttt{#1\gitCommitHash}%
\ifx\gitTag\empty\else{} (\texttt{#1\gitTag})\fi%
}
\newcommand*{\compileCounterText}[1][]{%
\texttt{#1v\compileCounter}%
}
% command for checking if file is in \includeonly or not
%\newcommand*{\isincluded}[1]{%
% \@tempswatrue
% \if@partsw
% \@tempswafalse
% \edef\reserved@b{#1}%
% \@for\reserved@a:=\@partlist\do
% {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
% \fi
% \if@tempswa\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi
%}
% ======================================================================
% Text Body
% ======================================================================
% increase indentation of paragraphs (default: 1em = \quad)
\setlength{\parindent}{1em}
% prohibit inserting page breaks in footnotes
\interfootnotelinepenalty=10000
% only display underfull \hbox/\vbox warnings if really, really bad;
% in a technical text riddled with long inline formulas and narrow
% sub-captions or side-captions, it's just not possible to avoid all
% badnesses over 1000
\hbadness=9999
\vbadness=9999
% mathdesign's Charter font has some questionable kerning between some