-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcv.template.typ
More file actions
119 lines (104 loc) · 2.87 KB
/
cv.template.typ
File metadata and controls
119 lines (104 loc) · 2.87 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
// CV Pandoc Template for Typst — Adam Altmejd
// --- Fonts ---
#let serif = "EB Garamond"
#let sans = "Lato"
#let mono = "JetBrains Mono"
// --- Page setup ---
#set page(
paper: "a4",
margin: (left: 30mm, right: 25mm, top: 18mm, bottom: 23mm),
footer: context {
let pg = counter(page).get().first()
$if(git-date)$
if pg == 1 {
align(center, text(font: mono, size: 0.7em, "Last updated: $git-date$"))
} else {
align(right, str(pg))
}
$else$
if pg > 1 {
align(right, str(pg))
}
$endif$
},
)
#set text(
font: serif,
size: 11pt,
)
// --- Paragraph ---
#set par(
justify: false,
leading: 0.55em,
spacing: 8pt,
)
// --- Links ---
#show link: set text(fill: black)
// --- Headings ---
// Rule is an inline box so its bottom edge sits on the text baseline, matching LaTeX \rule[0pt]
#show heading.where(level: 1): it => {
v(10pt)
// Code mode avoids markup newlines inserting word spaces between inline elements
block(below: 8pt, {
h(-18mm)
box(width: 16mm, height: 1mm, fill: black)
h(2mm)
text(font: sans, weight: 300, size: 14.4pt, it.body)
})
}
#show heading.where(level: 2): it => block(above: 8pt, below: 6pt,
text(font: sans, weight: 300, size: 12pt, it.body)
)
#show heading.where(level: 3): it => {
text(font: sans, weight: 300, it.body)
}
// --- Description/term lists (year | description layout) ---
#show terms.item: it => {
block(above: 5.5pt, below: 0pt)[
#place(left, dx: -28mm,
box(width: 26mm,
align(right, text(font: sans, size: 0.8em, it.term))
)
)
#it.description
]
}
// --- Monospace ---
#show raw: set text(font: mono, size: 0.8em)
// --- Font Awesome 5 icons ---
#let fa-icon(codepoint) = {
text(font: "Font Awesome 5 Free Solid", codepoint)
}
#let fa-brand(codepoint) = {
text(font: "Font Awesome 5 Brands", codepoint)
}
#let fa-phone = fa-icon("\u{f095}")
#let fa-envelope = fa-icon("\u{f0e0}")
#let fa-globe = fa-icon("\u{f0ac}")
#let fa-twitter = fa-brand("\u{f099}")
// ==========================================================
// HEADER
// ==========================================================
#grid(
columns: (1.8fr, 1.6fr, 1.4fr),
align(left + bottom)[
#text(font: sans, weight: 700, size: 24pt)[$author$]\
#text(font: sans, weight: 300, size: 19pt)[$title$]
],
align(right + bottom, text(font: sans, size: 9pt)[
#link("$address.online$")[$address.affiliation$]\
$address.main$\
$address.city$
]),
align(right + bottom, text(font: sans, size: 9pt)[
$mobile$ #h(2pt) #fa-phone\
#link("mailto:$email$")[$email$] #h(2pt) #fa-envelope\
#link("https://$homepage$")[$homepage$] #h(2pt) #fa-globe\
#link("https://twitter.com/$twitter$")[\@$twitter$] #h(2pt) #fa-twitter
]),
)
#v(8pt)
// ==========================================================
// BODY
// ==========================================================
$body$