Files
varys-thesis/template.typ

115 lines
2.1 KiB
Typst

// The project function defines how your document looks.
// It takes your content and some metadata and formats it.
// Go ahead and customize it to your liking!
#let project(
title: "",
acknowledgement: [],
abstract: [],
authors: (),
examiner: (),
group: none,
date: none,
logo: none,
body,
) = {
// Set the document's basic properties.
set document(author: authors.map(a => a.name), title: title)
set page(
numbering: "1",
number-align: end,
margin: (
x: 3.5cm,
),
)
set text(font: "Linux Libertine", size: 10pt, lang: "en")
// Set paragraph spacing.
show par: set block(above: 1.2em, below: 1.2em)
set heading(numbering: "1.1.")
set figure(gap: 1em)
set table(align: left)
set par(leading: 0.75em)
// Title page.
// The page can contain a logo if you pass one with `logo: "logo.png"`.
v(0.6fr)
if logo != none {
align(left, image(logo, width: 26%))
}
v(9.6fr)
align(center)[
#text(1.1em, date)
#v(1.8em, weak: true)
#text(2em, weight: 700, title)
#v(1.8em, weak: true)
#text(1.1em, "Master Thesis")
// Author information.
#pad(
top: 6em,
grid(
columns: (1fr,) * calc.min(3, authors.len()),
gutter: 1em,
..authors.map(author => [
*#author.name* \
#author.email
]),
),
)
]
// Faculty information.
align(right, pad(
top: 20em,
bottom: 4em,
[
#examiner.role \
*#examiner.name* \
#v(1.6em, weak: true)
#group.faculty \
#group.department \
#group.name \
#link(group.url)
],
))
// v(2.4fr)
pagebreak()
// Acknowledgement page.
v(1fr)
align(center)[
#heading(
outlined: false,
numbering: none,
text(0.85em, smallcaps[Acknowledgements]),
)
#acknowledgement
]
v(1.618fr)
pagebreak()
// Abstract page.
v(1fr)
align(center)[
#heading(
outlined: false,
numbering: none,
text(0.85em, smallcaps[Abstract]),
)
#abstract
]
v(1.618fr)
pagebreak()
// Main body.
set par(justify: true)
body
}