-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.typ
47 lines (42 loc) · 1.09 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
// 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: "",
authors: (),
date: none,
font: "linux libertine",
monofont: "Courier",
body
) = {
set document(author: authors.map(a => a.name), title: title)
set page(margin: 1in, numbering: "1", number-align: center)
set heading(numbering: "1.1")
set text(font: font, lang: "en")
show raw: set text(font: monofont)
show par: set block(spacing: 0.55em)
show heading: set block(above: 1.4em, below: 1em)
// Title row.
align(center)[#text(1.75em, title)]
// Author information.
pad(
top: 0.5em,
x: 2em,
grid(
columns: (1fr,) * calc.min(3, authors.len()),
gutter: 1em,
..authors.map(author => align(center)[
#text(1em, author.name)
#v(0.5em, weak: true)
#text(1.2em, raw(author.email))
]),
),
)
// Date.
align(center)[
#text(0.9em, date)
]
// Main body.
set par(leading: 0.55em, first-line-indent: 1.8em, justify: true)
body
}