forked from v411e/optimal-ovgu-thesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.typ
89 lines (75 loc) · 2.07 KB
/
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
#import "components.typ": body-font, sans-font, small-heading, number-until-with, variable-pagebreak, author-fullname
#import "titlepage.typ": oot-titlepage
#import "acknowledgement.typ": oot-acknowledgement
#import "abstract.typ": oot-abstract
#import "disclaimer.typ": oot-disclaimer
#import "expose.typ": oot-expose
#let optimal-ovgu-thesis(
title: "",
author: none,
lang: "en",
is-doublesided: none,
body,
) = {
set document(title: title, author: author-fullname(author))
set page(
margin: (left: 30mm, right: 30mm, top: 27mm, bottom: 27mm),
numbering: "1",
number-align: center,
)
set text(
font: body-font,
size: 11pt,
lang: lang
)
show math.equation: set text(weight: 400)
show figure.caption: emph
show figure.where(
kind: table
): set figure.caption(position: top)
show figure.where(
kind: raw
): set figure.caption(position: top)
set table(
stroke: gray
)
show heading: set text(font: sans-font)
show heading.where(level: 1): h => [
#variable-pagebreak(is-doublesided)
#h
]
// Apply custom numbering to headings
set heading(numbering: number-until-with(3, "1.1"))
// Make nested headings apply small-heading style
show heading.where(level: 4) : small-heading()
show heading.where(level: 5) : small-heading()
show heading.where(level: 6) : small-heading()
show heading.where(level: 7) : small-heading()
show par: set block(spacing: 1em)
set par(
justify: true,
leading: 1em, // Set the space between lines in text
first-line-indent: 1em
)
show raw.where(block: true): it => align(start, block(
fill: luma(250),
stroke: 0.6pt + luma(200),
inset: 8pt,
radius: 3pt,
width: 100%,
it
))
show raw.where(block: true): set text(size: 8pt)
show raw.where(block: true): set par(leading: 0.6em)
// Table of contents
set outline(indent: 2em)
show outline: outline => [
#show heading: heading => [
#text(font: body-font, 1.5em, weight: 700, heading.body)
#v(15mm)
]
#outline
#variable-pagebreak(is-doublesided)
]
body
}