-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathse2thesis.dtx
1847 lines (1838 loc) · 62.9 KB
/
se2thesis.dtx
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
% \iffalse meta-comment
%
% File: se2thesis.dtx Copyright (C) 2022--2024 Stephan Lukasczyk
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
% license or (at your option) any later version. The latest version
% of this license is in the file
%
% https://www.latex-project.org/lppl.txt
%
% This file is part of the "se2thesis bundle" (The Work in LPPL)
% and all files in that bundle must be distributed together.
%
% The released version of this bundle is available from CTAN.
%
% ----------------------------------------------------------------------
%
% The development version of the bundle can be found at
%
% https://github.com/se2p/se2thesis
%
% for those people who are interested.
%
% ----------------------------------------------------------------------
%
%<*driver>
\documentclass{l3doc}
% The next line is needed so that \GetFileInfo will be able to pick up
% version data.
\usepackage{se2colors}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \GetFileInfo{se2colors.sty}
%
% \title{^^A
% \pkg{se2thesis}---Overall set up^^A
% \thanks{This file describes \fileversion, last revised \filedate.}^^A
% }
%
% \author{^^A
% Stephan Lukasczyk^^A
% \thanks{^^A
% E-Mail: \href{mailto:[email protected]}{[email protected]}^^A
% }^^A
% }
%
% \begin{documentation}
%
% \section{Introduction}\label{sec:doc-intro}
%
% The University of Passau does not provide a common thesis template
% to its students.
% For theses, written at the Chair of Software Engineering~II,
% many students chose between two templates that were provided by different
% people from the chair;
% other students chose from the large variety of templates available from the
% internet, causing each thesis looking differently.
%
% The author of this package provided a template,
% which he initially created for his bachelor's and master's thesis,
% that was recommended and used by many students.
% The implementation of that template, however, was very hacky and required
% some changes over time.
% This lead to the idea of creating a new template from scratch,
% that shall be used by all our students for their various types of theses,
% from bachelor to PhD level.
% The result is the \pkg{se2thesis} bundle.
%
% The bundle itself consists of several \LaTeX{} classes and packages
% that also allow reuse of various parts of it.
% Its main class is the \pkg{se2thesis} document class,
% an extension of the \KOMAScript{} |scrbook| document class.
% The packages \pkg{se2colors} and \pkg{se2fonts} provide necessary
% colour and font settings for the \pkg{se2thesis} class;
% the \pkg{se2packages} allows to load several recommended packages~(see
% \cref{sec:doc-se2packages}) with our recommended,
% predefined settings.
% They are available as separate packages, however, to allow their reuse for
% other classes, packages, and projects, as well.
%
% \subsection{Installation}\label{sec:doc-intro-install}
%
% The \pkg{se2thesis} bundle is available from \CTAN\footnote{
% \href{https://ctan.org/pkg/se2thesis}{ctan.org/pkg/se2thesis}
% }.
% It is part of both \MiKTeX{} and \TeXLive.
% You can find its development version from GitHub\footnote{
% \href{https://github.com/se2p/se2thesis}{github.com/se2p/se2thesis}
% }.
% The easiest way of installing it is through your \TeX{} distribution;
% please check your distribution's documentation on this.
% Note that it might be necessary to update your \TeX{} distribution
% because they might not provide you updates;
% for example, there is a new version of \TeXLive{} every year
% which needs to be installed separately.
% If you have installed an older version of \pkg{se2thesis}
% consider updating it to the latest version available from \CTAN{}
% through your distribution.
%
% For manual installation, we recommend to clone the Git repository
% and run the \texttt{l3build} tool that we also use for building the bundle.
% Running |l3build ctan| builds the source files and compiles the documentation.
% This creates a folder |build| containing these artefacts;
% |build/doc| contains the documentation,
% |build/local| the source files.
% See the documentation of \texttt{l3build} and your \TeX{} distribution
% on how to install them manually.
% Please note that \texttt{l3build} also provides a |l3build install| target
% to install the bundle files to your local texmf tree.
%
% The “Island of \TeX{}” project provides Docker images of \TeXLive\footnote{%
% \href{https://islandoftex.gitlab.io/community/projects/docker/}{islandoftex.gitlab.io/community/projects/docker/}
% }.
% If you do not want to install/update \TeXLive{} on your system
% you might want to consider their \texttt{latest} image,
% which contains a recent \TeXLive{} 2023 build.
% They build their images weekly,
% thus also recent releases of \pkg{se2thesis} will be part of the image
% soon after their release date.
%
% \subsection{Availability on Overleaf}\label{sec:doc-intro-overleaf}
%
% Since April 3, 2024, the \pkg{se2thesis} document template is also available
% from Overleaf. The document that is in Overleafs gallery is based on the
% example document that comes with this package. Any Overleaf user can just
% create a new thesis document based on the template by clicking the respective
% button on Overleaf's gallery page.
%
% The gallery entry for \pkg{se2thesis} is available from
% \href{https://www.overleaf.com/latex/templates/se2thesis-a-thesis-class-for-the-chair-of-software-engineering-ii-at-the-university-of-passau-germany/fpymkmxmbgpc}{https://www.overleaf.com/latex/templates/se2thesis-a-thesis-class-for-the-chair-of-software-engineering-ii-at-the-university-of-passau-germany/fpymkmxmbgpc}.%
%
% \emph{Important remark:} Currently, the Overleaf template does not support
% \LuaLaTeX{} but requires builds with \pdfLaTeX. The reason is that Overleaf
% does not yet ship \TeXLive~2024, but only \TeXLive~2023, which does not
% provide the respective font package~(notably \pkg{inconsolata-nerd-font}).
% Until the latest \TeXLive{} will be available from Overleaf, one can only use
% the \pdfLaTeX{} mode, which has some drawbacks on the fonts, but works fine
% otherwise. From the Overleaf blog, we assume that \TeXLive~2024 might be
% available from some time in autumn 2024. We will update this documentation
% accordingly, as soon as the new version is available.
%
%\subsection{Availability in MonsterWriter}\label{sec:doc-intro-mosterwriter}
%
% Since October 2024, \pkg{se2thesis} is also part of \textsc{MonsterWriter},
% a graphical tool that assists students to write academic papers. The
% \textsc{MonsterWriter} GUI allows to focus on the content of a work and allows
% to export it in various common publisher styles and formats.
%
% The \textsc{MonsterWriter} website
% \href{https://www.monsterwriter.com}{monsterwriter.com} provides more details
% on the tool, and a YouTube video
% (\href{https://youtube.com/watch?v=BWOumwmh18g}{youtu.be/BWOumwmh18g})
% demonstrates some of the features of their \pkg{se2thesis} integration.
%
% \subsection{General Macros}\label{sec:doc-intro-macros}
%
% They all have in common one macro, \cs{IfFormatAtLeastTF};
% this macro is part of the latest \LaTeX{} kernel.
% However, not all users might have upgraded their \TeX{} installation
% to a level using a recently-enough kernel version.
% Therefore, every class and package of this bundle will conditionally
% define the following macro:
%
% \begin{function}{\IfFormatAtLeastTF}
% \begin{syntax}
% \cmd{\IfFormatAtLeastTF} \marg{version} \marg{then block} \marg{else-block}
% \end{syntax}
% Checks whether the used \LaTeX{} format is at least the one from the
% given date value.
% The date needs to be specified either in YYYY/MM/DD or in YYYY-MM-DD
% format.
% \end{function}
%
% \section{License}\label{sec:doc-license}
%
% Permission is granted to copy, distribute, and/or modify this software under
% the terms of the \LaTeX{} Project Public License~(LPPL), version~1.3c or
% later~(\href{https://www.latex-project.org/lppl.txt}{https://www.latex-project.org/lppl.txt}).
% The software has the status \enquote{maintained}.
%
% \section{The \cls{se2thesis} class}\label{sec:doc-se2thesis}
%
% The \cls{se2thesis} class is the central component of this bundle.
% It provides a wide variety of settings, mostly regarding the title page~(see
% \cref{sec:doc-se2thesis-title}) and the type area~(see
% \cref{sec:doc-se2thesis-typearea}).
%
% We aim to keep the \cls{se2thesis} class relatively small, especially
% considering packages that we load.
% Currently, the class itself loads the \pkg{se2colors}~(see
% \cref{sec:doc-se2colors}) and \pkg{se2fonts}~(see \cref{sec:doc-se2fonts})
% packages.
% The following packages and classes are loaded:
% \pkg{expl3}, \pkg{l3keys2e} in case one uses a \LaTeX{} kernel from before
% 2022--06--01, \pkg{graphicx}, \pkg{translations}, \KOMAScript, \pkg{xcolor},
% \pkg{ifthen}, as well as \pkg{fontspec}, \pkg{unicode-math},
% \pkg{inconsolata-nerd-font} and \pkg{libertinus-otf} if one uses \LuaTeX{};
% for \pdfLaTeX{} we load \pkg{fontenc}, \pkg{libertinus-type1}, and
% \pkg{inconsolata} instead of the latter three.
% Furthermore, we load \pkg{microtype};
% when using \LuaTeX{}, we also load \pkg{lua-widow-control} and \pkg{selnolig}.
%
% However, we recommend to use a couple of further packages, together with some
% further options to those package. We describe these settings in
% \cref{sec:doc-se2packages}.
% Please consider looking at this section when starting to write your document.
%
% Before we start with a detailed documentation of the class, we explain one
% helper macro that can be used to check whether a package has been loaded.
% \begin{function}[pTF, updated = 2022-09-27]{\slcd_package_if_loaded:n}
% \begin{syntax}
% |\slcd_package_if_loaded:nTF| \Arg{package name} \Arg{true code} \Arg{false code}
% \end{syntax}
% Checks whether a package has been loaded and conditionally executes code.
% \end{function}
%
% \subsection{Load-time options}\label{sec:doc-se2thesis-options}
%
% The \pkg{se2thesis} class defines several load-time options, all of them
% optional, on top of the options provided by the \KOMAScript{} document
% classes.
% \begin{function}{class}
% \begin{syntax}
% |class| = \meta{choice}
% \end{syntax}
% Set the base document class.
% Values are \cls{scrreprt} or \cls{scrbook}.
% \emph{Note:} you cannot use \cls{scrartcl} because it does not provide
% the required |chapter| sectioning.
% Default is |scrbook|.
%
% Please note that if you want to have the bibliography numbered or use an
% appendix with alpha-numbering (A, B, \dots), you want to explicitly use
% |scrreprt| as the base class; for some (currently unknown) reason this does
% not work with the default |scrbook|.
% \end{function}
% \begin{function}{paper}
% \begin{syntax}
% |paper| = \meta{choice}
% \end{syntax}
% Set the paper format.
% Possible values are |a4| or |b5|.
% Default is |a4|.
% \end{function}
%
% \begin{function}{logofile}
% \begin{syntax}
% |logofile| = \marg{path-to-file}
% \end{syntax}
% Defines the path to the University's logo for the title page.
% \end{function}
%
% \begin{function}{thesistype}
% \begin{syntax}
% |thesistype| = \meta{choice}
% \end{syntax}
% Defines the type of the thesis.
% Possible values are:
% |bachelor| for a bachelor's thesis, |bachelorproposal| for a proposal to
% a bachelor's thesis, |master| for a master's thesis, |masterproposal| for
% a proposal to a master's thesis, |phdproposal| for a proposal to a PhD thesis,
% |phd| for a PhD thesis in the natural sciences, |phdeng| for a PhD thesis
% in engineering, and |phdphil| for a PhD thesis in natural philosophy.
% \end{function}
%
% \begin{function}{colormode}
% \begin{syntax}
% |colormode| = \meta{choice}
% \end{syntax}
% Select the color scheme used by the automatically loaded \pkg{se2colors}
% package, see \cref{sec:doc-se2colors} for a description.
% \end{function}
%
%
% \subsection{The title page}\label{sec:doc-se2thesis-title}
%
% Designing a title package for a thesis can be complicated.
% There might be some requirements that are not obvious to the user, especially
% considering the positioning of elements.
% The University of Passau, for example, requires the logo to be positioned on
% the top right of a page;
% theses—especially PhD theses that shall be published through the University's
% library system—could be rejected from publication by the library until this is
% fixed.
%
% We thus redeclare the standard \cs{maketitle} macro from \KOMAScript{} and
% customise it to our needs.
% \begin{variable}{\@maketitle}
% \begin{syntax}
% \cmd{\@maketitle}
% \end{syntax}
% We override the definition of the \cmd{\@maketitle} macro for our needs.
% \end{variable}
% In addition to the macros provided by the \KOMAScript{} classes
% for the title-page values (e.g. \cs{author}, \cs{title},
% we provide some further macros that can be used.
% Setting values to these macros is optional in any case,
% if they are not set, the corresponding value is not put to the title page.
%
% \begin{function}{\version}
% \begin{syntax}
% \cmd{\version} \marg{version}
% \end{syntax}
% Specify the version of the document. This can, for example, be a |git| hash
% of the current version.
% \end{function}
%
% \begin{function}{\degreeprogramme}
% \begin{syntax}
% \cmd{\degreeprogramme} \marg{programme-name}
% \end{syntax}
% Specify the degree programme the thesis is meant to be accepted in.
% Possible values are, among others, \enquote{Informatik} if you are writing
% your thesis in German, or \enquote{Computer Science} if you are writing the
% thesis in English.
% \end{function}
%
% \begin{function}{\matrnumber}
% \begin{syntax}
% \cmd{\matrnumber} \marg{matriculation-number}
% \end{syntax}
% Specify the matriculation number of the student writing the thesis.
% This is required for bachelor's and master's theses.
% \end{function}
%
% \begin{function}{\supervisor, \cosupervisor}
% \begin{syntax}
% \cmd{\supervisor} \marg{name}
% \cmd{\cosupervisor} \marg{name}
% \end{syntax}
% Specify the name of your supervisor and co-supervisor.
% Both people usually are professors.
% \end{function}
%
% \begin{function}{\advisor, \coadvisor}
% \begin{syntax}
% \cmd{\advisor} \marg{name}
% \cmd{\coadvisor} \marg{name}
% \end{syntax}
% Specify the name of your advisor and co-advisor.
% Both people usually are PhD students or postdocs.
% \end{function}
%
% \begin{function}{\department, \institute}
% \begin{syntax}
% \cmd{\department} \marg{name}
% \cmd{\institute} \oarg{short-name} \marg{name}
% \end{syntax}
% Specify the department and institute.
% The department is, for example, \enquote{Faculty of Computer Science and
% Mathematics}, the institute, for example, \enquote{Chair of Software
% Engineering~II}.
% If the \cs{department} value is not specify, we use \enquote{Faculty of
% Computer Science} as the default value for English theses and
% \enquote{Fakultät für Informatik und Mathematik} as the default value of
% German theses.
% \end{function}
%
% \begin{function}{\external}
% \begin{syntax}
% \cmd{\external} \marg{name}
% \end{syntax}
% Specify the name of an external referee.
% \end{function}
%
% \begin{function}{\location}
% \begin{syntax}
% \cmd{\location} \marg{name-of-town}
% \end{syntax}
% Specify the name of your residence town for the signature field.
% \end{function}
%
% To define the path to the logo graphics we require a different workflow:
% We do not bundle logo graphics with this package due to legal restrictions.
% They can be downloaded from the University's website; please note that the
% website for downloading the logo graphics is only accessible from within the
% University's campus network or a VPN connection.
% To specify the path to the logo graphics, we provide a load-time option to the
% \cls{se2thesis} class called |logofile|~(see \cref{sec:doc-se2thesis-options}).
%
% When printing the thesis in two-side mode—which we recommend—the back of the
% title page again denotes author and title on the bottom.
% \begin{variable}{\@lowertitleback}
% \begin{syntax}
% \cmd{\l@lowertitleback}
% \end{syntax}
% Override this internal macro of \KOMAScript{} to print this information on
% the back side of the title page.
% \end{variable}
%
% Additionally, we provide some interal rewritings to standard macros from
% \KOMAScript{} that allow to automatically split authors using the \cmd{\and}
% command.
% \begin{variable}{\author, \@author}
% \begin{syntax}
% \cmd{\author} \marg{author}
% \end{syntax}
% We rewrite the definitions of \cmd{\author} and \cmd{\@author} to do this
% splitting automatically.
% Additionally, this also adds a correctly translated version of \enquote{and}
% between the author names if required.
% \end{variable}
%
% \subsection{Type-area settings}\label{sec:doc-se2thesis-typearea}
%
% The \cls{se2thesis} class manipulates the type area compared to the default
% settings of the \KOMAScript{} classes.
% Our settings are inspired by the \pkg{classicthesis} package, which itself is
% inspired by the style used by famous statistician Edward Tufte.
% We provide predefined settings for DIN-A4, DIN-A5, and DIN-B5 papers.
% If you need settings for other paper sizes, please open an issue on this
% package's GitHub repository
% (\href{https://github.com/se2p/se2thesis}{https://github.com/se2p/se2thesis})
% and we will happily include those settings in a future release of this bundle.
%
% Additionally, we are setting the page footer in a way that it contains the
% page numbers in the outer margin and the headmarks split from the page numbers
% by a vertical bar.
%
% \subsection{Abstract for the thesis}\label{sec:doc-se2thesis-abstract}
%
% Each thesis shall come with an abstract that summarises its content.
% The abstract should be written in the language the thesis is written in.
% Additionally, there is the requirement to provide a German abstract if the
% thesis is written in a foreign language.
% \begin{function}{\abstract}
% \begin{syntax}
% \cmd{\abstract}
% \end{syntax}
% We ensure that the \cmd{\abstract} command is defined for all document
% classes.
% \end{function}
%
% \DescribeEnv{abstract}
% To typeset an abstract, we provide an environment called \env{abstract}.
% The environment takes an optional argument that specifies the language that is
% used in this abstract.
% Setting the abstract's language will cause its title to change to the
% respective language;
% additionally, hyphenation is also changed for that language.
% \begin{verbatim}
% \begin{abstract}[language]
% Your abstract text.
% \end{abstract}
% \end{verbatim}
%
% \subsection{Acknowledgements}\label{sec:doc-se2thesis-acknowledgements}
%
% \DescribeEnv{acknowledgements}
% We provide the \env{acknowledgements} environment to typeset acknowledgements
% for your thesis.
% Using this environment is optional.
% Usually, bachelor's and master's thesis do not contain such an acknowledgements
% section, however, there is no general rule to this.
% \begin{verbatim}
% \begin{acknowledgements}[language]
% Your acknowledgements.
% \end{acknowledgements}
% \end{verbatim}
%
% \subsection{Document structuring}\label{sec:doc-se2thesis-structuring}
%
% A larger work, such as a thesis, is usually structured in three large blocks:
% a frontmatter that provides all the overview, such as abstract, table of
% contents, etc.,
% a mainmatter that contains all the actual content,
% and a backmatter for appendices.
% \cls{se2thesis} ensures that the following macros are defined because they are
% not provided by all \KOMAScript{} classes.
% \begin{function}{\frontmatter, \mainmatter, \backmatter}
% \begin{syntax}
% \cmd{\frontmatter}
% \cmd{\mainmatter}
% \cmd{\backmatter}
% \end{syntax}
% Switches between frontmatter, mainmatter, and backmatter.
% Most notably, the frontmatter will have roman page numbers, while the other
% two will have arabic page numbers.
% \end{function}
%
% \subsection{Authorship declaration}\label{sec:doc-se2thesis-authorship}
%
% The University of Passau requires its students to provide an authorship
% declaration as part of their thesis for submission.
% They provide a template form, which would not fit the style of the
% \cls{se2thesis} class.
% Thus, we provide the \cmd{\authorshipDeclaration} macro to typeset such
% a declaration.
% It uses the original~(German) text of the declaration and fills in the values
% that are specified by the \cmd{\author} and \cmd{\location} macros.
% \begin{function}{\authorshipDeclaration}
% \begin{syntax}
% \cmd{\authorshipDeclaration}
% \end{syntax}
% Print the authorship declaration text.
% \end{function}
% \emph{Please note:} the authorship declaration will always be printed in
% German, no matter what the language of the thesis is.
% This happens due to legal requirements.
% In order to make this work, you have to load the \pkg{babel} or
% \pkg{polyglossia} package in a way that it also supports German hyphenation.
% For example, use
% \begin{verbatim}
% \usepackage[ngerman,main=UKenglish]{babel}
% \end{verbatim}
% for a thesis with \emph{traditional English}\footnote{
% there is a nice, probably photoshopped, picture of a Steam setup dialogue
% stating that American English is a \enquote{simplified version} of British
% English, see
% \href{https://jakubmarian.com/is-american-english-simplified-and-british-english-traditional/}{https://jakubmarian.com/is-american-english-simplified-and-british-english-traditional/}.
% } as its main language and support for German.
%
% \begin{function}{\signatureBox}
% \begin{syntax}
% \cmd{\signatureBox} \oarg{width} \marg{signature-name}
% \end{syntax}
% A helper macro to print the signature box for the authorship declaration.
% The optional argument \oarg{width} allows to specify a custom width for the
% signature line.
% The default is 5\,cm.
% The mandatory argument \marg{signature-name} specifies the name of the
% signee, which will be typeset below the signature line.
% \end{function}
%
% \subsection{Research Questions and findings summaries}\label{sec:doc-se2thesis-summaries}
%
% Most theses written at our Chair will require the student to provide some
% empirical evaluation of their work to shed insights whether their proposed
% ideas are actually useful.
% For an empirical study, one needs to specify research questions and maybe also
% hypotheses.
% The \cls{se2thesis} class supports this by providing environments for this.
%
% \DescribeEnv{resq}
% The \env{resq} environment shall be used to specify a research question.
%
% \DescribeEnv{hyp}
% The \env{hyp} environment shall be used to specify a hypothesis.
%
% \DescribeEnv{summary}
% After describing the results, we recommend to give an explicit summary of the
% findings for a research question or hypothesis.
% This summary shall be given in one or two sentences.
% The \env{summary} environment provides a convenient way for this;
% it will be typeset in a highlighted box that is easy to spot and also allows
% readers of the work to quickly grasp the main findings.
% \begin{verbatim}
% \begin{summary}{label-reference}
% The summary text itself.
% \end{summary}
% \end{verbatim}
% The environment expects as a parameter a label, for example, to a research
% question;
% however, this can also be arbitrary text.
%
% \subsection{Language Support and Hyphenation}\label{sec:doct-se2thesis-lang}
%
% The study regulations of the University of Passau require students to write
% their thesis in either German or English. For both cases it is recommended
% to load a package for the correct hyphenation patters. Usually, one can
% either choose between the \pkg{babel} and \pkg{polyglossia} package. For a
% detailed discussion in the differences and which to choose, please use the
% search engine of your choice.
%
% For this documentation we stick with the \pkg{babel} package, which is often
% considered to be the standard package.
%
% If you write your thesis in German, load \pkg{babel} in your preamble like
% follows
% \begin{verbatim}
% \usepackage[ngerman]{babel}
% \end{verbatim}
% For a thesis in English, you have to also load the German variant plus the
% English one as the default (see \cref{sec:doc-se2thesis-authorship} for an
% explanation)
% \begin{verbatim}
% \usepackage[ngerman,main=UKenglish]{babel}
% \end{verbatim}
%
% Note that by default, \LaTeX{} does not provide hyphenation for compound
% words, which is explained in the \TeX{} Book~\cite[p.~454]{Knu86} and a
% StackExchange post\footnote{\href{https://tex.stackexchange.com/a/63234/14622}{https://tex.stackexchange.com/a/63234/14622}}. The \pkg{babel} package
% provides a way (called shorthands) for German, which allows to reenable
% hyphenation for compound words (as they are common on German). These
% shorthands are by default not available for English, but they can easily be
% added by adding
% \begin{verbatim}
% \useshorthands{"}
% \addto\extrasUKenglish{\languageshorthands{ngerman}}
% \end{verbatim}
% after loading \pkg{babel} with the aforementioned \cmd{\usepackage}
% macro\footnote{see https://tex.stackexchange.com/a/298844/14622}.
%
% \emph{Please note:} loading the \pkg{hyphenat} package is strongly discouraged
% by the \pkg{se2thesis} maintainer because it conflicts with the \env{hyp}
% environment provided by \pkg{se2thesis} (see \cref{sec:doc-se2thesis-summaries}).
%
% \end{documentation}
%
% \clearpage
%
% \begin{implementation}
%
% \section{Global helpers}\label{sec:impl-global}
%
% These helpers might be useful for many exported packages and classes,
% thus we keep them on the global level of this implementation.
%
% \begin{macrocode}
%<*init>
% \end{macrocode}
%
% Load only the essential support (\pkg{expl3}) \enquote{up-front}, and only
% if required.
% \begin{macrocode}
\@ifundefined{ExplLoaderFileDate}
{ \RequirePackage{expl3} }
{}
% \end{macrocode}
%
% Make sure that the version of \pkg{l3kernel} in use is sufficiently new.
% We use \cs{ExplFileDate} as \cs{@ifpackagelater} does not work for
% pre-loaded \pkg{expl3} in the absence of the package.
% \begin{macrocode}
\@ifl@t@r\ExplLoaderFileDate{2020-01-09}
{}
{%
\PackageError{se2colors}{Support package expl3 too old}
{%
You need to update your installation of the bundles 'l3kernel' and
'l3packages'.\MessageBreak
Loading~se2colors~will~abort!%
}%
\endinput
}%
% \end{macrocode}
%
% \begin{macro}{\IfFormatAtLeastTF}
% This macro is not present in older kernels, thus we use the \LaTeXe{}
% mechanism as this is correct for this case.
% \begin{macrocode}
\providecommand \IfFormatAtLeastTF { \@ifl@t@r \fmtversion }
% \end{macrocode}
% \end{macro}
%
% \begin{macrocode}
%</init>
% \end{macrocode}
%
% \section{The \cls{se2thesis} implementation}\label{sec:impl-se2thesis}
%
% Start the \pkg{DocStrip} guards.
% \begin{macrocode}
%<*class>
% \end{macrocode}
%
% Identify the internal prefix (\LaTeX3 \pkg{DocStrip} convention): only
% internal material in this \emph{submodule} should be used directly.
% \begin{macrocode}
%<@@=slcd>
% \end{macrocode}
%
% Identify the class and give the overall version number.
% \begin{macrocode}
\ProvidesExplClass {se2thesis} {2024-10-16} {4.4.0}
{A thesis class for the Chair of Software Engineering II}
% \end{macrocode}
%
% \begin{macro}
% {
% \slcd_package_if_loaded:nTF,
% \slcd_package_if_loaded:nT,
% \slcd_package_if_loaded:nF,
% \slcd_package_if_loaded_p:n
% }
% Defines various \LaTeX3{} variants for the internal \cmd{\@ifpackageloaded}
% macro to check whether a package has been loaded.
% \begin{macrocode}
\prg_new_conditional:Nnn \slcd_package_if_loaded:n { p, T, F, TF }
{
\use:c { @ifpackageloaded }
{ #1 }
{ \prg_return_true: }
{ \prg_return_false: }
}
% \end{macrocode}
% \end{macro}
%
% Load required packages early.
% \begin{macrocode}
\RequirePackage{graphicx}
\RequirePackage{translations}
\LoadDictionary{se2translations}
\DeclareTranslationFallback{version-of-date}{%
Version~\l_@@_version_tl\ of~\@date
}
\DeclareTranslation{German}{version-of-date}{%
Version~\l_@@_version_tl\ vom~\@date
}
\DeclareTranslation{English}{version-of-date}{%
Version~\l_@@_version_tl\ of~\@date
}
% \end{macrocode}
%
% \subsection{Define Variables}
%
% The following variables are necessary for the argument handling.
% \begin{macro}{\l_@@_paper_int}
% A variable to store the key of the page size selected by the user.
% \begin{macrocode}
\int_new:N \l_@@_paper_int
% \end{macrocode}
% \end{macro}
%
% We also need properties to store class options that are not for us,
% thus shall be handled by the underlying base class.
% \begin{macro}
% {
% \l_@@_base_class_tl,
% \l_@@_clsopts_prop,
% \l_@@_unknown_clsopts_prop
% }
% Store the known and the unknown class options.
% The latter will be forwarded to the base class later.
% \begin{macrocode}
\tl_new:N \l_@@_base_class_tl
\prop_new:N \l_@@_clsopts_prop
\prop_new:N \l_@@_unknown_clsopts_prop
% \end{macrocode}
% \end{macro}
%
% Define internal variables to hold the values of the fields of the title
% page.
% \begin{macro}
% {
% \l_@@_version_tl,
% \l_@@_degreeprogramme_tl,
% \l_@@_matrnumber_tl,
% \l_@@_supervisor_tl,
% \l_@@_cosupervisor_tl,
% \l_@@_advisor_tl,
% \l_@@_coadvisor_tl,
% \l_@@_department_tl,
% \l_@@_institute_tl,
% \l_@@_external_tl,
% \l_@@_logofile_tl,
% \l_@@_signature_tl,
% \l_@@_location_tl
% }
% \begin{macrocode}
\tl_new:N \l_@@_version_tl
\tl_new:N \l_@@_degreeprogramme_tl
\tl_new:N \l_@@_matrnumber_tl
\tl_new:N \l_@@_supervisor_tl
\tl_new:N \l_@@_cosupervisor_tl
\tl_new:N \l_@@_advisor_tl
\tl_new:N \l_@@_coadvisor_tl
\tl_new:N \l_@@_department_tl
\tl_new:N \l_@@_institute_tl
\tl_new:N \l_@@_external_tl
\tl_new:N \l_@@_logofile_tl
\tl_new:N \l_@@_signature_tl
\tl_new:N \l_@@_location_tl
% \end{macrocode}
% \end{macro}
%
% Define several dimensions for the \pkg{typearea} package to define the
% package style.
% \begin{macro}
% {
% \l_@@_marginspace_dim,
% \l_@@_headmarkspace_dim,
% \l_@@_rulespace_dim,
% \l_@@_pagemark_minipage_dim,
% \l_@@_ruleraise_dim,
% \l_@@_rulewidth_dim,
% \l_@@_rulethickness_dim
% }
% \begin{macrocode}
\dim_new:N \l_@@_marginspace_dim
\dim_new:N \l_@@_headmarkspace_dim
\dim_new:N \l_@@_rulespace_dim
\dim_new:N \l_@@_pagemark_minipage_dim
\dim_new:N \l_@@_ruleraise_dim
\dim_new:N \l_@@_rulewidth_dim
\dim_new:N \l_@@_rulethickness_dim
\dim_gset:Nn \l_@@_marginspace_dim { -1.85cm }
\dim_gset:Nn \l_@@_headmarkspace_dim { 0.75cm }
\dim_gset:Nn \l_@@_rulespace_dim { 10pt }
\dim_gset:Nn \l_@@_pagemark_minipage_dim { 1.5cm }
\dim_gset:Nn \l_@@_ruleraise_dim { -5pt }
\dim_gset:Nn \l_@@_rulewidth_dim { 1.25pt }
\dim_gset:Nn \l_@@_rulethickness_dim { 15pt }
% \end{macrocode}
% \end{macro}
%
% \subsection{Load-time options}
%
% We define the key-value interface for the class.
% \begin{macro}
% {
% \l_@@_base_class_tl,
% \l_@@_unknown_clsopts_prop,
% \l_@@_paper_int,
% \l_@@_thesis_type_tl,
% \l_@@_licensetype_tl,
% \l_@@_licensemodifier_tl,
% \l_@@_licenseversion_tl,
% \l_@@_colormode_tl,
% }
% \begin{macrocode}
\keys_define:nn { seiithesis }
{
class .choice:,
class / report .meta:n = {class=scrreprt},
class / scrreprt .code:n = \tl_gset:Nn \l_@@_base_class_tl {scrreprt},
class / book .meta:n = {class=scrbook},
class / scrbook .code:n = \tl_gset:Nn \l_@@_base_class_tl {scrbook},
class .initial:n = scrbook,
paper .choices:nn = {a4,b5}{
\int_gset_eq:NN \l_@@_paper_int \l_keys_choice_int
},
paper .initial:n = a4,
logofile .tl_gset:N = \l_@@_logofile_tl,
logofile .initial:n =,
thesistype .choice:,
thesistype / bachelor .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {bachelor},
thesistype / bachelorproposal .code:n = {
\tl_gset:Nn \l_@@_thesis_type_tl {bachelorproposal}
},
thesistype / master .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {master},
thesistype / masterproposal .code:n = {
\tl_gset:Nn \l_@@_thesis_type_tl {masterproposal}
},
thesistype / phd .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {phd},
thesistype / phdeng .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {phdeng},
thesistype / phdphil .code:n = \tl_gset:Nn \l_@@_thesis_type_tl {phdphil},
thesistype / phdproposal .code:n = {
\tl_gset:Nn \l_@@_thesis_type_tl {phdproposal}
},
thesistype .initial:n = master,
colormode .choices:nn = {4C,CMYK,cmyk,RGB,rgb,BW,bw,gray}{
\tl_gset_eq:NN \l_@@_colormode_tl \l_keys_choice_tl
},
colormode .initial:n = cmyk,
unknown .code:n = {
\prop_gput:NVn \l_@@_unknown_clsopts_prop \l_keys_key_tl {#1}
},
}
% \end{macrocode}
% \end{macro}
%
% Handle the options
% \begin{macrocode}
\IfFormatAtLeastTF { 2022-06-01 }
{ \ProcessKeyOptions [ seiithesis ] }
{
\RequirePackage{ l3keys2e }
\ProcessKeysOptions { seiithesis }
}
% \end{macrocode}
%
% Handle the known options for base class
% \begin{macrocode}
\prop_map_inline:Nn \l_@@_clsopts_prop
{
\tl_if_empty:nTF {#2}
{ \PassOptionsToClass {#1} {\l_@@_base_class_tl} }
{
\clist_map_inline:nn {#2}
{ \PassOptionsToClass {#1=##1} {\l_@@_base_class_tl} }
}
}
% \end{macrocode}
%
% Load the base class
% \begin{macrocode}
\LoadClass{\l_@@_base_class_tl}
% \end{macrocode}
%
% Attempt to handle the unknown options
% \begin{macrocode}
\prop_map_inline:Nn \l_@@_unknown_clsopts_prop
{
\cs_if_exist:cT {KV@KOMA.\l_@@_base_class_tl.cls@#1}
{
\tl_if_empty:nTF {#2}
{ \KOMAoptions{#1} }
{ \KOMAoption{#1}{#2}}
}
}
% \end{macrocode}
%
% \subsection{Package loading}
%
% We load some packages with options that depend on options to the
% \cls{se2thesis} class.
% Thus, we load them here to be able to hand them over the respective values.
%
% We start with the \pkg{se2colors} and \pkg{se2fonts} packages.
% \begin{macrocode}
\PassOptionsToPackage{\l_@@_colormode_tl}{se2colors}
\RequirePackage{se2colors}
\RequirePackage{se2fonts}
% \end{macrocode}
%
% \subsection{User macros for the title page}
%
% In addition to the macros provided by the \KOMAScript{} classes
% for the title-page values (e.g. \cs{author}, \cs{title}),
% provide these additional macros to the user.
% \begin{macro}{\version}
% Specify the version of the document, e.g., a |git| hash.
% \begin{macrocode}
\ProvideDocumentCommand \version { m }
{
\tl_set:Nn \l_@@_version_tl {#1}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\degreeprogramme}
% Specify the degree programme the thesis is meant to be accepted in.
% \begin{macrocode}
\ProvideDocumentCommand \degreeprogramme { m }
{
\tl_set:Nn \l_@@_degreeprogramme_tl {#1}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\matrnumber}
% Specify the matriculation number of the student.
% \begin{macrocode}
\ProvideDocumentCommand \matrnumber { m }
{
\tl_set:Nn \l_@@_matrnumber_tl {#1}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\supervisor, \cosupervisor}
% Specify the supervisor and co-supervisor of the thesis, usually a professor.
% \begin{macrocode}
\ProvideDocumentCommand \supervisor { m }
{
\tl_set:Nn \l_@@_supervisor_tl {#1}
}
\ProvideDocumentCommand \cosupervisor { m }
{
\tl_set:Nn \l_@@_cosupervisor_tl {#1}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\advisor, \coadvisor}
% Specify the advisor and co-advisor of the thesis, usually a PhD student or
% postdoc.
% \begin{macrocode}
\ProvideDocumentCommand \advisor { m }
{
\tl_set:Nn \l_@@_advisor_tl {#1}
}
\ProvideDocumentCommand \coadvisor { m }
{
\tl_set:Nn \l_@@_coadvisor_tl {#1}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\department, \institute}
% Specify the university's department and institute you are writing
% the thesis for.
% \begin{macrocode}
\ProvideDocumentCommand \department { m }
{
\tl_set:Nn \l_@@_department_tl {#1}
}
\ProvideDocumentCommand \institute { o m }
{
\tl_set:Nn \l_@@_institute_tl {#2}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\external}
% Specify an external referee.
% \begin{macrocode}
\ProvideDocumentCommand \external { m }