-
Notifications
You must be signed in to change notification settings - Fork 4
/
jkureport.sty
2584 lines (2345 loc) · 98.3 KB
/
jkureport.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
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% LaTeX Style for Various Reports and Theses at Johannes Kepler University Linz
%%
%% Copyright (C) 2021-2024 Michael Roland
%%
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{jkureport}[2023/12/14 v2.1+git JKU Linz Thesis and Report Style]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Dependencies
%%
\RequirePackage{scrhack}
\RequirePackage{etoolbox}
\RequirePackage{pgfkeys}
\RequirePackage{pgfopts}
\RequirePackage{graphicx}
\RequirePackage{xcolor}
\RequirePackage{tikz}
\usetikzlibrary{backgrounds}
\usetikzlibrary{calc}
\RequirePackage{xstring}
\RequirePackage{babel}
\RequirePackage{translations}
\RequirePackage[calc,useregional]{datetime2}
\RequirePackage{amsmath}
\RequirePackage{url}
\RequirePackage{enumitem}
\RequirePackage[
bookmarks=true,
%bookmarksnumbered=false,
%bookmarksopen=true,
linkcolor={jkuPurple},
urlcolor={jkuBlue},
colorlinks=false,
unicode=true,
pdfa,
]{hyperref}
\RequirePackage{hyperxmp}
\RequirePackage[
numbered=false,
open=true,
]{bookmark}
\hypersetup{
pdfstartview=FitH,
pdfpagelayout=OneColumn,
pdfborder={0 0 0},
keeppdfinfo,
pdfapart=1,
pdfaconformance=B,
}
\RequirePackage{multirow}
\RequirePackage{array}
\RequirePackage{tabularx}
\RequirePackage{booktabs}
\RequirePackage{rotating}
\RequirePackage{colortbl}
\RequirePackage{iftex}
% legacy packages prior to merge into iftex; still relevant?
\@ifundefined{ifluatex}{%
\RequirePackage{ifluatex}
}{}
\@ifundefined{ifxetex}{%
\RequirePackage{ifxetex}
}{}
\RequirePackage{verbatim}
\RequirePackage{tcolorbox}
\tcbuselibrary{skins}
% Hack: conditionally load packages that may cause conflicts with others
\AtEndPreamble{%
\@ifpackageloaded{minted}{}{%
% minted and listings can't co-exist when scrhack for listings/floats is loaded.
% to avoid failure, we only load the listings package if minted was not loaded
% by the user
\RequirePackage{listings}%
}%
}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% KOMA-Script checking
%%
\ifdefstring{\KOMAClassName}{scrartcl}{%
}{\ifdefstring{\KOMAClassName}{scrreprt}{%
}{\ifdefstring{\KOMAClassName}{scrbook}{%
}{\ifdef{\KOMAClassName}{%
\PackageWarning{jkureport}{This package expects one of the KOMA-Script classes `scrartcl', `scrreprt' or `scrbook'.}%
}{%
\PackageError{jkureport}{This package requires KOMA-Script classes. Please use `scrartcl', `scrreprt' or `scrbook' as your document class.}{}%
}}}}
\RequirePackage{scrlayer-scrpage}
\RequirePackage{scrlfile}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Options & Parameters
%%
% Option logopath={}: set path to template logo resources (defaults to "./logos")
\newcommand{\jkureport@logopath}{}
\pgfkeys{%
/jkureport/pkg/.cd,
logopath/.value required,
logopath/.code={%
\renewcommand{\jkureport@logopath}{#1}%
},
logopath=logos,
}
% Option fontpath={}: set path to template font resources (defaults to "./fonts")
\newcommand{\jkureport@fontpath}{}
\pgfkeys{%
/jkureport/pkg/.cd,
fontpath/.value required,
fontpath/.code={%
\renewcommand{\jkureport@fontpath}{#1}%
},
fontpath=fonts,
}
% Option [no]fancyfonts: use custom TTF fonts with XeTeX/LuaTeX (defaults to true)
\newbool{jkureport@xetexfonts}
\pgfkeys{%
/jkureport/pkg/.cd,
fancyfonts/.is choice,
fancyfonts/.default=true,
fancyfonts/true/.code={\booltrue{jkureport@xetexfonts}},
fancyfonts/false/.code={\boolfalse{jkureport@xetexfonts}},
fancyfonts=true,
nofancyfonts/.value forbidden,
nofancyfonts/.code={\boolfalse{jkureport@xetexfonts}},
}
% Option [no]compactverb: use condensed fixed-width font for verbatim and listings (requires XeTeX and the fancyfonts option)
\newbool{jkureport@compactverb}
\pgfkeys{%
/jkureport/pkg/.cd,
compactverb/.is choice,
compactverb/.default=true,
compactverb/true/.code={\booltrue{jkureport@compactverb}},
compactverb/false/.code={\boolfalse{jkureport@compactverb}},
compactverb=true,
nocompactverb/.value forbidden,
nocompactverb/.code={\boolfalse{jkureport@compactverb}},
}
% Option [no]compactmono: use condensed fixed-width font (requires XeTeX and the fancyfonts option)
\newbool{jkureport@compactmono}
\pgfkeys{%
/jkureport/pkg/.cd,
compactmono/.is choice,
compactmono/.default=true,
compactmono/true/.code={\booltrue{jkureport@compactmono}},
compactmono/false/.code={\boolfalse{jkureport@compactmono}},
compactmono=false,
nocompactmono/.value forbidden,
nocompactmono/.code={\boolfalse{jkureport@compactmono}},
}
% Option [no]mathastext: use standard document fonts in math mode (defaults to false)
\newbool{jkureport@mathastext}
\pgfkeys{%
/jkureport/pkg/.cd,
mathastext/.is choice,
mathastext/.default=true,
mathastext/true/.code={\booltrue{jkureport@mathastext}},
mathastext/false/.code={\boolfalse{jkureport@mathastext}},
mathastext=false,
nomathastext/.value forbidden,
nomathastext/.code={\boolfalse{jkureport@mathastext}},
}
% Option [no]imprint: show imprint on title page (defaults to true)
\newbool{jkureport@imprint}
\pgfkeys{%
/jkureport/pkg/.cd,
imprint/.is choice,
imprint/.default=true,
imprint/true/.code={\booltrue{jkureport@imprint}},
imprint/false/.code={\boolfalse{jkureport@imprint}},
imprint=true,
noimprint/.value forbidden,
noimprint/.code={\boolfalse{jkureport@imprint}},
}
% Option [no]jkulogo: show JKU and K logos on title page (defaults to true)
% DEPRECATED Option [no]titlelogo: show JKU logo on title page (defaults to true)
\newbool{jkureport@jkulogo}
\pgfkeys{%
/jkureport/pkg/.cd,
jkulogo/.is choice,
jkulogo/.default=true,
jkulogo/true/.code={\booltrue{jkureport@jkulogo}},
jkulogo/false/.code={\boolfalse{jkureport@jkulogo}},
jkulogo=true,
nojkulogo/.value forbidden,
nojkulogo/.code={\boolfalse{jkureport@jkulogo}},
titlelogo/.code={\PackageWarning{jkureport}{Option `titlelogo' deprecated, use option `jkulogo' instead!}},
titlelogo/.forward to=/jkureport/pkg/jkulogo,
notitlelogo/.code={\PackageWarning{jkureport}{Option `notitlelogo' deprecated, use option `nojkulogo' instead!}},
notitlelogo/.forward to=/jkureport/pkg/nojkulogo,
}
% Option [no]capstitle: set title in all-caps (defaults to false)
\newbool{jkureport@titlecaps}
\pgfkeys{%
/jkureport/pkg/.cd,
capstitle/.is choice,
capstitle/.default=true,
capstitle/true/.code={\booltrue{jkureport@titlecaps}},
capstitle/false/.code={\boolfalse{jkureport@titlecaps}},
capstitle=false,
nocapstitle/.value forbidden,
nocapstitle/.code={\boolfalse{jkureport@titlecaps}},
}
% Option [no]equalmargins: use equal-width inner and other page margins (defaults to true)
\newlength{\jkureport@textwidthadd}
\pgfkeys{%
/jkureport/pkg/.cd,
equalmargins/.is choice,
equalmargins/.default=true,
equalmargins/true/.code={\setlength{\jkureport@textwidthadd}{0mm}},
equalmargins/false/.code={\setlength{\jkureport@textwidthadd}{-15mm}},
equalmargins=false,
noequalmargins/.value forbidden,
noequalmargins/.code={\setlength{\jkuexercise@textwidthadd}{-15mm}},
}
% Option phdthesis: this is a PhD thesis
% Option mathesis: this is a master's thesis
% Option dimplomathesis: this is a dimploma thesis
% Option bathesis: this is a bachelor's thesis
% Option seminarreport: this is a seminar report
\newcommand{\jkureport@doctype}{report}
\newcommand{\jkureport@docsubtype}{}
\pgfkeys{%
/jkureport/pkg/.cd,
phdthesis/.value forbidden,
phdthesis/.code={%
\renewcommand{\jkureport@doctype}{thesis}%
\renewcommand{\jkureport@docsubtype}{phd}%
},
mathesis/.value forbidden,
mathesis/.code={%
\renewcommand{\jkureport@doctype}{thesis}%
\renewcommand{\jkureport@docsubtype}{master}%
},
masterthesis/.value forbidden,
masterthesis/.code={%
\renewcommand{\jkureport@doctype}{thesis}%
\renewcommand{\jkureport@docsubtype}{master}%
},
diplomathesis/.value forbidden,
diplomathesis/.code={%
\renewcommand{\jkureport@doctype}{thesis}%
\renewcommand{\jkureport@docsubtype}{diploma}%
},
bathesis/.value forbidden,
bathesis/.code={%
\renewcommand{\jkureport@doctype}{thesis}%
\renewcommand{\jkureport@docsubtype}{bachelor}%
},
bachelorthesis/.value forbidden,
bachelorthesis/.code={%
\renewcommand{\jkureport@doctype}{thesis}%
\renewcommand{\jkureport@docsubtype}{bachelor}%
},
report/.value forbidden,
report/.code={%
\renewcommand{\jkureport@doctype}{report}%
\renewcommand{\jkureport@docsubtype}{}%
},
seminarreport/.value forbidden,
seminarreport/.code={%
\renewcommand{\jkureport@doctype}{thesis}%
\renewcommand{\jkureport@docsubtype}{seminar}%
},
techreport/.value forbidden,
techreport/.code={%
\renewcommand{\jkureport@doctype}{report}%
\renewcommand{\jkureport@docsubtype}{tech}%
},
}
% Option [no]autopdfinfo: automatically add pdfinfo with hyperref (defaults to true)
\newbool{jkureport@hyperref@automatic}
\pgfkeys{%
/jkureport/pkg/.cd,
autopdfinfo/.is choice,
autopdfinfo/.default=true,
autopdfinfo/true/.code={\booltrue{jkureport@hyperref@automatic}},
autopdfinfo/false/.code={\boolfalse{jkureport@hyperref@automatic}},
autopdfinfo=true,
noautopdfinfo/.value forbidden,
noautopdfinfo/.code={\boolfalse{jkureport@hyperref@automatic}},
}
% Option JKU: use color palette for all JKU
\newcommand{\jkureport@faculty}{jku}
\newcommand{\jkureport@institute@code}{}
\pgfkeys{%
/jkureport/pkg/.cd,
JKU/.value forbidden,
JKU/.code={\renewcommand{\jkureport@faculty}{jku}},
jku/.value forbidden,
jku/.code={\renewcommand{\jkureport@faculty}{jku}},
}
% Option BUS: use color palette for the business school
\pgfkeys{%
/jkureport/pkg/.cd,
BUS/.value forbidden,
BUS/.code={\renewcommand{\jkureport@faculty}{bus}},
bus/.value forbidden,
bus/.code={\renewcommand{\jkureport@faculty}{bus}},
}
% Option LIT: use color palette for the Linz Institute of Technology
\pgfkeys{%
/jkureport/pkg/.cd,
LIT/.value forbidden,
LIT/.code={\renewcommand{\jkureport@faculty}{lit}\renewcommand{\jkureport@institute@code}{LIT}},
lit/.value forbidden,
lit/.code={\renewcommand{\jkureport@faculty}{lit}\renewcommand{\jkureport@institute@code}{LIT}},
}
% Option MED: use color palette for the MED faculty
\pgfkeys{%
/jkureport/pkg/.cd,
MED/.value forbidden,
MED/.code={\renewcommand{\jkureport@faculty}{med}},
med/.value forbidden,
med/.code={\renewcommand{\jkureport@faculty}{med}},
}
% Option RE: use color palette for the RE faculty
\pgfkeys{%
/jkureport/pkg/.cd,
RE/.value forbidden,
RE/.code={\renewcommand{\jkureport@faculty}{re}},
re/.value forbidden,
re/.code={\renewcommand{\jkureport@faculty}{re}},
}
% Option SOE: use color palette for the School of Education
\pgfkeys{%
/jkureport/pkg/.cd,
SOE/.value forbidden,
SOE/.code={\renewcommand{\jkureport@faculty}{soe}},
SoE/.value forbidden,
SoE/.code={\renewcommand{\jkureport@faculty}{soe}},
soe/.value forbidden,
soe/.code={\renewcommand{\jkureport@faculty}{soe}},
}
% Option SOWI: use color palette for the SOWI faculty
\pgfkeys{%
/jkureport/pkg/.cd,
SOWI/.value forbidden,
SOWI/.code={\renewcommand{\jkureport@faculty}{sowi}},
sowi/.value forbidden,
sowi/.code={\renewcommand{\jkureport@faculty}{sowi}},
}
% Option TNF: use color palette for the TNF faculty
\pgfkeys{%
/jkureport/pkg/.cd,
TNF/.value forbidden,
TNF/.code={\renewcommand{\jkureport@faculty}{tnf}},
tnf/.value forbidden,
tnf/.code={\renewcommand{\jkureport@faculty}{tnf}},
}
\DeclareOption*{}
\ProcessPgfOptions{/jkureport/pkg}
\ProcessOptions\relax
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Definitions
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Page size tweaks
%%
% Title page
\newlength{\jkureport@outermargin}
\setlength{\jkureport@outermargin}{15mm}
\newlength{\jkureport@titlepage@marginpar}
\setlength{\jkureport@titlepage@marginpar}{55mm}
\newlength{\jkureport@titlepage@marginleft}
\setlength{\jkureport@titlepage@marginleft}{-5mm}
\newlength{\jkureport@Klogo@width}
\setlength{\jkureport@Klogo@width}{44mm}
\newlength{\jkureport@Klogo@height}
\newlength{\jkureport@Klogo@titlepage@offset}
\setlength{\jkureport@Klogo@titlepage@offset}{110mm}
\newlength{\jkureport@logo@titlepage@height}
\setlength{\jkureport@logo@titlepage@height}{25mm}
\newlength{\jkureport@logo@titlepage@hoffset}
\setlength{\jkureport@logo@titlepage@hoffset}{12.9mm}
\newlength{\jkureport@logo@titlepage@offset}
\setlength{\jkureport@logo@titlepage@offset}{15mm}
\newlength{\jkureport@partnerlogo@titlepage@offset}
\setlength{\jkureport@partnerlogo@titlepage@offset}{10mm}
\newlength{\jkureport@partnerlogo@titlepage@width}
\setlength{\jkureport@partnerlogo@titlepage@width}{\dimexpr\jkureport@titlepage@marginpar-\jkureport@outermargin\relax}
\newlength{\jkureport@imprint@titlepage@offset}
\setlength{\jkureport@imprint@titlepage@offset}{35mm}
\newlength{\jkureport@authoring@titlepage@offset}
\setlength{\jkureport@authoring@titlepage@offset}{60mm}
% General page sizing
\@ifundefined{pdfpagewidth}{}{%
\setlength{\pdfpagewidth}{\paperwidth}
}
\@ifundefined{pagewidth}{}{%
\setlength{\pagewidth}{\paperwidth}
}
\@ifundefined{pdfpageheight}{}{%
\setlength{\pdfpageheight}{\paperwidth}
}
\@ifundefined{pageheight}{}{%
\setlength{\pageheight}{\paperwidth}
}
\setlength{\hoffset}{0in}
\setlength{\voffset}{0in}
\setlength{\topmargin}{15mm}
\setlength{\headheight}{5mm}
\setlength{\headsep}{10mm}
\setlength{\footskip}{15mm}
\newlength{\bottommargin}
\setlength{\bottommargin}{30mm}
\setlength{\textheight}{\dimexpr\paperheight - \headsep - \headheight - \topmargin - \bottommargin\relax}
\setlength{\oddsidemargin}{30mm}
\setlength{\evensidemargin}{\dimexpr\oddsidemargin - \jkureport@textwidthadd\relax}
\setlength{\marginparsep}{5mm}
\setlength{\marginparwidth}{\dimexpr\evensidemargin - 2\marginparsep\relax}
\setlength{\columnseprule}{0mm}
\setlength{\columnsep}{6mm}
\setlength{\textwidth}{\dimexpr\paperwidth - \oddsidemargin - \evensidemargin\relax}
\addtolength{\topmargin}{\dimexpr\voffset - 1in\relax}
\addtolength{\oddsidemargin}{\dimexpr\hoffset - 1in\relax}
\addtolength{\evensidemargin}{\dimexpr\hoffset - 1in\relax}
\setlength{\parindent}{0mm}
%\setlength{\parskip}{1.5ex plus0.5ex minus0.5ex}
\addtolength{\parskip}{0.5\baselineskip plus0.2ex minus0.5ex}
\newlength{\jkureport@topmargin}
\newlength{\jkureport@oddsidemargin}
\newlength{\jkureport@evensidemargin}
\setlength{\jkureport@topmargin}{\dimexpr\topmargin + 1in - \voffset\relax}
\setlength{\jkureport@oddsidemargin}{\dimexpr\oddsidemargin + 1in - \hoffset\relax}%
\setlength{\jkureport@evensidemargin}{\dimexpr\evensidemargin + 1in - \hoffset\relax}%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Fancy fonts with LuaTeX/XeTeX
%%
\ifbool{jkureport@xetexfonts}{}{%
\RequirePackage{lmodern}
}%
\RequirePackage{inconsolata}
\RequirePackage{helvet}
\ifluatex\else\ifxetex\else%
\RequirePackage{euler}
\fi\fi
\RequirePackage{fontawesome5}
\ifluatex\else\ifxetex\else%
% fix potentially mis-packaged FA5 in TeX Live 2017, see https://tex.stackexchange.com/q/497792/290236
\pdfmapfile{=fontawesome5.map}%
\fi\fi
\ifluatex\else\ifxetex\else%
\ifbool{jkureport@xetexfonts}{%
\PackageWarning{jkureport}{True-type fonts are only supported on LuaLaTeX/XeLaTeX. Please consider switching to LuaLaTeX (or XeLaTex) to get the full look and feel of this template. Note that you can silence this warning with the `nofancyfonts' option.}%
}{}%
\boolfalse{jkureport@xetexfonts}%
\fi\fi
\ifbool{jkureport@xetexfonts}{%
\ifbool{jkureport@mathastext}{
\RequirePackage[usefilenames]{firamath-otf}%
}{%
\@ifpackageloaded{unicode-math}{%
\setmathfont{Euler-Math.otf}
}{%
\RequirePackage{euler-math}%
}%
}
%\RequirePackage{fontspec}
% discover font path
\expandafter\IfFileExists\expandafter{\jkureport@fontpath PublicSans-Regular.ttf}{%
\IfFontExistsTF{\jkureport@fontpath PublicSans-Regular.ttf}{%
}{%
\xdef\jkureport@fontpath{}
}%
}{\expandafter\IfFileExists\expandafter{\jkureport@fontpath/PublicSans-Regular.ttf}{%
\xdef\jkureport@fontpath{\jkureport@fontpath/}
\IfFontExistsTF{\jkureport@fontpath PublicSans-Regular.ttf}{%
}{%
\xdef\jkureport@fontpath{}
}%
}{\IfFontExistsTF{PublicSans-Regular.ttf}{%
\xdef\jkureport@fontpath{}
}{%
\PackageError{jkureport}{Font files not found in `\jkureport@fontpath', forgot to set the font path with package option `fontpath='?}{}%
\stop
}}}%
\IfFontExistsTF{\jkureport@fontpath PublicSans-Regular.ttf}{%
}{%
\PackageError{jkureport}{Font files not found in local installation. Fonts must be installed to `$TEXMF[HOME|LOCAL]/fonts/truetype/' or an alternative font path set with package option `fontpath='}{}%
\stop
}%
\defaultfontfeatures{
Path={\jkureport@fontpath},
Extension=.ttf,
UprightFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=*-Italic,
BoldItalicFont=*-BoldItalic
}
\defaultfontfeatures+[Inconsolata,InconsolataCondensed]{
Scale=1.16,
ItalicFont={},
BoldItalicFont={},
AutoFakeSlant,
AutoFakeBold,
%BoldItalicFeatures={FakeSlant}
}
\setmainfont{Merriweather}
%\setsansfont{OpenSans}
\setsansfont{PublicSans}
\ifbool{jkureport@compactmono}{%
\setmonofont{InconsolataCondensed}
}{%
\setmonofont{Inconsolata}
}
\newfontfamily\rmlightfamily{Merriweather}[
NFSSFamily=rmlight,
UprightFont=*-Light,
BoldFont=*-Regular,
ItalicFont=*-LightItalic,
BoldItalicFont=*-Italic,
Ligatures=TeX]
\newfontfamily\rmblackfamily{Merriweather}[
NFSSFamily=rmblack,
UprightFont=*-Black,
BoldFont=*-Black,
ItalicFont=*-BlackItalic,
BoldItalicFont=*-BlackItalic,
Ligatures=TeX]
%\newfontfamily\sflightfamily{OpenSans}[
% NFSSFamily=sflight,
% UprightFont=*-Light,
% BoldFont=*-SemiBold,
% ItalicFont=*-LightItalic,
% BoldItalicFont=*-SemiBoldItalic,
% Ligatures=TeX]
%\newfontfamily\sfblackfamily{OpenSans}[
% NFSSFamily=sfblack,
% UprightFont=*-ExtraBold,
% BoldFont=*-ExtraBold,
% ItalicFont=*-ExtraBoldItalic,
% BoldItalicFont=*-ExtraBoldItalic,
% Ligatures=TeX]
\newfontfamily\sflightfamily{PublicSans}[
NFSSFamily=sflight,
UprightFont=*-Thin,
BoldFont=*-Medium,
ItalicFont=*-ThinItalic,
BoldItalicFont=*-MediumItalic,
Ligatures=TeX]
\newfontfamily\sfblackfamily{PublicSans}[
NFSSFamily=sfblack,
%LetterSpace=1.0,
UprightFont=*-ExtraBold,
BoldFont=*-Black,
ItalicFont=*-ExtraBoldItalic,
BoldItalicFont=*-BlackItalic,
Ligatures=TeX]
\ifbool{jkureport@compactmono}{%
\newfontfamily\ttlightfamily{InconsolataCondensed}[
NFSSFamily=ttlight,
UprightFont=*-Light,
BoldFont=*-Medium]
}{%
\newfontfamily\ttlightfamily{Inconsolata}[
NFSSFamily=ttlight,
UprightFont=*-Light,
BoldFont=*-Medium]
}
\newfontfamily\ttcondensedfamily{InconsolataCondensed}[
NFSSFamily=ttcondensed]
\newfontfamily\ttcondensedlightfamily{InconsolataCondensed}[
NFSSFamily=ttcondensedlight,
UprightFont=*-Light,
BoldFont=*-Medium]
%\setmathsfont(Digits,Latin){Merriweather}
%\setmathrm{Merriweather}
%\setboldmathrm{Merriweather}[
% NFSSFamily=rmblack,
% UprightFont=*-Black,
% BoldFont=*-Black,
% ItalicFont=*-BlackItalic,
% BoldItalicFont=*-BlackItalic]
%%\setmathsf{OpenSans}
%\setmathsf{PublicSans}
%\ifbool{jkureport@compactmono}{%
% \setmathtt{InconsolataCondensed}
%}{%
% \setmathtt{Inconsolata}
%}
}{%
\RequirePackage[T1]{fontenc}
\newcommand{\rmlightfamily}{\rmfamily}
\newcommand{\rmblackfamily}{\rmfamily\bfseries}
\newcommand{\sflightfamily}{\sffamily}
\newcommand{\sfblackfamily}{\sffamily\bfseries}
\newcommand{\ttlightfamily}{\ttfamily}
\newcommand{\ttcondensedfamily}{\ttfamily}
\newcommand{\ttcondensedlightfamily}{\ttfamily}
\ifbool{jkureport@compactmono}{%
\PackageWarning{jkureport}{Option `compactmono' requires the `fancyfonts' option.}%
}{}%
\ifbool{jkureport@compactverb}{%
\PackageWarning{jkureport}{Option `compactverb' requires the `fancyfonts' option.}%
}{}%
}
\ifbool{jkureport@compactverb}{%
\newcommand{\jkureport@verbfamily}{\ttcondensedfamily}
}{%
\newcommand{\jkureport@verbfamily}{\ttfamily}
}%
\renewcommand\familydefault{\rmdefault}
% KOMA-Script font definitions and adaptions
\setkomafont{title}{\sfblackfamily\fontsize{28pt}{32.2pt}\selectfont}
\setkomafont{titlehead}{\sfblackfamily\fontsize{20pt}{23pt}\selectfont}
\setkomafont{subtitle}{\sffamily\fontsize{14pt}{16.8pt}\selectfont}
\newkomafont{subtitlesmall}{\sffamily\fontsize{11pt}{13.2pt}\selectfont}
\newlength{\jkureport@subtitleparskip}
\setlength{\jkureport@subtitleparskip}{6pt}
\setkomafont{subject}{\usekomafont{subtitle}\bfseries}
\newkomafont{abstract}{\sffamily\fontsize{9pt}{11pt}\selectfont}
\newkomafont{abstractname}{\usekomafont{abstract}\bfseries}
\newkomafont{authoring}{\sffamily\fontsize{9pt}{11pt}\selectfont}
\setkomafont{author}{\bfseries}
\newkomafont{authorprefixsuffix}{\mdseries}
\newkomafont{authoraffiliation}{\mdseries}
\setkomafont{date}{}
\newkomafont{imprint}{\sffamily\fontsize{8pt}{11pt}\selectfont}
\newkomafont{imprintname}{\sfblackfamily\fontsize{9pt}{11pt}\selectfont}
\setkomafont{pageheadfoot}{\sffamily}
\setkomafont{pagehead}{}
\setkomafont{pagefoot}{}
\setkomafont{pagenumber}{}
\newkomafont{watermarktitle}{\sfblackfamily\fontsize{80pt}{96pt}\selectfont}
\newkomafont{watermark}{\sffamily\fontsize{32pt}{40pt}\selectfont}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Experimental: Use standard document fonts in math mode
%%
\ifbool{jkureport@mathastext}{%
\ifxetex%
% As of version 1.4, mathastext no longer compiles with XeLaTeX unless we
% the (deprecated) everymath option or the nominus option. Bug has been
% acknowledged by mathastext author. Until then, we are safe to use everymath:
\PassOptionsToPackage{everymath}{mathastext}
% In the future, we may also want to consider to use nominus (and use the
% standard math font for it). In that case, we should do this for at least
% the three basic operators +/-/= to achieve consistent operator alignment.
% Actually, this looks very promising in combination with FiraMath and we
% might want to consider always doing that in future (not just for XeLaTeX):
%\PassOptionsToPackage{noplus,nominus,noequal}{mathastext}
\fi
\usepackage[italic,defaultmathsizes,eulergreek,nosmalldelims,unicodeminus]{mathastext}
}{}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% URLs
%%
\def\url@rmstyle{\def\UrlFont{\rmfamily}}
\def\url@sfstyle{\def\UrlFont{\sffamily}}
\def\url@ttstyle{\def\UrlFont{\ttfamily}}
%\urlstyle{\rmdefault}
\urlstyle{same}
% Nasty hack to emulate passing option `hyphens' to the url package:
\def\do@url@hyp{\do\-}
\newcommand{\mailto}[1]{\href{mailto:#1}{#1}}
\newcommand{\prettyurl}[2][]{\ifstrempty{#1}{\href{#2}{#2}}{\href{#1}{#2}}}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% JKU base colors
%%
%BLUE
\definecolor{jkuBlue}{RGB}{4,110,152}
%CYAN
\definecolor{jkuCyan}{RGB}{92,207,203}
\colorlet{jkuLightBlue}{jkuCyan}
%YELLOW
\definecolor{jkuYellow}{RGB}{251,186,0}
%GREY
\definecolor{jkuGrey}{RGB}{128,130,136}
\colorlet{jkuGray}{jkuGrey}
%DARKGREY
\definecolor{jkuDarkGrey}{RGB}{90,90,90}
\colorlet{jkuDarkGray}{jkuDarkGrey}
%LIGHTGREEN
\definecolor{jkuLightGreen}{RGB}{187,208,50}
%GREEN
\definecolor{jkuGreen}{RGB}{76,172,78}
%PURPLE
\definecolor{jkuPurple}{RGB}{156,71,123}
%RED
\definecolor{jkuRed}{RGB}{231,55,41}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% JKU base colors commands
%%
\newcommand{\crBlue}{\color{jkuBlue}}
\newcommand{\cBlue}[1]{{\crBlue{#1}}}
\newcommand{\cjkuBlue}[1]{{\crBlue{#1}}}
\newcommand{\crCyan}{\color{jkuCyan}}
\newcommand{\cCyan}[1]{{\crCyan{#1}}}
\newcommand{\cjkuCyan}[1]{{\crCyan{#1}}}
\newcommand{\crLightBlue}{\crCyan}
\newcommand{\cLightBlue}[1]{{\crCyan{#1}}}
\newcommand{\cjkuLightBlue}[1]{{\crCyan{#1}}}
\newcommand{\crYellow}{\color{jkuYellow}}
\newcommand{\cYellow}[1]{{\crYellow{#1}}}
\newcommand{\cjkuYellow}[1]{{\crYellow{#1}}}
\newcommand{\crGrey}{\color{jkuGrey}}
\newcommand{\cGrey}[1]{{\crGrey{#1}}}
\newcommand{\cjkuGrey}[1]{{\crGrey{#1}}}
\newcommand{\crGray}{\crGrey}
\newcommand{\cGray}[1]{{\crGrey{#1}}}
\newcommand{\cjkuGray}[1]{{\crGrey{#1}}}
\newcommand{\crDarkGrey}{\color{jkuDarkGrey}}
\newcommand{\cDarkGrey}[1]{{\crDarkGrey{#1}}}
\newcommand{\cjkuDarkGrey}[1]{{\crDarkGrey{#1}}}
\newcommand{\crDarkGray}{\crDarkGrey}
\newcommand{\cDarkGray}[1]{{\crDarkGrey{#1}}}
\newcommand{\cjkuDarkGray}[1]{{\crDarkGrey{#1}}}
\newcommand{\crLightGreen}{\color{jkuLightGreen}}
\newcommand{\cLightGreen}[1]{{\crLightGreen{#1}}}
\newcommand{\cjkuLightGreen}[1]{{\crLightGreen{#1}}}
\newcommand{\crGreen}{\color{jkuGreen}}
\newcommand{\cGreen}[1]{{\crGreen{#1}}}
\newcommand{\cjkuGreen}[1]{{\crGreen{#1}}}
\newcommand{\crPurple}{\color{jkuPurple}}
\newcommand{\cPurple}[1]{{\crPurple{#1}}}
\newcommand{\cjkuPurple}[1]{{\crPurple{#1}}}
\newcommand{\crRed}{\color{jkuRed}}
\newcommand{\cRed}[1]{{\crRed{#1}}}
\newcommand{\cjkuRed}[1]{{\crRed{#1}}}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Color palettes
%%
\colorlet{palette jku fg}{jkuGrey}
\colorlet{palette med fg}{jkuYellow}
\colorlet{palette re fg}{jkuRed}
\colorlet{palette sowi fg}{jkuGreen}
\colorlet{palette tnf fg}{jkuBlue}
\colorlet{palette lit fg}{palette tnf fg}
\colorlet{palette soe fg}{jkuPurple}
\colorlet{palette bus fg}{jkuLightGreen}
\colorlet{palette jku highlight}{jkuPurple}
\colorlet{palette med highlight}{jkuGreen}
\colorlet{palette re highlight}{jkuBlue}
\colorlet{palette sowi highlight}{jkuPurple}
\colorlet{palette tnf highlight}{jkuPurple}
\colorlet{palette lit highlight}{palette tnf highlight}
\colorlet{palette soe highlight}{jkuYellow}
\colorlet{palette bus highlight}{jkuPurple}
\colorlet{palette faculty fg}{palette jku fg}
\colorlet{palette faculty highlight}{palette jku highlight}
\colorlet{jkureport@fg}{black}
\colorlet{jkureport@bg}{white}
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Color mode switching commands
%%
% Color palette switches
\xdef\jkureport@currentfaculty{\jkureport@faculty}
\pgfkeysdefnargs{/jkureport/colorpalette/jku}{0}{%
\colorlet{palette faculty fg}{palette jku fg}%
\colorlet{palette faculty highlight}{palette jku highlight}%
\renewcommand{\jkureport@currentfaculty}{jku}%
}
\pgfkeysdefnargs{/jkureport/colorpalette/bus}{0}{%
\colorlet{palette faculty fg}{palette bus fg}%
\colorlet{palette faculty highlight}{palette bus highlight}%
\renewcommand{\jkureport@currentfaculty}{bus}%
}
\pgfkeysdefnargs{/jkureport/colorpalette/lit}{0}{%
\colorlet{palette faculty fg}{palette lit fg}%
\colorlet{palette faculty highlight}{palette lit highlight}%
\renewcommand{\jkureport@currentfaculty}{lit}%
}
\pgfkeysdefnargs{/jkureport/colorpalette/med}{0}{%
\colorlet{palette faculty fg}{palette med fg}%
\colorlet{palette faculty highlight}{palette med highlight}%
\renewcommand{\jkureport@currentfaculty}{med}%
}
\pgfkeysdefnargs{/jkureport/colorpalette/re}{0}{%
\colorlet{palette faculty fg}{palette re fg}%
\colorlet{palette faculty highlight}{palette re highlight}%
\renewcommand{\jkureport@currentfaculty}{re}%
}
\pgfkeysdefnargs{/jkureport/colorpalette/soe}{0}{%
\colorlet{palette faculty fg}{palette soe fg}%
\colorlet{palette faculty highlight}{palette soe highlight}%
\renewcommand{\jkureport@currentfaculty}{soe}%
}
\pgfkeysdefnargs{/jkureport/colorpalette/sowi}{0}{%
\colorlet{palette faculty fg}{palette sowi fg}%
\colorlet{palette faculty highlight}{palette sowi highlight}%
\renewcommand{\jkureport@currentfaculty}{sowi}%
}
\pgfkeysdefnargs{/jkureport/colorpalette/tnf}{0}{%
\colorlet{palette faculty fg}{palette tnf fg}%
\colorlet{palette faculty highlight}{palette tnf highlight}%
\renewcommand{\jkureport@currentfaculty}{tnf}%
}
% Command \setcolormode[FACULTY]: changes the theme color mode (if color mode is absent, reset to the global default color mode)
\newcommand{\setcolormode}[1][]{%
% convert param to lowercase
\begingroup\edef\@temp{\lowercase{\endgroup\def\noexpand\@temp@lcparam{#1}}}\@temp%
% preset default color palette
\pgfqkeys{/jkureport/colorpalette}{\jkureport@faculty}%
% update color palette according to params
\begingroup\edef\@temp{\endgroup\noexpand\pgfqkeys{/jkureport/colorpalette}{\@temp@lcparam}}\@temp%
}
\setcolormode%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Logos
%%
% Definitions
\newcommand{\jkureport@logoprefix}{jku}
% Adapted from grapics.sty
\newbool{jkureport@temp@exists}%
\newcommand{\jkureport@IfLogoFileExists}[1]{%
\booltrue{jkureport@temp@exists}%
\def\jkureport@temp@file{}%
\begingroup%
\ifx\detokenize\@undefined\else%
\edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}%
\fi%
\let\input@path\Ginput@path%
\@ifundefined{set@curr@file}{%
\filename@parse{#1}%
}{%
\set@curr@file{#1}%
\expandafter\filename@parse\expandafter{\@curr@file}%
}%
\ifx\filename@ext\Gin@gzext%
\expandafter\filename@parse\expandafter{\filename@base}%
\ifx\filename@ext\relax%
\let\filename@ext\Gin@gzext%
\else%
\edef\Gin@ext{\Gin@ext\Gin@sepdefault\Gin@gzext}%
\fi%
\fi%
\ifx\filename@ext\relax%
\@for\Gin@temp:=\Gin@extensions\do{%
\ifx\Gin@ext\relax%
\Gin@getbase\Gin@temp%
\fi%
}%
\else%
\Gin@getbase{\Gin@sepdefault\filename@ext}%
\ifnum0%
\ifx\Gin@ext\relax 1%
\else \@ifundefined{Gin@rule@\Gin@ext}{1}{0}%
\fi >0%
\let\Gin@ext\relax%
\let\Gin@savedbase\filename@base%
\let\Gin@savedext\filename@ext%
\edef\filename@base{\filename@base\Gin@sepdefault\filename@ext}%
\let\filename@ext\relax%
\@for\Gin@temp:=\Gin@extensions\do{%
\ifx\Gin@ext\relax%
\Gin@getbase\Gin@temp%
\fi%
}%
\ifx\Gin@ext\relax%
\let\filename@base\Gin@savedbase%
\let\filename@ext\Gin@savedext%
\fi%
\fi%
\ifx\Gin@ext\relax%
\def\Gin@base{\filename@area\filename@base}%
\edef\Gin@ext{\Gin@sepdefault\filename@ext}%
\global\boolfalse{jkureport@temp@exists}%