-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.typ
More file actions
251 lines (226 loc) · 5.15 KB
/
Copy pathutils.typ
File metadata and controls
251 lines (226 loc) · 5.15 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
#import "@preview/scienceicons:0.1.0": orcid-icon
#let resume(
author: "",
author-position: left,
personal-info-position: left,
pronouns: "",
location: "",
email: "",
github: "",
linkedin: "",
phone: "",
personal-site: "",
orcid: "",
accent-color: "#000000",
font: "New Computer Modern",
paper: "us-letter",
author-font-size: 20pt,
font-size: 10pt,
lang: "en",
body,
) = {
// Sets document metadata
set document(author: author, title: author)
// Document-wide formatting, including font and margins
set text(
// LaTeX style font
font: font,
size: font-size,
lang: lang,
// Disable ligatures so ATS systems do not get confused when parsing fonts.
ligatures: false
)
// Reccomended to have 0.5in margin on all sides
set page(
margin: (0.5in),
paper: paper,
)
// Link styles
show link: underline
// Small caps for section titles
show heading.where(level: 2): it => [
#pad(top: 0pt, bottom: -10pt, [#smallcaps(it.body)])
#line(length: 100%, stroke: 1pt)
]
// Accent Color Styling
show heading: set text(
fill: rgb(accent-color),
)
show link: set text(
fill: rgb(accent-color),
)
// Name will be aligned left, bold and big
show heading.where(level: 1): it => [
#set align(author-position)
#set text(
weight: 700,
size: author-font-size,
)
#pad(it.body)
]
// Personal Info Helper
let contact-item(value, prefix: "", link-type: "") = {
if value != "" {
if link-type != "" {
link(link-type + value)[#(prefix + value)]
} else {
value
}
}
}
// Level 1 Heading
grid(
columns: (auto, 1fr),
align: (left, right),
[= #(author)],
[#contact-item(location) \
Phone: #contact-item(phone)],
)
// Personal Info
pad(
top: -0.15em,
align(personal-info-position)[
#{
let items = (
contact-item(pronouns),
contact-item(email, link-type: "mailto:"),
contact-item(github, link-type: "https://"),
contact-item(linkedin, link-type: "https://"),
contact-item(personal-site, link-type: "https://"),
contact-item(orcid, prefix: [#orcid-icon(color: rgb("#AECD54"))orcid.org/], link-type: "https://orcid.org/"),
)
items.filter(x => x != none).join(" | ")
}
],
)
// Main body.
set par(justify: true)
body
}
// Generic two by two component for resume
#let generic-two-by-two(
top-left: "",
top-right: "",
bottom-left: "",
bottom-right: "",
) = [
#top-left #h(1fr) #top-right #v(-6pt)
#grid(columns: (1fr, auto), column-gutter: 1em, bottom-left, align(right)[#bottom-right])
// #bottom-left #h(1fr) #bottom-right
]
// Generic one by two component for resume
#let generic-one-by-two(
left: "",
right: "",
) = [
#left #h(1fr) #right
]
// Cannot just use normal --- ligature becuase ligatures are disabled for good reasons
#let dates-helper(
start-date: "",
end-date: "",
) = {
start-date + " " + $dash.em$ + " " + end-date
}
// Section components below
#let edu(
institution: "",
dates: "",
degree: "",
gpa: "",
location: "",
// Makes dates on upper right like rest of components
consistent: false,
) = {
if consistent {
// edu-constant style (dates top-right, location bottom-right)
generic-two-by-two(
top-left: strong(institution),
top-right: dates,
bottom-left: emph(degree),
bottom-right: emph(location),
)
} else {
// original edu style (location top-right, dates bottom-right)
generic-two-by-two(
top-left: strong(institution),
top-right: location,
bottom-left: emph(degree),
bottom-right: emph(dates),
)
}
}
#let work(
title: "",
dates: "",
company: "",
location: "",
) = {
generic-two-by-two(
top-left: strong(title),
top-right: dates,
bottom-left: company,
bottom-right: emph(location),
)
}
#let project(
role: "",
name: "",
url: (),
dates: "",
tech: (),
desc: ""
) = {
if url == () {
panic("URL not provided. Please include a URL before proceeding in the format ('Project', '<url>').")
}
generic-two-by-two(
top-left: {
let entries = url.pairs()
let last = entries.len() - 1
if role == "" {
[*#name*
(#for (idx, (key, value)) in entries.enumerate() {
link("https://" + value)[#key]
if idx != last {", "}
})]
} else {
[*#role*, #name #if url != "" and dates != "" [
(#for (idx, (key, value)) in entries.enumerate() {
link("https://" + value)[#key]
if idx != last {", "}
})
]]
}
},
top-right: [*Tech:* #tech.join(", ")],
bottom-left: desc,
bottom-right: {
if dates == "" and url != "" {
[#link("https://" + url)[#url]]
} else [
#dates
]
},
)
}
#let certificates(
name: "",
issuer: "",
url: "",
date: "",
) = [
#if url != "" {
[#link("https://" + url)[*#name*]]
} else [*#name*] - #issuer
#h(1fr) #date
]
#let extracurriculars(
activity: "",
dates: "",
) = {
generic-one-by-two(
left: strong(activity),
right: dates,
)
}