-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathlib.typ
More file actions
829 lines (737 loc) · 23.8 KB
/
Copy pathlib.typ
File metadata and controls
829 lines (737 loc) · 23.8 KB
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
// Modern UiT Thesis Template
//
// This is a modern thesis template for UiT The Arctic University of Norway.
// Requires parameters set in the `thesis.typ` file.
//
#import "@preview/subpar:0.2.2"
#import "@preview/physica:0.9.8": *
#import "@preview/glossarium:0.5.10": (
gls, glspl, make-glossary, print-glossary, register-glossary,
)
#import "@preview/codly:1.3.0": *
#import "@preview/theorion:0.6.0": *
#import cosmos.fancy: *
#import "modules/frontpage.typ": frontpage
#import "modules/backpage.typ": backpage
#import "modules/supervisors.typ": supervisors-page
#import "modules/epigraph.typ": epigraph-page
#import "modules/abstract.typ": abstract-page
#import "modules/acknowledgements.typ": acknowledgements-page
#import "modules/abbreviations.typ": abbreviations-page
// Workaround for the lack of an `std` scope.
#let std-bibliography = bibliography
#let std-smallcaps = smallcaps
#let std-upper = upper
#let std-pagebreak = pagebreak
// Overwrite the default `smallcaps` and `upper` functions with increased spacing between
// characters. Default tracking is 0pt.
#let smallcaps(body) = std-smallcaps(text(tracking: 0.6pt, body))
#let upper(body) = std-upper(text(tracking: 0.6pt, body))
// Colors used across the template.
#let stroke-color = luma(200)
#let fill-color = luma(250)
#let uit-teal-color = rgb("#0095b6")
#let uit-light-teal-color = rgb("#e6f7fc")
#let uit-gray-color = rgb("#48545e")
// Helper to display two pieces of content with space between.
#let fill-line(left-text, right-text) = [#left-text #h(1fr) #right-text]
// Definitions and Theorems
//
// Provided by the `theorion` package (`theorem`, `definition`, `lemma`,
// `corollary`, `example`, `proof`, ...). The numbering, colors and symbols are
// configured inside the `thesis` function below.
#let example = example-box.with(outlined: false)
#let theorion-proof = proof
#let proof(..args) = {
set math.equation(numbering: none)
theorion-proof(..args)
}
// Helper to display external codeblocks.
// Based on https://github.com/typst/typst/issues/1494
#let code-block(filename, content) = raw(
content,
block: true,
lang: filename.split(".").at(-1),
)
// Helper to display CSV tables.
#let csv-table(
tabledata: "",
columns: 1,
header-row: rgb(255, 231, 230),
even-row: rgb(255, 255, 255),
odd-row: rgb(228, 234, 250),
) = {
let tableheadings = tabledata.first()
let data = tabledata.slice(1).flatten()
table(
columns: columns, fill: (_, row) => if row == 0 {
header-row // color for header row
} else if calc.odd(row) {
odd-row // each other row colored
} else {
even-row
}, align: (col, row) => if row == 0 { center } else {
left
}, ..tableheadings.map(x => [*#x*]), // bold headings
..data,
)
}
// `in-appendix` is for custom styling in the appendix section
#let in-appendix = state("in-appendix", false)
// The `in-outline` mechanism is for showing a short caption in the list of figures
// See https://sitandr.github.io/typst-examples-book/book/snippets/chapters/outlines.html#long-and-short-captions-for-the-outline
#let in-outline = state("in-outline", false)
// -- Styling rules for Front-Main-Back matter --
// Common styles for front matter
#let front-matter(heading-font: ("Open Sans", "Noto Sans"), body) = {
set page(
numbering: "i",
// Only show numbering in footer when no chapter header is present
footer: context {
let page-number = here().page()
let chapters = heading.where(level: 1)
if query(chapters).any(it => it.location().page() == here().page()) {
align(center, text(
weight: "thin",
font: heading-font,
size: 8pt,
fill: uit-gray-color,
counter(page).display(),
))
} else {
none
}
},
header: context {
// Get current page number
let page-number = here().page()
// If the current page is the start of a chapter, don't show a header
let chapters = heading.where(level: 1)
let is-start-chapter = query(chapters).any(it => (
it.location().page() == page-number
))
if is-start-chapter {
return []
}
if not state("content.switch", false).get() and not is-start-chapter {
return []
}
// Find the chapter of the section we are currently in
let chapters-before = query(chapters.before(here()))
if chapters-before.len() > 0 {
let current-chapter = chapters-before.last()
// Show current chapter on odd pages, current subsection on even
let (left-text, right-text) = if calc.odd(page-number) {
(counter(page).display(), upper(current-chapter.body))
} else {
(
upper(current-chapter.body),
counter(page).display(),
)
}
text(
weight: "thin",
font: heading-font,
size: 8pt,
fill: uit-gray-color,
fill-line(left-text, right-text),
)
}
},
)
counter(page).update(0)
set heading(numbering: none)
show heading.where(level: 1): it => {
it
v(6%, weak: true)
}
body
}
// Common styles for main matter
#let main-matter(heading-font: ("Open Sans", "Noto Sans"), body) = {
set text(number-type: "old-style")
set page(
numbering: "1",
// Only show numbering in footer when no chapter header is present
footer: context {
let chapters = heading.where(level: 1)
if query(chapters).any(it => it.location().page() == here().page()) {
align(center, text(
weight: "thin",
font: heading-font,
size: 8pt,
fill: uit-gray-color,
counter(page).display(),
))
} else {
none
}
},
// Set page header
header-ascent: 30%,
header: context {
// Get current page number
let page-number = here().page()
// If the current page is the start of a chapter, don't show a header
let chapters = heading.where(level: 1)
let is-start-chapter = query(chapters).any(it => (
it.location().page() == page-number
))
if is-start-chapter {
return []
}
if not state("content.switch", false).get() and not is-start-chapter {
return
}
// Find the chapter of the section we are currently in
let chapters-before = query(chapters.before(here()))
if chapters-before.len() > 0 {
let current-chapter = chapters-before.last()
// If a new subsecion starts on this page, select that subsection.
// Otherwise, select the last subsection
let current-subsection = {
let subsections = heading.where(level: 2)
let subsections-after = query(subsections.after(here()))
if subsections-after.len() > 0 {
let next-subsection = subsections-after.first()
if next-subsection.location().page() == page-number {
(next-subsection)
} else {
let subsections-before = query(subsections.before(here()))
if subsections-before.len() > 0 {
(subsections-before.last())
} else {
// No subsections in this chapter
none
}
}
}
}
let colored-slash = text(fill: uit-teal-color, "/")
let spacing = h(3pt)
// Content to display subsection count and heading
let subsection-text = if current-subsection != none {
let subsection-numbering = current-subsection.numbering
let location = current-subsection.location()
let subsection-count = numbering(
subsection-numbering,
..counter(
heading,
).at(location),
)
[#subsection-count #spacing #colored-slash #spacing #current-subsection.body]
} else {
// No subsections in chapter, display nothing
[]
}
// Content to display chapter count and heading
let chapter-text = {
let chapter-title = current-chapter.body
let chapter-number = counter(heading.where(level: 1)).display()
let prefix = if in-appendix.get() { [APPENDIX] } else { [CHAPTER] }
[#prefix #chapter-number #spacing #colored-slash #spacing #chapter-title]
}
if current-chapter.numbering != none {
// Show current chapter on odd pages, current subsection on even
let (left-text, right-text) = if calc.odd(page-number) {
(counter(page).display(), chapter-text)
} else {
(
subsection-text,
counter(page).display(),
)
}
text(
weight: "thin",
font: heading-font,
size: 8pt,
fill: uit-gray-color,
fill-line(upper(left-text), upper(right-text)),
)
}
}
},
)
counter(page).update(0)
counter(heading).update(0)
set heading(numbering: "1.1", supplement: [Chapter])
show heading.where(level: 1): it => {
it
v(12%, weak: true)
}
body
}
// Common styles for back matter
#let back-matter(body) = {
set heading(numbering: "A.1.1", supplement: [Appendix])
// Number theorems, definitions, etc. as "A.1" in the appendix.
set-theorion-numbering("A.1")
// Make sure headings start with 'A'
counter(heading.where(level: 1)).update(0)
counter(heading).update(0)
body
}
// -- Template entrypoint --
// This function gets your whole document as its `body` and formats it
#let thesis(
// The title for your work.
title: [Your Title],
// Subtitle for your work.
subtitle: none,
// Author.
author: "Author",
// The supervisor(s) for your work. Takes an array of "Title", "Name", [Affiliation]
supervisors: (
(
title: "Your Supervisor",
name: "Supervisor Name",
affiliation: [UiT The Arctic University of Norway, \
Faculty of Science and Technology, \
Department of Computer Science],
)
),
// The paper size to use.
paper-size: "a4",
// The degree you are working towards
degree: "INF-3983 Capstone",
// What field you are majoring in
major: "Computer Science",
// The faculty and department at which you are working
faculty: "Faculty of Science and Technology",
department: "Department of Computer Science",
// Date that will be displayed on cover page.
// The value needs to be of the 'datetime' type.
// More info: https://typst.app/docs/reference/foundations/datetime/
date: datetime(year: 2025, month: 6, day: 1),
// Format in which the date will be displayed on cover page.
// More info: https://typst.app/docs/reference/foundations/datetime/#format
date-format: "[month repr:long] [day padding:zero], [year repr:full]",
// The contents for the epigraph page. This will be displayed after the acknowledgements.
// Can be omitted if you don't have one
epigraph: none,
// An abstract for your work. Can be omitted if you don't have one.
abstract: none,
// The contents for the acknowledgements page. This will be displayed after the
// abstract. Can be omitted if you don't have one.
acknowledgements: none,
// An appendix after the bibliography.
appendix: [],
// The contents for the preface page. This will be displayed after the cover page. Can
// be omitted if you don't have one.
preface: none,
// The result of a call to the `bibliography` function or `none`.
// Example: bibliography("refs.bib", title: "Bibliography", style: "ieee")
// More info: https://typst.app/docs/reference/model/bibliography/
bibliography: none,
// Display an index of figures (images).
figure-index: true,
// Display an index of tables
table-index: true,
// Display an index of listings (code blocks).
listing-index: true,
// Display an index of definitions. Off by default, since not every thesis
// uses definition blocks (an empty list would still render its heading).
definition-index: false,
// List of abbreviations
abbreviations: none,
// Whether to break new chapters to odd (right-hand) pages.
// Recommended for printed documents; set to `false` for digital-only use.
break-to-odd: true,
// Font family (or array of fallbacks) for the body text.
body-font: ("XCharter", "Charter"),
// Font family for headings, page headers/footers and the cover page.
heading-font: ("Open Sans", "Noto Sans"),
// Font family for raw text / code blocks.
raw-font: ("JetBrains Mono", "DejaVu Sans Mono"),
// Font family for math. Defaults to `body-font` when left as `auto`.
math-font: auto,
// The content of your work.
body,
) = {
// Fall back to the body font for math unless overridden.
let math-font = if math-font == auto { body-font } else { math-font }
// Set the document's metadata.
set document(title: title, author: author, date: if date != none {
date
} else {
auto
})
// Required init for packages
show: make-glossary
if abbreviations != none {
// Display short-form abbreviations in smallcaps
let abbrs = abbreviations.map(a => {
a.insert("short", smallcaps(a.short))
return a
})
register-glossary(abbrs)
}
show: codly-init
// Optimize numbers with superscript
// especially nice for bibliography entries
show regex("\d?\dth"): w => {
// 26th, ...
let b = w.text.split(regex("th")).join()
[#b#super([th])]
}
show regex("\d?\dst"): w => {
// 1st
let b = w.text.split(regex("st")).join()
[#b#super([st])]
}
show regex("\d?\d[nr]d"): w => {
// 2nd, 3rd, ...
let s = w.text.split(regex("\d")).last()
let b = w.text.split(regex("[nr]d")).join()
[#b#super(s)]
}
// If we find in bibentries some ISBN, we add link to it
show "https://doi.org/": w => {
// handle DOIs
[DOI:] + str.from-unicode(160) // 160 A0 nbsp
}
show regex("ISBN \d+"): w => {
let s = w.text.split().last()
link(
"https://isbnsearch.org/isbn/" + s,
w,
) // https://isbnsearch.org/isbn/1-891562-35-5
}
// Hanging indent for footnote
show footnote.entry: set par(hanging-indent: 1.5em)
// Set the body font.
// Default is XCharter at 11pt
set text(font: body-font, size: 11pt)
// Set raw text font.
// Default is JetBrains Mono at 9tp with DejaVu Sans Mono as fallback
show raw: set text(font: raw-font, size: 9pt)
// Configure page size and margins.
set page(
paper: "a4",
margin: (
bottom: 5cm,
top: 42mm,
inside: 33.0mm,
outside: 45mm,
),
numbering: "1",
number-align: center,
)
// Configure paragraph properties.
set par(justify: true, linebreaks: "optimized", spacing: 2em)
// Add some vertical spacing for all headings
show heading: it => {
let body = if it.level > 1 {
block([
#counter(heading).display()
#h(.6em)
#it.body
])
} else {
it
}
v(2.5em, weak: true)
body
v(1.5em, weak: true)
}
// Style chapter headings
show heading.where(level: 1): it => {
state("content.switch").update(false)
// Start chapter headings on a new page, on an odd page when break-to-odd is set.
// The weak break is absorbed when we're already at the top of a fresh page (e.g.
// after the front-matter → main-matter transition). In that case the page counter
// was reset to 0 and the break never fired, leaving the first chapter on page 0.
// The context guard below detects this and corrects the counter to 1.
pagebreak(weak: true, to: if break-to-odd { "odd" } else { none })
context if counter(page).get().first() == 0 {
counter(page).update(1)
}
state("content.switch").update(true)
set text(font: heading-font, weight: "bold", size: 24pt)
let heading-number = if heading.numbering == none {
[]
} else {
text(
counter(heading.where(level: 1)).display(),
number-type: "lining",
size: 62pt,
)
}
// Reset figure numbering on every chapter start
for kind in (image, table, raw) {
counter(figure.where(kind: kind)).update(0)
// Also reset equation numbering
counter(math.equation).update(0)
}
v(26%)
if heading.numbering != none {
stack(
dir: ltr,
move(dy: 54pt, polygon(
fill: uit-teal-color,
stroke: uit-teal-color,
(0pt, 0pt),
(5pt, 0pt),
(40pt, -90pt),
(35pt, -90pt),
)),
heading-number,
)
v(1.0em)
it.body
v(-1.5em)
} else {
it.body
}
}
// Configure heading numbering.
set heading(numbering: "1.1")
// Do not hyphenate headings.
show heading: set text(
font: heading-font,
weight: "bold",
hyphenate: false,
)
// -- Equations --
// Configure equation numbering.
set math.equation(numbering: n => {
set text(font: math-font)
let h1 = counter(heading).get().first()
numbering("(1.1)", h1, n)
})
show math.equation.where(block: true): it => {
set align(center)
// Indent
pad(left: 2em, it)
}
// -- Figures --
// Set figure numbering to follow chapter
set figure(numbering: n => {
let h1 = counter(heading).get().first()
numbering("1.1", h1, n)
})
set figure.caption(separator: [ -- ])
show figure.caption: c => {
if c.numbering == none {
c
} else {
text(weight: "bold")[
#c.supplement #context c.counter.display(c.numbering)
]
c.separator
c.body
}
}
// -- Tables --
// Use lighter gray color for table stroke
set table(inset: 7pt, stroke: (0.5pt + stroke-color))
// Show table header in small caps
show table.cell.where(y: 0): smallcaps
// Display inline code in a small box that retains the correct baseline.
show raw.where(block: false): box.with(
fill: fill-color.darken(2%),
inset: (x: 3pt, y: 0pt),
outset: (y: 3pt),
radius: 2pt,
)
// -- Links --
// Show a small maroon circle next to external links.
show link: it => {
it
// NOTE: Avoid linebreak before link indicators by using a word-joiner unicode character.
if type(it.dest) == str {
sym.wj
h(1.6pt)
sym.wj
super(box(height: 3.8pt, circle(
radius: 1.2pt,
stroke: 0.7pt + rgb("#993333"),
)))
}
}
// -- Definitions and Theorems --
show: show-theorion
// Number theorems, definitions, etc. per chapter as "1.1" (chapter.counter),
// matching the figure and equation numbering.
set-inherited-levels(1)
set-theorion-numbering("1.1")
set-qed-symbol[$qed$]
// Use the UiT palette for the theorem boxes:
// - theorem / lemma / corollary (secondary) -> teal
// - definition (primary) and example (quaternary) -> neutral gray
set-secondary-border-color(uit-teal-color)
set-secondary-body-color(uit-light-teal-color)
set-primary-border-color(uit-gray-color)
set-primary-body-color(uit-gray-color.lighten(90%))
set-quaternary-border-color(uit-gray-color.lighten(40%))
set-quaternary-body-color(uit-gray-color.lighten(95%))
set-fancy-radius(0.2em)
// Drop the playful card-suit corner glyphs for a more formal look.
set-primary-symbol[]
set-secondary-symbol[]
set-quaternary-symbol[]
// -- Lists --
let list-spacing = 18pt
let nested-list-spacing = 12pt
set enum(indent: list-spacing, spacing: list-spacing)
set list(indent: list-spacing, spacing: list-spacing)
let show-list-enum(it) = {
// Reduce spacing for nested list
set enum(indent: nested-list-spacing, spacing: nested-list-spacing)
set list(indent: nested-list-spacing, spacing: nested-list-spacing)
// Reduce top and bottom padding for nested list
let padding-y = {
if it.spacing == list-spacing {
v(list-spacing / 2)
} else {
v(1pt)
}
}
padding-y
it
padding-y
}
show enum: it => {
show-list-enum(it)
}
show list: it => {
show-list-enum(it)
}
// -- Front matter --
// Display front page
frontpage(
title: title,
subtitle: subtitle,
author: author,
degree: degree,
faculty: faculty,
department: department,
major: major,
date: date,
heading-font: heading-font,
)
// Use front matter stylings
show: front-matter.with(heading-font: heading-font)
// List of Supervisors
supervisors-page(supervisors, heading-font: heading-font)
// Epigraph
if epigraph != none {
epigraph-page()[#epigraph]
}
// Abstract
if abstract != none {
abstract-page()[#abstract]
}
// Acknowledgements
if acknowledgements != none {
acknowledgements-page()[#acknowledgements]
}
// -- Outlines --
// Display outlines (table of content, table of figures, etc...)
context {
// Helper to target figure kinds
let fig-t(kind) = figure.where(kind: kind)
// The `in-outline` is for showing a short caption in the list of figures
// See https://sitandr.github.io/typst-examples-book/book/snippets/chapters/outlines.html#long-and-short-captions-for-the-outline
show outline: it => {
in-outline.update(true)
// Show table of contents, list of figures, list of tables, etc. in the table of contents
set heading(outlined: true)
it
in-outline.update(false)
}
// Increase distance between dots on all outline fill
set outline.entry(fill: box(width: 1fr, repeat([#h(2.5pt) . #h(2.5pt)])))
pagebreak()
// Common padding to use on outline entries
let entry-spacing-left = 0.25em
let entry-spacing-right = 22pt
[
#show outline.entry: it => context {
// Calculate relative spacing, to line up fill regardless of page number width
let page-number-spacing = (
entry-spacing-right - measure(it.page()).width
)
link(it.element.location(), it.indented(
it.prefix() + h(entry-spacing-left),
it.body()
+ h(entry-spacing-left)
+ box(width: 1fr, it.fill)
+ h(page-number-spacing)
+ it.page(),
))
}
#show outline.entry.where(level: 1): it => {
set text(weight: "bold")
set block(above: 1.5em)
link(it.element.location(), it.indented(
it.prefix(),
it.body() + box(width: 1fr, none) + it.page(),
))
}
#outline(title: "Contents")
]
show outline.entry: it => context {
let prefix = {
show "Figure": ""
show "Table": ""
show "Listing": ""
set text(weight: "bold")
it.prefix()
}
// Calculate relative spacing, to line up fill regardless of page number width
let page-number-spacing = entry-spacing-right - measure(it.page()).width
link(it.element.location(), it.indented(
prefix + h(entry-spacing-left),
it.body()
+ h(entry-spacing-left)
+ box(width: 1fr, it.fill)
+ h(page-number-spacing)
+ it.page(),
))
}
// Remaining outlines are all optional
if figure-index {
outline(title: "List of Figures", target: fig-t(image))
}
if table-index {
outline(title: "List of Tables", target: fig-t(table))
}
if listing-index {
outline(title: "List of Listings", target: fig-t(raw))
}
if definition-index {
outline(title: "List of Definitions", target: fig-t("definition"))
}
}
// List of Abbreviations
if abbreviations != none {
abbreviations-page(abbreviations)
}
// -- Main matter --
// Use main matter stylings
show: main-matter.with(heading-font: heading-font)
// Thesis content
body
// -- Back matter --
// Use back matter stylings
show: back-matter
// Style bibliography
if bibliography != none {
pagebreak()
// show std-bibliography: set text(0.95em)
show std-bibliography: set text(12pt)
// Use default paragraph properties for bibliography.
show std-bibliography: set par(
leading: 0.65em,
justify: false,
linebreaks: auto,
)
bibliography
}
// Display appendix after the bibilography
in-appendix.update(true)
appendix
// Display back page
backpage()
}