-
Notifications
You must be signed in to change notification settings - Fork 0
/
ucphthesis.sty
917 lines (850 loc) · 28.3 KB
/
ucphthesis.sty
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
% **************************************************
%
% ucphthesis.sty
%
% -- A LaTeX Style for Thesis at UCPH --
%
% Copyright 2019 M. Roald-Arbøl
%
% **************************************************
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in:
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% The Current Maintainer of this work is M. Roald-Arbøl.
% This work consists of all files listed in README.md.
%
%
% **************************************************
%
% Please read the README.md file.
%
% **************************************************
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{ucphthesis}[2019/03/25 v0.1 Clean-looking UCPH thesis style modified version of cleanstyle.sty by R. Langner]
%
% **************************************************
% Package options
% **************************************************
%
% -- process all available package options
%
%
% The xkeyval package enables us to handle for example key-value pairs
% in an easy way
\RequirePackage{xkeyval}
% OPTION sansserif
% --> values = true|false
\define@boolkey[ct]{cthesis}{sansserif}[true]{}
\setkeys[ct]{cthesis}{sansserif=false}
% OPTION hangfigurecaption
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangfigurecaption}[true]{}
\setkeys[ct]{cthesis}{hangfigurecaption=false}
% OPTION hangsection
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangsection}[true]{}
\setkeys[ct]{cthesis}{hangsection=true}
% OPTION hangsubsection
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangsubsection}[true]{}
\setkeys[ct]{cthesis}{hangsubsection=true}
% MY CHANGES: OPTION hangsubsubsection
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangsubsubsection}[true]{}
\setkeys[ct]{cthesis}{hangsubsubsection=true}
% OPTION figuresep
% --> values = none|colon|period|space|quad|endash
\define@choicekey*[ct]{cthesis}{figuresep}{none,colon,period,space,quad,newline,endash}[endash]{\def\cthesis@figuresep{#1}}
\setkeys[ct]{cthesis}{figuresep=endash}
% OPTION colorize
% --> values = full|reduced|bw
\define@choicekey*[ct]{cthesis}{colorize}[\val\colorizenr]{full,reduced,bw}[full]{\def\cthesis@colorize{\colorizenr}}
\setkeys[ct]{cthesis}{colorize=full}
% OPTION colortheme
% --> values = ucph|sund|science|hum|samf|jura|teo
\define@choicekey*[ct]{cthesis}{colortheme}[\val\themenr]{ucph,sund,science,hum,samf,jura,teo}[ucph]{\def\cthesis@colortheme{\themenr}}
\setkeys[ct]{cthesis}{colortheme=ucph}
% --> values =biber|bibtex
\define@choicekey*[ct]{cthesis}{bibsys}[\val\bibsysnr]{biber,bibtex}[bibtex]{\def\cthesis@bibsys{#1}}
\setkeys[ct]{cthesis}{bibsys=bibtex}
% OPTION bibfile
% --> values = file name of your bibtex file
\define@key[ct]{cthesis}{bibfile}[bib-refs]{\def\cthesis@bibfile{#1}}
\setkeys[ct]{cthesis}{bibfile=references}
% OPTION bibstyle
% --> values = alphabetic|numeric|authoryear
\define@choicekey*[ct]{cthesis}{bibstyle}[\val\bibstylenr]{alphabetic,numeric,authoryear,nature}[alphabetic]{\def\cthesis@bibstyle{#1}}
\setkeys[ct]{cthesis}{bibstyle=authoryear}
\DeclareOptionX*{
\PackageWarning{ucphthesis}{Unknown option ‘\CurrentOption’}%
}
\ProcessOptionsX[ct]<cthesis>
% **************************************************
% Color Definitions
% **************************************************
%
% -- defines color themes and color commands
%
%
% The xcolor package enables us to create/handle/name different colors
% \RequirePackage[dvipsnames]{xcolor} % avoid error on overleaf
\RequirePackage[absolute]{textpos}
\RequirePackage{afterpage}
\RequirePackage[printonlyused,withpage]{acronym}
\newcommand\blankpage{%
\null
\thispagestyle{empty}%
\addtocounter{page}{-1}%
\newpage
}
% updates all colors regarding the defined main and accessory
% color, as well as the defined colorize mode (full, reduced, bw)
\long\def\ct@cthesis@updatecolors{%
% sets all colors (like colorize == full)
% -- footer colors
\colorlet{ctcolorfooterpage}{ctcolorblack}
\colorlet{ctcolorfooterline}{ctcolormain}
\colorlet{ctcolorfootermark}{ctcolorblack}
\colorlet{ctcolorfootertitle}{ctcolormain}
% -- sectioning colors
\colorlet{ctcolortitle}{ctcolormain}
\colorlet{ctcolorpartnum}{ctcolormain}
\colorlet{ctcolorpartline}{ctcolorblack}
\colorlet{ctcolorparttext}{ctcolorblack}
\colorlet{ctcolorchapternum}{ctcolormain}
\colorlet{ctcolorchapterline}{ctcolormain}
\colorlet{ctcolorsection}{ctcolormain}
\colorlet{ctcolorsubsection}{ctcolormain}
\colorlet{ctcolorparagraph}{ctcolorblack}
% --> text colors
\colorlet{ctcolorfloatlabel}{ctcoloraccessory}
\colorlet{ctcolorlistlabel}{ctcolormain}
\ifcase\cthesis@colorize
% case = 0 (colorize == full)
% do nothing
\or
% case = 1 (colorize == reduced)
% --> footer colors
\colorlet{ctcolorfooterline}{ctcolorgray}
\colorlet{ctcolorfootertitle}{ctcolorgray}
% --> sectioning colors
\colorlet{ctcolorsubsection}{ctcolorblack}
\colorlet{ctcolorpartnum}{ctcolorblack}
% --> text colors
\colorlet{ctcolorlistlabel}{ctcolorblack}
\or
% case = 2 (colorize == bw)
% --> footer colors
\colorlet{ctcolorfooterline}{ctcolorgray}
\colorlet{ctcolorfootertitle}{ctcolorgray}
% --> sectioning colors
\colorlet{ctcolortitle}{ctcolorblack}
\colorlet{ctcolorpartnum}{ctcolorblack}
\colorlet{ctcolorchapternum}{ctcolorblack}
\colorlet{ctcolorchapterline}{ctcolorblack}
\colorlet{ctcolorsection}{ctcolorblack}
\colorlet{ctcolorsubsection}{ctcolorblack}
% --> text colors
\colorlet{ctcolorfloatlabel}{ctcolorblack}
\colorlet{ctcolorlistlabel}{ctcolorblack}
\else
\fi
}
% sets the main and accessory color for the document
\def\cthesissetcolor#1#2#3{%
\definecolor{ctcolormain}{#1}{#2}%
\definecolor{ctcoloraccessory}{#1}{#3}%
\ct@cthesis@updatecolors%
}
% ----------------------------------------
% UCPH Theme main and accessory colors
% (refer to https://bit.ly/2UY15tt for colors)
% ----------------------------------------
% sets the ucph color theme
\def\cthesissetcolorucph{%
\cthesissetcolor{cmyk}{0, .87, .82, .31}{0, .75, .75, .44}%
}
% sets the sund color theme
\def\cthesissetcolorsund{%
\cthesissetcolor{cmyk}{1, .55, 0, .20}{.69, .55, 0, .58}
}
% sets the science color theme
\def\cthesissetcolorscience{%
\cthesissetcolor{cmyk}{.29, 0, .52, .52}{.29, 0, .58, .67}%
}
% sets the hum color theme
\def\cthesissetcolorhum{%
\cthesissetcolor{cmyk}{.64, .48, 0, .33}{.65, .36, 0, .57}%
}
% sets the samf color theme
\def\cthesissetcolorsamf{%
\cthesissetcolor{cmyk}{0, .73, 1, .17}{0, .67, 1, .4}%
}
% sets the jura color theme
\def\cthesissetcolorjura{%
\cthesissetcolor{cmyk}{0, 0, 1, .45}{0, 0, .41, .69}%
}
% sets the teo color theme
\def\cthesissetcolorteo{%
\cthesissetcolor{cmyk}{.43, .43, 0, .22}{.41, .41, 0, .56}%
}
% ----------------------------
% defines general colors
\definecolor{ctcolorblack}{gray}{0}
\definecolor{ctcolorgray}{gray}{.5}
\definecolor{ctcolorgraylight}{gray}{.8}
% sets the color theme regarding the given package option colortheme
\ifcase\cthesis@colortheme
% case 0 (colortheme == ucph)
\cthesissetcolorucph
\or
% case 1 (colortheme == sund)
\cthesissetcolorsund
\or
% case 2 (colortheme == science)
\cthesissetcolorscience
\or
% case 3 (colortheme == hum)
\cthesissetcolorhum
\or
% case 2 (colortheme == samf)
\cthesissetcolorsamf
\or
% case 2 (colortheme == jura)
\cthesissetcolorjura
\or
% case 2 (colortheme == teo)
\cthesissetcolorteo
\else
% all other cases
\cthesissetcolorucph
\fi
% **************************************************
% Font Definitions (see http://www.tug.dk/FontCatalogue/)
% **************************************************
\RequirePackage[T1]{fontenc} % font types and character verification
%\ifthenelse{\boolean{@sansserif}}%
\ifct@cthesis@sansserif
% {%
% Using sans-serif fonts
%
%\RequirePackage{helvet} % Font: Helvetica
%\RequirePackage{nimbus} % Font: Nimbus Sans, a clone of the Helvetica
\RequirePackage{tgheros} % Font: TEX Gyre Heros
%\RequirePackage{libertine} % Font: Biolinum, the standard sans serif typeface with the Libertine package
%\RequirePackage[scaled]{berasans} % Font: Bera Sans, a a version of Bitstream Vera Sans slightly enhanced
\renewcommand*\familydefault{\sfdefault}%
% }{%
\else
% Using serif fonts
%
\RequirePackage{lmodern} % font set: Latin Modern
\RequirePackage{charter} % font set: Charter
%\RequirePackage{fourier} % font set: (basically improved utopia)
% }
\fi
%\usepackage{mathptmx} % sets font to times new roman
% **************************************************
% Load Packages
% **************************************************
% \RequirePackage{fixltx2e} % packages provides fixes to LaTeX2e
\RequirePackage{microtype} % typographic tuning
\RequirePackage{setspace} % for line spacing, e.g. \onehalfspacing
\RequirePackage[]{graphicx} % graphics import features
\RequirePackage{fancyhdr} % for header and footer modifications
\RequirePackage{enumitem} % for simple list modifications
\RequirePackage{blindtext} % package for blind text
\RequirePackage{textcomp} % different symbols
\RequirePackage{hyperref} % interactive link inside the document
\RequirePackage{eso-pic} % inserting picture on title page
\RequirePackage{transparent} % allows for opacity
\RequirePackage{tikz} % creating figures and importing R
\RequirePackage{sidecap} % begin{SCfigure} for caption side
\RequirePackage{subcaption} % allows multiple subfigures
\RequirePackage{soul} % potential solution to letter spacing
\RequirePackage{afterpage} % allows figures to have their own page
\RequirePackage[export]{adjustbox} % allows positioning of figures
\RequirePackage{changepage}
\RequirePackage[vertfit]{breakurl}
\RequirePackage{array}
\RequirePackage{multirow}
\RequirePackage{floatrow}
\RequirePackage{fullwidth}
%
\RequirePackage[ % modify figure and table captions
font={small}, % - small font size
labelfont={bf,sf,color=ctcolorfloatlabel},% - label in bold, sans-serif and magenta
labelsep=\cthesis@figuresep, % - separator: none, colon, period, space, quad, newline, endash
singlelinecheck=false % - no centered single-lined captions
]{caption}[2008/08/24]
%\ifthenelse{\boolean{@figurecaptionoutside}}%
\ifct@cthesis@hangfigurecaption
% {%
\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}%
\captionsetup{format=llap,labelsep=quad,singlelinecheck=false}%
% }{}
\fi
%
\RequirePackage[ % page layout modifications
paper=b5paper, % - use B5 paper size
%scale={0.86,0.94}, % - total body size (h,v)
%scale={0.86,0.94}, % - total body size (h,v)
nohead, % - no header
includefoot, % - include footer space
includemp, % - include side note space
bindingoffset=0.5cm, % - binding correction (exclude with even margins)
top=1.5cm, % - total body: top margin % MY CHANGES: Set to 2.5 instead of 1cm (mirrors footer space
left=1cm, % - total body: left margin (odd pages)(2.75 for even margins)
right=0.5cm, % - total body: right margin (odd pages)
bottom=1cm, % - total body: bottom margin
marginparwidth=1.75cm, % - width for side note
marginparsep=10pt, % - space between notes and body text (content)
footskip=1cm, % - footer skip size % MY CHANGES: set to 1cm instead of 2 cm
]{geometry}
%
\RequirePackage[ % advanced quotes
strict=true, % - warning are errors now
style=german % - german quotes
]{csquotes}
%
\RequirePackage[ % use biblatex for bibliography
backend=\cthesis@bibsys, % - use biber backend (bibtex replacement) or bibtex
bibencoding=utf8, % - use auto file encode
style=\cthesis@bibstyle, % - use alphabetic (or numeric) bib style
natbib=true, % - allow natbib commands
dashed=false, % - ensures duplicate author mentions
hyperref=true, % - activate hyperref support
%backref=false, % - activate backrefs
isbn=false, % - don't show isbn tags
url=true, % - don't show url tags
doi=true, % - don't show doi tags
%urldate=long, % - display type for dates
%uniquename=false, % - remove first names
date=year,
firstinits=true,
uniquelist=false,
maxnames=15,%
% minnames=1,%
maxbibnames=10,%
minbibnames=3,%
maxcitenames=1,%
mincitenames=1%
]{biblatex}
\bibliography{\cthesis@bibfile}
% make \fullcite show all authors (up to 99)
% https://tex.stackexchange.com/questions/126226/how-do-i-instruct-fullcite-to-use-maxbibnames-rather-than-maxcitenames/267089#267089
\preto\fullcite{\AtNextCite{\defcounter{maxnames}{99}}}
\DefineBibliographyStrings{english}{%
andothers = {{\textit{et\,al\adddot}}}, % 'et al.' in italics
}
% **************************************************
% Text Format
% **************************************************
\onehalfspacing % value for line spacing, use \setstretch{} or \singlespacing or \onehalfspacing or \doublespacing
\setlength{\parindent}{0em} % value for paragraph indentation
\clubpenalty = 10000 % prevent single lines at the beginning of a paragraph (Schusterjungen)
\widowpenalty = 10000 % prevent single lines at the end of a paragraph (Hurenkinder)
\displaywidowpenalty = 10000 %
% **************************************************
% List Definitions
% **************************************************
\newenvironment{my_list}%
{\begin{enumerate}%
\setlength{\itemsep}{1pt}%
\setlength{\parskip}{0pt}%
\setlength{\parsep}{0pt}%
}%
{\end{enumerate}}
%
\newenvironment{my_list_num}
{\begin{enumerate}[topsep=-5pt,partopsep=0pt,parsep=2pt,itemsep=3pt]}
{\end{enumerate}}%
\newenvironment{my_list_item}
{\begin{itemize}[topsep=-5pt,partopsep=0pt,parsep=2pt,itemsep=3pt]}
{\end{itemize}}%
\newenvironment{ct_version_list}
{\begin{itemize}[topsep=-5pt,partopsep=0pt,parsep=2pt,itemsep=3pt]}
{\end{itemize}}%
\newenvironment{ct_version_list_sub}
{\begin{itemize}[topsep=-0pt,partopsep=0pt,parsep=0pt,itemsep=0pt]}
{\end{itemize}}%
\renewcommand{\descriptionlabel}[1]{%
\hspace*{\labelsep}%
\color{ctcolorlistlabel}%
\tgherosfont\textbf{#1}%
}
\newenvironment{my_list_desc}
{\begin{description}[%
style=multiline,%
topsep=-5pt,%
leftmargin=3cm,%
partopsep=0pt,%
parsep=2pt,%
itemsep=3pt%
]}
{\end{description}}%
% **************************************************
% Header and Footer
% **************************************************
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{%
\footnotesize%
{\color{ctcolorfootermark}\textbf{\chaptername\ \thechapter}}%
\quad%
{\color{ctcolorfootertitle}#1}%
}{}%
}
\renewcommand{\sectionmark}[1]{%
\markright{%
\footnotesize%
{\color{ctcolorfootermark}\textbf{\thesection}}%
\quad%
{\color{ctcolorfootertitle}#1}%
}%
}
%
\fancypagestyle{plain}{%
\fancyhf{}
\fancyfootoffset[OR]{1.85cm}
\fancyfoot[OR]{%
{\ }\tgherosfont%
{\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
\hspace*{10pt}\begin{minipage}[b]{1.5cm}%
\color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
\end{minipage}%
}
\fancyfootoffset[EL]{1.85cm}
\fancyfoot[EL]{%
\tgherosfont%
\begin{minipage}[b]{1.5cm}%
\raggedleft\color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
\end{minipage}%
\hspace*{10pt}{\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
%
\fancypagestyle{maincontentstyle}{%
\pagestyle{plain}
\fancyhf{}
\fancyfootoffset[OR]{1.85cm}
\fancyfoot[OR]{%
{\ }\tgherosfont\footnotesize%
\rightmark%
\hspace*{0.75cm}{\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
\hspace*{10pt}\begin{minipage}[b]{1.5cm}%
\color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
\end{minipage}%
}
\fancyfootoffset[EL]{1.85cm}
\fancyfoot[EL]{%
\tgherosfont\footnotesize%
\begin{minipage}[b]{1.5cm}%
\raggedleft\color{ctcolorfooterpage}\normalsize\textbf{\thepage}%
\end{minipage}%
\footnotesize%
\hspace*{10pt}{\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}}%
\hspace*{0.75cm}\leftmark%
}
}
% **************************************************
% New Commands
% **************************************************
% TODO command
\definecolor{color_todo}{rgb}{.6,.8,.2}
\newcommand{\TODO}[1]{{\color{color_todo}\textbf{[TODO #1]}}}
%
%
% ref commands, e.g. for images, tables and text labels
% --------------------------------------------------
% RESULT = (siehe Tab. 12.4)
\newcommand{\tabref}[1]{(siehe Tab.~\ref{#1})}
%
% RESULT = (siehe Tab. 12.4)
\newcommand{\tableref}[1]{(siehe Tab.~\ref{#1} Seite~\pageref{#1})}
%
% --------------------------------------------------
% RESULT = (siehe 3.4)
\newcommand{\tref}[1]{(siehe \ref{#1})}
%
% RESULT = Abschnitt 3.4
\newcommand{\treft}[1]{Abschnitt~\ref{#1}}
%
% RESULT = (siehe 3.4, Seite 12)
\newcommand{\textref}[1]{(siehe \ref{#1}, Seite~\pageref{#1})}
%
% RESULT = Abschnitt 3.4 (siehe Seite 12)
\newcommand{\textreft}[1]{Abschnitt~\ref{#1} (siehe Seite~\pageref{#1})}
%
% --------------------------------------------------
% RESULT = (siehe Abb. 10.4)
\newcommand{\fref}[1]{(siehe Abb.~\ref{#1})}
%
% RESULT = (siehe Abb. 10.4 b)
\newcommand{\frefadd}[2]{(siehe Abb.~\ref{#1}~#2)}
%
% RESULT = (siehe Abb. 10.4, Seite 12)
\newcommand{\figref}[1]{(siehe Abb.~\ref{#1}, Seite~\pageref{#1})}
%
% RESULT = (siehe Abb. 10.4 b, Seite 12)
\newcommand{\figrefadd}[2]{(siehe Abb.~\ref{#1}~#2, Seite~\pageref{#1})}
%
% RESULT = Abbildung 10.4
\newcommand{\figreft}[1]{Abbildung~\ref{#1}}
%
% RESULT = Abbildung 10.4 b
\newcommand{\figrefaddt}[2]{Abbildung~\ref{#1}~#2}
%
% --------------------------------------------------
% RESULT = (siehe Seite 12)
\newcommand{\seepage}[1]{(siehe Seite~\pageref{#1})}
% **************************************************
% Sectioning Commands
% **************************************************
%
\newcommand*{\ctSetFont}[3]{%
arg1=#1, arg2=#2, arg3=#3%
}
% own font definitions
\newcommand{\helv}{\fontfamily{phv}\fontsize{9}{11}\selectfont}
\newcommand{\book}{\fontfamily{pbk}\fontseries{m}\fontsize{11}{13}\selectfont}
\newcommand{\tgherosfont}{\fontfamily{qhv}\selectfont}
\newcommand{\thesispartlabelfont}{\color{ctcolorpartnum}\book\fontsize{60}{60}\selectfont}
\newcommand{\thesispartfont}{\color{ctcolorparttext}\huge \tgherosfont\selectfont}
\newcommand{\thesischapterfont}{\color{ctcolorblack}\huge \fontfamily{phv}\selectfont}
%\newcommand{\thesissectionfont}{\color{ctcolormain}\LARGE\bfseries \tgherosfont}
\newcommand{\thesissectionfont}{\color{ctcolorsection}\large\tgherosfont} % MY CHANGES: Change from LARGE to large
\newcommand{\thesissubsectionfont}{\color{ctcolorsubsection}\normalsize \tgherosfont} % MY CHANGES: Change from Large to normalsize
\newcommand{\thesissubsubsectionfont}{\color{ctcolorsubsection}\small \tgherosfont} % MY CHANGES: Added
\newcommand{\thesisparagraphfont}{\color{ctcolorparagraph}\tgherosfont\small\bfseries}
%
% headings
\setkomafont{part}{\thesispartfont} % for chapter entries
\setkomafont{chapter}{\thesischapterfont} % for chapter entries
\setkomafont{section}{\thesissectionfont} % for section entries
\setkomafont{subsection}{\thesissubsectionfont} % for section entries
\setkomafont{subsubsection}{\thesissubsubsectionfont} % MY CHANGES: Added
%\addtokomafont{paragraph}{\tgherosfont}
\setkomafont{paragraph}{\thesisparagraphfont}
%\setkomafont{subsection}{\large} % for subsection entries
%
% **************************************************
% Sectioning
% **************************************************
%
% -- modifications regarding sectioning (structural) commands,
% i.e. \part, \chapter, \section, \subsection, \subsubsection, \paragraph
%
%
% The package titlesec enables us to modify (style) the sectioning commands
% -- usage: \titlespacing{\command}{left}{before-sep}{after-sep}[right-sep]
% -- usage: \titleformat{\command}[shape]{format}{label}{sep}{before}[after]
% -- usage: \titleclass{\command}{class}
% -- classes: page (single page), top (like chapters),
% straight (title in the middle)
\RequirePackage{titlesec}
%
% > formats: \part
\titleclass{\part}{top} % <-- display:
\assignpagestyle{\part}{empty} % <-- no page numbers/decorations
\titleformat{\part}%
[display]%
{\usekomafont{part}}%
{\raggedleft{%
{\thesispartlabelfont%
\partname\ \thepart\ \quad}%
{\color{ctcolorpartline}%
\hspace*{-200pt}\rule[20pt]{600pt}{2pt}}
}%
}%
{0em}%
{\raggedleft}%
[\phantomsection]
%
% > formats: \chapter
%
% The following command is used to avoid overlapping
% of the chapter headline text, see bug/ticket #1
% Solution adapted according to the comment from "Gonzalo Medina" - Thanks
% http://tex.stackexchange.com/questions/165878/width-of-chapter-section-with-titlesec
\newcommand\ctformatchapter[1]{\parbox[t]{\dimexpr\textwidth-4em\relax}{\raggedright#1}}
%
\titleformat{\chapter}[display]%
{\usekomafont{chapter}}%
{\vspace{-8em}\raggedleft{% MY CHANGES: changed from -8em to -11em to lift up the chapter name
{\color{ctcolorchapterline}%
\rule[-5pt]{2pt}{6cm}}\quad%
{\color{ctcolorchapternum}
\fontsize{60}{60}\selectfont\thechapter}%
}%
}%
{-2.1em}% NOTE: adjusts so that chapter title is on line with chapter number
{\ctformatchapter}%
[\phantomsection]
%
% > formats: \section
\titlespacing{\section}{0em}{.75em}{.2em}%[0pt]
%
%\ifthenelse{\boolean{@sectionlabeloutside}}%
\ifct@cthesis@hangsection
% {%
\titleformat{\section}[hang]%
{\usekomafont{section}}%
{\color{ctcolorblack}
\thesection
\hspace*{10pt}
}%
{0pt}%
{\raggedright}%
[\phantomsection]
% }{%
\else
\titleformat{\section}[block]%
{\usekomafont{section}}%
{\color{ctcolorblack}\thesection\hspace*{10pt}}%
{0pt}%
{\raggedright}%
[\phantomsection]
% }
\fi
%
% > formats: \subsection
\titlespacing{\subsection}{0.5em}{0em}{0em}%[0pt]
%\ifthenelse{\boolean{@subsectionlabeloutside}}%
\ifct@cthesis@hangsubsection
% {%
\titleformat{\subsection}[hang]%
{\usekomafont{subsection}}%
{\color{ctcolorblack}
\thesubsection
\hspace*{10pt}}%
{0pt}%
{\raggedright}%
[\phantomsection]
% }{%
\else
\titleformat{\subsection}[block]%
{\usekomafont{subsection}}%
{\color{ctcolorblack}\thesubsection\hspace*{10pt}}%
{0pt}%
{\raggedright}%
[\phantomsection]
% }
\fi
%
% > formats: \subsubsection
\titlespacing{\subsubsection}{0em}{0em}{-1em}%[0pt]
%\ifthenelse{\boolean{@subsectionlabeloutside}}%
\ifct@cthesis@hangsubsubsection
% {%
\titleformat{\subsubsection}[hang]%
{\usekomafont{subsubsection}}%
{\color{ctcolorblack}
\thesubsubsection
\hspace*{10pt}}%
{0pt}%
{\raggedright}%
%[\phantomsection]
% }{%
\else
\titleformat{\subsubsection}[block]%
{\usekomafont{subsubsection}}%
{\color{ctcolorblack}\thesubsubsection\hspace*{10pt}}%
{0pt}%
{\raggedright}%
[\phantomsection]
% }
\fi
%
% > formats: \paragraph
\titlespacing{\paragraph}{0pt}{\parsep}{1em}%[0pt]
% \titleformat{\paragraph}[runin]%
% {\usekomafont{paragraph}}%
% {}%
% {}%
% {}%
% []
%
%
% **************************************************
% ToC, LoF, LoT
% **************************************************
%
% -- modifications regarding the table of contents,
% the list of figures and the list of tables
%
%
% The tocloft package enables us to control the typographic design of the
% table of contents, list of figures and list of tables
\RequirePackage{tocloft}
%
% > adjusts the indention for figure and table entries (lof and lot)
% -- \cftsetindents{entry}{indent}{numwidth} sets the entry's indent to
% the length indent and its numwidth to the length numwidth
\cftsetindents{figure}{0em}{3em}
\cftsetindents{table}{0em}{3em}
%
%
%
% **************************************************
% Mishmash
% **************************************************
%
% Clean chapter quotations
\newcommand{\hugequote}{%
{\book\fontsize{75}{80}\selectfont%
\hspace*{-.475em}\color{ctcolorgraylight}%
\textit{\glqq}%
\vskip -.26em}%
}
\newcommand{\cleanchapterquote}[3]{%
\begin{minipage}{.865\textwidth}%
\begin{flushright}
\begin{minipage}{.65\textwidth}%
\begin{flushleft}
{\hugequote}\textit{#1}
\end{flushleft}
\begin{flushright}
--- \textbf{#2} \\
#3
\end{flushright}
\end{minipage}%
\end{flushright}
\end{minipage}%
\bigskip
}
%
% Clean Quotation environment
\newenvironment{thesis_quotation}%
{%
\begin{minipage}{.865\textwidth}%
\begin{flushright}
\begin{minipage}{.95\textwidth}%
}%
{%
\end{minipage}%
\end{flushright}
\end{minipage}%
}%
%
% Clean signs around word origins in definitions
%\newcommand{\cthesisorigin}[1]{\textsf{\textlangle}#1\textsf{\textrangle}}
% **************************************************
% Title page images
% **************************************************
\graphicspath{ {./figures/} } % specifies the root folder for figures
\def\KUbold{\fontseries{bx}\selectfont}
\def\KUsemibold{\fontseries{sb}\selectfont}
\def\MYthesisname{\fontseries{m}\selectfont}
\def\KU@SUBMISSIONSTATEMENT{%
This thesis has been submitted to the Graduate School
of the Faculty of Health and Medical Sciences, University of Copenhagen on \thesisDate
}
\newcommand\makekutitle{
\thispagestyle{empty}
\AddToShipoutPicture*{\put( -85, -95){\includegraphics*{logos/ku-logo}}}
\AddToShipoutPicture*{\put(-35, -115){\includegraphics*{logos/sund-english}}}
\begin{textblock}{14}(1.14, 4) % last was 4 before
\centering
\noindent\fontsize{19pt}{23pt}\KUsemibold % set the font size (19pt)
\thesisTitle
% % you can also manipulate it futher to get your title in specified line breaks
% First line\\seond line
\end{textblock}
\begin{textblock}{14}(1.14, 5.13)
\centering
\noindent\fontsize{16pt}{18pt}\KUsemibold\thesisSubject % 16
\par\vspace{-5mm}
\noindent\fontsize{14pt}{16pt}\KUsemibold\thesisName
\end{textblock}
\begin{textblock}{14}(1.14, 6.2)
\centering
\noindent\fontsize{11pt}{11pt}Principal supervisor: \thesisPrincipalSupervisor
\end{textblock}
\begin{textblock}{20}(1.01, 6.8)
\hspace{-2cm}
%\rule{20cm}{2pt}
\end{textblock}
% ! Frontpage layout: Quite hacky...
\ifthenelse{\equal{\frontpageimage}{}}{}{
\AddToShipoutPicture*{\put(80, 65){ % where to place
% adapt height and width in case you image is different
{\includegraphics*[width=120mm, height=120mm]{theme/\frontpageimage}}
}}
}
\begin{textblock}{12}(1.14, 14.6)
\hspace{-3cm}
%\rule{20cm}{2pt}
\par
\vspace{-0.5cm}
\fontsize{11pt}{12pt}
\noindent\KU@SUBMISSIONSTATEMENT
\end{textblock}
\phantom{...}
\newpage
\noindent
}
\newcommand\TitleBackground{%
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
{%\transparent{.9}
\includegraphics[width=\paperwidth,
height=\paperheight,%
keepaspectratio]{theme/\thesisTheme.pdf}}%
\vfill
}}}
%
\newcommand\TitleWatermark{% % Watermark Only
\put(0,0){%
\parbox[b][\paperheight]{\paperwidth}{%
\vfill
\centering
{%\transparent{.9}
\includegraphics[width=\paperwidth,
height=\paperheight,%
keepaspectratio]{theme/absalon_watermark.pdf}}%
\vfill
}}}
%from benja thesis
\definecolor{blu}{RGB}{29, 89, 168}
\definecolor{rosso}{RGB}{245, 24, 0}
\definecolor{cartazucchero}{RGB}{130, 180, 245}
\definecolor{verde}{RGB}{205, 245, 44}
\definecolor{oliva}{RGB}{109, 164, 95}
\newcommand{\pseudopart}[2][\quad, \cleardoublepage]{%
\cleardoublepage
\thispagestyle{empty}
\pagecolor{blu}
\begin{fullwidth}
~\vfill
~\vfill
\begin{flushright}
{\fontsize{60}{75}\color{black}\selectfont#1\quad}
\phantomsection
\addcontentsline{toc}{section}{#1}
\end{flushright}
~\vfill
\end{fullwidth}
\newpage
\afterpage{\pagecolor{white}}
\thispagestyle{empty}
\hbox{}
#2 % so we can let subsequent chapter do \cleardoublepage when relevant (e.g. glossaries)
}
\newcommand{\fakesection}[1]{%
\par\refstepcounter{section}% Increase section counter
\sectionmark{#1}% Add section mark (header)
\addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}% Add section to ToC
% Add more content here, if needed.
}