-
Notifications
You must be signed in to change notification settings - Fork 21
/
frontmatter.tex
128 lines (108 loc) · 3.99 KB
/
frontmatter.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
% Helper file that pulls subchapters together.
% In conjunction, packages polyglossia and cleveref do some serious witchcraft.
% If we call these \crefname redefinitions in the preamble, it does not work.
% Also does not work with \AtBeginDocument. Tried with both a macro inside the
% redefinition, and just plain text.
\crefname{listing}{\lstlistingname}{\lstlistingname s}
\Crefname{listing}{\lstlistingname}{\lstlistingname s}
% Set initial pages to alpha, so that they do not collide with later Arabic numbering
% in the generated PDF. This won't show in print because page numbers aren't displayed
% until later. But you will be able to print the title page by printing page 'a', which
% would otherwise overlap with page '1', aka the first actual text page.
\pagenumbering{alph}
\maketitle% Print main title page
\subimport{frontmatter/}{colophon}
\makeatletter
% Switch titlepage style around
\ifdefstring{\cookbook@titlestyle}{book}{%
\renewcommand*{\cookbook@titlestyle}{thesis}%
}{%
\renewcommand*{\cookbook@titlestyle}{book}%
}
\subtitle{An alternative title page style}
%
% Run this file again, since it contains the \renewcommand definitions
\input{chapters/other/titlepage.tex}
\makeatother
\maketitle% Print alternative title page
\frontmatter% In KOMAScript, resets pagenumber, uses Roman numerals etc.
% Note that \subincludefrom{}{} cannot be nested, therefore us \subimport
\subimport{frontmatter/}{task}
\subimport{frontmatter/}{authorship_declaration}
\subimport{frontmatter/}{abstract}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Lists of Content
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tableofcontents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% addchap is KOMA equivalent for \chapter*, but also creates ToC entry, see also
% https://tex.stackexchange.com/a/116085/120853
% Use built-in macro \glossaryname for proper internationalization. With polyglossia, it
% will contain \text<language>{<glossary translation>}, which has been taken care of
% using \pdfstringdefDisableCommands{} in the class file
\addchap{\glossaryname}%
\label{ch:glossary}
\emph{%
\TransGlossaryLegend{}%
}%
% Print "unsorted" glossaries; these are in fact sorted, but externally using bib2gls.
% These will throw 'Token not allowed in PDF, removing \text<language>' warning.
% Specify title= manually if that gets too annoying.
\printunsrtglossary[
type=symbols,
style=symbunitlong,
]
\printunsrtglossary[
type=numbers,
style=numberlong,
]
\printunsrtglossary[
type=subscripts,
style=mcolalttree,
nonumberlist,
]
\printunsrtglossary[
type=abbreviations,
style=long3colheader,
]
\addchap{\glossaryname{} without page lists}%
\emph{
The following styles do not contain page lists of the entries' occurrences,
leading to a cleaner, more concise look.
Refer to the source code on how to achieve this (which options and styles to use).
}
% For all sorts of styles, see also
% https://www.dickimaw-books.com/gallery/glossaries-styles/
% Simply pass the `nonumberlist` parameter where desired/required:
\printunsrtglossary[
type=symbols,
style=symbunitlong,
nonumberlist,
]
\printunsrtglossary[
type=numbers,
style=numberlong,
nonumberlist,
]
\printunsrtglossary[
type=subscripts,
style=mcolalttree,
nonumberlist,
]
\printunsrtglossary[
type=abbreviations,
% If `nonumberlist` is passed, the `long3colheader` style simply leaves the
% corresponding table cells *empty* (leading to an entirely empty column), but does
% not actually remove the column. So use a different, but equivalent style
% altogether:
style=longheader,
% The `longheader` style prints the page list behind the description, just not in a
% separate column. So also explicitly suppress the generation of that:
nonumberlist,
]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\listoffigures%
\listoftables%
\listofexamples%
\lstlistoflistings%
\subimport{frontmatter/}{preface}