-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy paththesis_template.typ
158 lines (132 loc) · 3.18 KB
/
thesis_template.typ
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
#import "/layout/cover.typ": *
#import "/layout/titlepage.typ": *
#import "/layout/disclaimer.typ": *
#import "/layout/acknowledgement.typ": acknowledgement as acknowledgement_layout
#import "/layout/transparency_ai_tools.typ": transparency_ai_tools as transparency_ai_tools_layout
#import "/layout/abstract.typ": *
#import "/utils/print_page_break.typ": *
#import "/layout/fonts.typ": *
#let thesis(
title: "",
titleGerman: "",
degree: "",
program: "",
supervisor: "",
advisors: (),
author: "",
startDate: datetime,
submissionDate: datetime,
abstract_en: "",
abstract_de: "",
acknowledgement: "",
transparency_ai_tools: "",
is_print: false,
body,
) = {
cover(
title: title,
degree: degree,
program: program,
author: author,
)
pagebreak()
titlepage(
title: title,
titleGerman: titleGerman,
degree: degree,
program: program,
supervisor: supervisor,
advisors: advisors,
author: author,
startDate: startDate,
submissionDate: submissionDate
)
print_page_break(print: is_print, to: "even")
disclaimer(
title: title,
degree: degree,
author: author,
submissionDate: submissionDate
)
transparency_ai_tools_layout(transparency_ai_tools)
print_page_break(print: is_print)
acknowledgement_layout(acknowledgement)
print_page_break(print: is_print)
abstract(lang: "en")[#abstract_en]
abstract(lang: "de")[#abstract_de]
set page(
margin: (left: 30mm, right: 30mm, top: 40mm, bottom: 40mm),
numbering: none,
number-align: center,
)
set text(
font: fonts.body,
size: 12pt,
lang: "en"
)
show math.equation: set text(weight: 400)
// --- Headings ---
show heading: set block(below: 0.85em, above: 1.75em)
show heading: set text(font: fonts.body)
set heading(numbering: "1.1")
// Reference first-level headings as "chapters"
show ref: it => {
let el = it.element
if el != none and el.func() == heading and el.level == 1 {
link(
el.location(),
[Chapter #numbering(
el.numbering,
..counter(heading).at(el.location())
)]
)
} else {
it
}
}
// --- Paragraphs ---
set par(leading: 1em)
// --- Citations ---
set cite(style: "alphanumeric")
// --- Figures ---
show figure: set text(size: 0.85em)
// --- Table of Contents ---
show outline.entry.where(level: 1): it => {
v(15pt, weak: true)
strong(it)
}
outline(
title: {
text(font: fonts.body, 1.5em, weight: 700, "Contents")
v(15mm)
},
indent: 2em
)
v(2.4fr)
pagebreak()
// Main body. Reset page numbering.
set page(numbering: "1")
counter(page).update(1)
set par(justify: true, first-line-indent: 2em)
body
// List of figures.
pagebreak()
heading(numbering: none)[List of Figures]
outline(
title:"",
target: figure.where(kind: image),
)
// List of tables.
pagebreak()
heading(numbering: none)[List of Tables]
outline(
title: "",
target: figure.where(kind: table)
)
// Appendix.
pagebreak()
heading(numbering: none)[Appendix A: Supplementary Material]
include("/layout/appendix.typ")
pagebreak()
bibliography("/thesis.bib")
}