-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.typ
77 lines (66 loc) · 1.63 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
// Some definitions presupposed by pandoc's typst output.
#let horizontalrule = [
#line(start: (25%,0%), end: (75%,0%))
]
#let endnote(num, contents) = [
#stack(dir: ltr, spacing: 3pt, super[#num], contents)
]
#let conf(
title: none, authors: none, keywords: none, date: datetime.today(),
lang: none, region: "CH", abstract: none, margin: none,
paper: none, font: "Default", fontsize: 1em, sectionnumbering: none,
cols: 1, body
) = {
show heading: set block(above: 0.7em, below: 0.7em)
show link: underline
set heading(outlined: false)
set text(
font: "Default",
size: fontsize
)
if title != none [
#line(length: 100%)
#align(center)[
= #title
#if authors != none [
#pad(
top: 0.5em,
bottom: 0.5em,
x: 2em,
grid(
columns: (1fr,) * calc.min(3, authors.len()),
gutter: 1em,
..authors.map(author => align(center)[
#stack(
dir: ttb,
spacing: 0.5em,
strong(author.name),
if author.affiliation != none [
#emph(author.affiliation)
],
if author.email != none [
#author.email.replace("\@", "@")
]
)
]),
),
)
]
]
#line(length: 100%)
]
if abstract != none [
#abstract
]
set heading(
numbering: sectionnumbering,
outlined: true
)
show heading.where(level: 1): it => [
#pagebreak()
#it
]
counter(heading).update(0)
set outline(indent: true)
body
}