-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththesis.sty
659 lines (554 loc) · 19.5 KB
/
thesis.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
% thesis.sty
% Copyright (c) 2018 F. Scheuermann
%
%--------------------------------------------------------------
%
% This template is emulating the style of the classicthesis by André Miede.
% The later uses KOMA script in conjunction with packages like titletoc,
% titlesec and fancyhdr. This should be avoided and therefor this package is
% written from scratch and uses solely KOMA packages like tocbasic or
% scrlayer-scrpage.
%
%
% Options
% -------
% draft:
% print a watermark in the bottom
% numberbychapter:
% reset counters after each chapter
% print:
% remove colored links
%
%
% Contents
% --------
% 1. Package Options
% 2. Fonts, encoding and colors
% 3. Headings
% 4. TOC, LOF, LOT, etc.
% 5. Misc
% 6. Math
% 7. Figures and Tables
% 8. Bibliography
%
%
% License:
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
%--------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{thesis}[2023/10/05 Package for my thesis.]
%--------------------------------------------------------------
% 1. create options for this package
%--------------------------------------------------------------
\RequirePackage{pgfkeys}
\RequirePackage{pgfopts}
\RequirePackage{xifthen}
\newif\ifdraft
\draftfalse
\newif\ifprint
\printfalse
\newif\ifnumberbychapter
\numberbychaptertrue
\pgfkeys{
thesis/.cd ,
draft/.default = ,
draft/.code = \drafttrue ,
print/.default = ,
print/.code = \printtrue ,
numberbychapter/.default = ,
numberbychapter/.code = \numberbychaptertrue ,
style/.initial = thesis,
}
\ProcessPgfOptions{/thesis}
%--------------------------------------------------------------
% 2. Fonts, encoding and colors
%--------------------------------------------------------------
% prevent Widows and orphans under all circumstances
\clubpenalty = 100000
\widowpenalty = 200000
\displaywidowpenalty = 200000
% font package for sans serif
\RequirePackage{charter}
% we use kpfonts(similar to Palatino)
\RequirePackage[
oldstylenums,
oldstyle,
largesmallcaps,
easyscsl,
uprightgreeks
]{kpfonts}
%\RequirePackage[euler-digits]{eulervm}
%\linespread{1.07} % increaes Durchschuss
% language/hyphenation
\RequirePackage[ngerman,english]{babel}
% hyphenation words with a dash (use \-/)
\usepackage[shortcuts]{extdash}
% for microtypographie (e.g. adjust spacing in small caps)
% http://www.khirevich.com/latex/microtype/
\usepackage[
activate={true,nocompatibility},
final,
%kerning=true,
factor=1100,
stretch=10,
shrink=10,
letterspace=80,
]{microtype}
% kpfonts is not supported tracking. Therefor I manually inserted
% lsstyle at the appropriate positions. If other font is used:
%\SetTracking{encoding=*,shape=sc,size=-large}{100}
%\SetTracking{encoding=*,shape=sc,size=normalsize-}{50}
\KOMAoptions{DIV=9} % recalculate Satzspiegel with new font
% encoding
\RequirePackage[utf8]{inputenc} % letters with accents
\RequirePackage[T1]{fontenc} % Use 8-bit encoding
% colors
\RequirePackage[table]{xcolor} % specifying colors
% some nice colors
\definecolor{tabblue}{RGB}{78, 121, 167}
\definecolor{tabgreen}{RGB}{89, 161, 78}
\definecolor{tabred}{RGB}{225, 87, 89}
% some packages redefine this, so we need this extra command
\AtBeginDocument{
% select which colors to use (for print or digital)
\colorlet{maincolor}{tabred}
\ifprint
\colorlet{accentcolor}{gray}
\colorlet{linkcolor}{black}
\colorlet{citecolor}{black}
\colorlet{urlcolor}{black}
\colorlet{journalcolor}{black}
\colorlet{volumnecolor}{black}
\else
\colorlet{accentcolor}{gray}
\colorlet{linkcolor}{tabblue}
\colorlet{citecolor}{tabgreen}
\colorlet{urlcolor}{tabred}
\colorlet{journalcolor}{tabblue}
\colorlet{volumnecolor}{tabred}
\fi
}
% taken from classic thesis
\def\graffito@setup{%
% \slshape\footnotesize% this was due to \slhape in above book
\itshape\footnotesize\leavevmode\color{black}%
\parindent=0pt \lineskip=0pt \lineskiplimit=0pt %
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}
%\DeclareRobustCommand{\graffito}[1]{\marginpar%
% [\graffito@setup\raggedleft\hspace{0pt}{#1}]%
% {\graffito@setup\raggedright\hspace{0pt}{#1}}}
\let\oldmarginpar\marginpar
\renewcommand{\marginpar}[1]{\oldmarginpar%
[\graffito@setup\raggedleft\hspace{0pt}{#1}]%
{\graffito@setup\raggedright\hspace{0pt}{#1}}}
%--------------------------------------------------------------
% 3. headings (part, chapter, section etc.)
%--------------------------------------------------------------
% define the headings for two styles, one for a thesis and one for
% a book. For the former, small caps are used and the headings are
% converted to lowercase first. The command \lowercase must be the
% last style command (e.g. \scshape\lsstyle\lowercase)
\renewcommand{\partpagestyle}{empty}
\setkomafont{part}{\color{maincolor}\huge\lsstyle\scshape\lowercase}
\setkomafont{partnumber}{\large}
% font for all headings
\setkomafont{chapter}{\Large\lsstyle\scshape\lowercase}
\setkomafont{section}{\large\scshape\lsstyle\lowercase}
\setkomafont{subsection}{\large\itshape}
\setkomafont{disposition}{\rmfamily\normalfont}
% change the chapter heading
% https://tex.stackexchange.com/a/330280
\DeclareMathAlphabet\EuRoman{U}{eur}{m}{n}
\SetMathAlphabet\EuRoman{bold}{U}{eur}{b}{n}
\newcommand{\eurom}{\EuRoman}
% put the chapter number at the right side
\makeatletter
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\setlength{\fboxsep}{0pt}%
\colorbox{white}{\color{accentcolor}$\eurom\thechapter$}}}%
\raisebox{\depth}{\usebox{\feline@chapter}}%
}
\renewcommand*{\chapterformat}{\feline@chapter@marker[1.61cm]}
\renewcommand\chapterlinesformat[3]{%
\Ifstr{#1}{chapter}
{%
\makebox[\textwidth][l]{%
\parbox[b]{\textwidth}{\raggedchapter #3}%
\hspace*{\marginparsep}#2%
}\\*[-.3\baselineskip]
% draw the line
{
\color{accentcolor}
\rule{\textwidth}{.4pt}%
}
\par%
}
{\@hangfrom{#2}{#3}}%
}
\makeatother
% use a dropped captial at the beginning of each chapter
\usepackage{pgfornament}
\usetikzlibrary{shapes.geometric,calc}
\usepackage{lettrine}
%\renewcommand{\LettrineTextFont}{\normalfont}
\renewcommand{\LettrineFontHook}{\color{accentcolor}}
\RequirePackage{flushend} % balance columns on last page
%--------------------------------------------------------------
% 4. table of contents and LOF,LOT,LOA
%--------------------------------------------------------------
\newcommand\gobble[1]{}% <- added
\newcommand\tocpageseparator{\footnotesize\,\mbox{---}\,}
\newcommand\tocpagenumberbox[1]{\mbox{#1}}% <- added
\RequirePackage{tocbasic}[2016/05/10]
\setcounter{tocdepth}{2}
\RedeclareSectionCommand[%
innerskip=0.2cm,
tocpagenumberbox=\gobble% <- added
]{part}
\DeclareTOCStyleEntry[%
beforeskip=1.2em,
indent=0cm,
numwidth=0.6cm,
entryformat=\color{maincolor}\lsstyle\scshape\lowercase%
]{tocline}{part}
\DeclareTOCStyleEntry[%
beforeskip=0.4em,
indent=0cm,
numwidth=0.6cm,
linefill=\enspace,%
raggedpagenumber,%
pagenumberformat=\normalsize,%
entryformat=\scshape\lowercase%
]{tocline}{chapter}
\DeclareTOCStyleEntry[%
indent=0.6cm,
linefill=\enspace,%
raggedpagenumber,%
pagenumberformat=\small%
]{tocline}{section}
\DeclareTOCStyleEntry[%
linefill=\enspace,%
raggedpagenumber,%
pagenumberformat=\small%
]{tocline}{subsection}
% apply the same style to LOF and LOT
\DeclareTOCStyleEntry[
entrynumberformat=Figure\;,
numwidth=6.5em,
indent=0cm,
linefill=\enspace,%
raggedpagenumber,%
pagenumberformat=\normalsize,%
%entryformat=\scshape\lowercase%
]{tocline}{figure}
\DeclareTOCStyleEntry[
entrynumberformat=Table\;,
numwidth=6.5em,
indent=0cm,
linefill=\enspace,%
raggedpagenumber,%
pagenumberformat=\normalsize,%
%entryformat=\scshape\lowercase%
]{tocline}{table}
% entries in LOF/LOT are not grouped by chapter
%\KOMAoptions{listof=nochaptergap}
% change title of toc at begin (babel redefines it there)
\AtBeginDocument{
\renewcommand{\contentsname}{contents}
\renewcommand{\listfigurename}{list of figures}
\renewcommand{\listtablename}{list of tables}
}
%--------------------------------------------------------------
% 5. misc
%--------------------------------------------------------------
\RequirePackage{scrhack}
% horizontal line in header
\newcommand{\HRule}{\rule{\linewidth}{0.2mm}}
% print out the current date
\usepackage{datetime}
\newdateformat{monthyeardate}{%
\monthname[\THEMONTH], \THEYEAR}
% for checkmark use pifonts with \ding{51} and crossmark \ding{55}
\newcommand{\cmark}{$\checkmark$}%
\newcommand{\xmark}{$-$}%
% ignore some warning (overleaf can not check this code)
\usepackage{silence}
%%begin novalidate
%\WarningFilter{latex}{Overwriting file}
\WarningFilter{biblatex}{Delimiter}
%%end novalidate
%--------------------------------------------------------------
% 6. Math related packages and new commands
%--------------------------------------------------------------
% For math equations, symbols, etc
% don't include amsthm for theorems
\RequirePackage[fleqn]{amsmath}
\setlength\mathindent{15pt}
\RequirePackage{amsfonts,amssymb}
% add new functions to amsmath
\DeclareMathOperator\artanh{artanh}
\DeclareMathOperator\arsinh{arsinh}
\DeclareMathOperator\arcosh{arcosh}
\DeclareMathOperator\grad{grad}
\let\div\relax % div already exists
\DeclareMathOperator\div{div}
\DeclareMathOperator\curl{curl}
% make vectores bold instead of arrow
\let\oldvec\vec
\renewcommand{\vec}[1]{\mathbf{#1}}
% package for units
\RequirePackage{siunitx}
\sisetup{%
per-mode=reciprocal,
exponent-product = \cdot ,
inter-unit-product = {\;},
range-units = single,
separate-uncertainty = true,
uncertainty-separator = {\,},
multi-part-units=single}
% declare custom units (mainly for astronomy)
% properties of our stars/planets
\DeclareSIUnit\Mearth{M_{\oplus}}
\DeclareSIUnit\Rearth{R_{\oplus}}
\DeclareSIUnit\Msun{M_{\odot}}
\DeclareSIUnit\Rsun{R_{\odot}}
\DeclareSIUnit\Lsun{L_{\odot}}
\DeclareSIUnit\Zsol{Z_{\odot}}
\DeclareSIUnit\Mstar{M_{*}}
\DeclareSIUnit\Rstar{R_{*}}
\DeclareSIUnit\Lstar{L_{*}}
% non si units
\DeclareSIUnit\angstrom{\text {Å}}
\DeclareSIUnit\year{yr}
\DeclareSIUnit\month{month}
\DeclareSIUnit\lightyear{ly}
\DeclareSIUnit\AU{AU}
\DeclareSIUnit\parsec{pc}
\DeclareSIUnit\arcsec{arcsec}
\DeclareSIUnit\arcmin{arcmin}
\DeclareSIUnit\mag{mag}
% other stuff
\DeclareSIUnit\erg{erg}
\DeclareSIUnit\eV{eV}
\DeclareSIUnit\RA{RA}
\DeclareSIUnit\DEC{DEC}
\DeclareSIUnit\dex{dex}
%--------------------------------------------------------------
% 7. figures, tables, lists and quotes
%--------------------------------------------------------------
\RequirePackage{graphicx} % including pictures
\RequirePackage{float} % fix position of floats
% place figures on single page on top
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
\graphicspath{{figures/}} % the picture directory
\newlength{\figuresize}
\setlength{\figuresize}{0.7\textwidth} % same width for all images
\RequirePackage{pgf, % import plots as pgf
pgfplots, % create plots in LaTeX
tikz} % drawing custom shapes
\pgfplotsset{compat=1.15} % backwards compatibility mode
\RequirePackage{pdfpages} % include PDFs in the document
\RequirePackage{pdflscape} % use landscape for large tables/figures
%\usepackage{rotating}
%\RequirePackage{newpax}
%\newpaxsetup{usefileattributes=true}
% if the plot contains a continous colorbar it is saved as a png.
% because we save all images in an extra folder the path are no longer valid
% one can change this manually or with this trick
% https://tex.stackexchange.com/questions/127667/matplotlib-pgf-images-in-subdirectory#130078
%\let\pgfimageWithoutPath\pgfimage
%\renewcommand{\pgfimage}[2][]{\pgfimageWithoutPath[#1]{figures/#2}}
% remove chapter from numbering for table,figures and equations
%\makeatletter
%\@removefromreset{table}{chapter}
%\@removefromreset{figure}{chapter}
%\@removefromreset{equation}{chapter}
%\makeatother
%\renewcommand{\thetable}{\arabic{table}}
%\renewcommand{\thefigure}{\arabic{figure}}
%\renewcommand{\theequation}{\arabic{equation}}
% insert ORCID icon with link to to ORCID record
\newcommand*{\orcidlink}[1]{%
\href{https://orcid.org/#1}{\,\raisebox{0.2em}{%
\includegraphics[height=0.6em,width=0.6em]{orcid.png}%
}}}
\RequirePackage[
font=small,
indention=2em,
labelfont={sc,color=black},
%margin=10pt,
hypcap=false]{caption}
% alternatively: justification=raggedright,format=plain
% position in KOMA is controled by tablecaptionsabove
\captionsetup[figure]{
name=figure,
position=below, % tell caption where to insert skip
justification=justified, % left aligned
singlelinecheck=false, % even left aligned if only one line
format=plain % plain or hang
}
\captionsetup[table]{
name=table,
position=above, % tell caption where to insert skip
justification=justified, % left aligned
singlelinecheck=false, % even left aligned if only one line
format=plain, % plain or hang
belowskip=10pt % extra space between table and caption
}
\RequirePackage{subcaption} % for subfigures
% tables
\RequirePackage{booktabs, % nicer tables
multirow, % multiple rows in table
array, % create special columns
pgfplotstable, % read in csv
}
\renewcommand{\arraystretch}{1.05} % increase height of tables
% create new column types with adjustable columnwidths
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
% lists
\RequirePackage{enumitem} % Customize lists
% customize enumerate and itemize
\setenumerate{noitemsep} % no space in enumerate
\setitemize{noitemsep, % change style of itemize
topsep=5pt,
leftmargin=15pt,
labelindent=\parindent}
\RequirePackage{csquotes}
%quotation marks in block
\renewcommand{\mkbegdispquote}[2]{\openautoquote}
\renewcommand{\mkenddispquote}[2]{\closeautoquote#1#2}
% redefine path for input command (used for pgf plots)
\makeatletter
\def\input@path{{img/}}
%or: \def\input@path{{/path/to/folder/}{/path/to/other/folder/}}
\makeatother
%--------------------------------------------------------------
% 8. bibliography and references
%--------------------------------------------------------------
% maxnames: if more authors than is truncated to minnames
\RequirePackage[
backend=biber, % use biber for the backend
backref=false, % page numbers in bibliography
style=biblatex-mnras,
% author (year) style
hyperref=true, % link to bibliography
natbib=true, % enable natbib commands
]{biblatex}
%\DeclareDelimFormat{nameyeardelim}{\addspace}
\renewcommand*{\entrysetpunct}{, }
% use links in \citeyear
\DeclareCiteCommand{\citeyear}
{}
{\bibhyperref{\printdate}}
{\multicitedelim}
{}
\DeclareCiteCommand{\citeyearpar}
{}
{\mkbibparens{\bibhyperref{\printdate}}}
{\multicitedelim}
{}
% change style of footnotes
% para puts them all in one line
\usepackage[perpage]{footmisc}
\newcommand*{\remark}[1]{\leavevmode\marginpar{#1}\ignorespaces}
\RequirePackage{hyperref} % for links and references
\RequirePackage[
noabbrev,
nameinlink,
capitalise,
]{cleveref} % easier references
%\crefdefaultlabelformat{#2\textsc{#1}#3}
\crefformat{figure}{\scshape{figure} #2#1#3}
\crefformat{table}{\scshape{table} #2#1#3}
\crefformat{equation}{#2\scshape{equation} #1#3}
\crefformat{chapter}{#2\scshape{chapter} #1#3}
\crefformat{section}{#2\scshape{section} #1#3}
\crefmultiformat{figure}{#2\scshape{figures} #1#3}{ and~#2#1#3}{, #2#1#3}{ and~#2#1#3}
\crefmultiformat{table}{#2\scshape{tables} #1#3}{ and~#2#1#3}{, #2#1#3}{ and~#2#1#3}
\hypersetup{
plainpages=false, % -
linktoc=page, % -
colorlinks=true, % - colorize links?
linkcolor={linkcolor}, % -
citecolor={citecolor}, % -
urlcolor={urlcolor}, % -
pdfborder={0 0 0}, % -
breaklinks=true, % - allow line break inside links
bookmarksnumbered=true, % -
bookmarksopen=true, % -
bookmarksdepth=2 % -
}
\usepackage[all]{hypcap} % fix location of links (\ref{})
% create list of abbreviations (LOA)
% in order to have working hyperlinks, this must be loaded after hyperref
\RequirePackage{mfirstuc-english}
\RequirePackage[
automake,
hyperfirst=true,
nogroupskip, % don't group entries by initial letter
%nonumberlist, % don't add page number in LOA
nopostdot, % don't add . at the end of definition
shortcuts, % use shorter commands like \acs{}
toc=false % no entry in TOC
]{glossaries-extra}
% remove link color
\renewcommand*{\glstextformat}[1]{\color{black}#1}
% style of LoA
\newglossarystyle{mylong}{%
\setglossarystyle{long}%
\renewenvironment{theglossary}%
{\begin{longtable}[l]{@{}p{\dimexpr 2cm-\tabcolsep}p{0.7\hsize}}}%
{\end{longtable}}%
}
\makeglossaries
%\renewcommand{\glsabbrvdefaultfont}[1]{\textsc{#1}}
\renewcommand{\glslongdefaultfont}[1]{\textit{#1}}
\setabbreviationstyle{long-short}
%--------------------------------------------------------------
% header and footer
%--------------------------------------------------------------
% NOTE: normally, hyperref should be the last package to load.
% however since cleveref requires hyperref, this is loaded
% afterwards. scrlayer can mess up some commands such that
% cleveref can not write to .aux and thus doesn't work
% correct. To avoid this it mus be loaded afterwards.
\RequirePackage{scrlayer-scrpage}
\clearpairofpagestyles % remove default header
\renewcommand\partmarkformat{} % remove part number in \headmark
\renewcommand\chaptermarkformat{} % remove chapter number in \headmark
\renewcommand\sectionmarkformat{} % remove section number in \headmark
\automark*[section]{chapter}
% if you want lehead instead you must figure out how to put the number on the chapter
% page into the footer
% optional argument sets plain.scrheadings
\lehead[]{%
\makebox[0pt][r]{\makebox{\normalsize\pagemark\quad}}%
{\color{darkgray}\normalfont\scshape\MakeLowercase\headmark}
}
\rohead[]{%
\makebox{\makebox[\textwidth][l]{\hfill\color{darkgray}\normalfont\headmark}{\normalsize\quad\pagemark}}
}
\rofoot[\pagemark]{}
\lefoot[\pagemark]{}
% add draft mark if draft option is used
\newcommand{\draftversion}{\normalfont\color{darkgray}\small\vspace{-6.\baselineskip}[\monthyeardate\today\ -- draft version]}
\ifdraft
\cfoot[\draftversion]{\draftversion}
\fi