generated from matchy233/typst-chi-cv-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchicv.typ
154 lines (133 loc) · 2.27 KB
/
chicv.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
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
#import "fontawesome.typ": *
#let chiline() = {
v(-3pt);
line(length: 100%, stroke: gray);
v(-10pt)
}
#let iconlink(
uri, text: "", icon: link-icon) = {
link(uri)[#fa[#icon] #text]
}
// cventry, position line and multicventry
#let cventry(
tl: lorem(2),
tr: "",
bl: "",
br: "",
content
) = {
block(
inset: (left: 0pt),
strong(tl) + h(1fr) + tr +
linebreak() +
if bl != "" or br != "" {
bl + h(1fr) + br + linebreak()
} +
content
)
}
#let positionline(
tl: lorem(2),
tr: "2333/23 - 2333/23"
) = {
strong(tl) + h(1fr) + tr + linebreak()
}
#let multicventry(
experiences,
content
) = {
block(
inset: (left: 0pt),
experiences +
if content != "" {
content
}
)
}
// honor, honorline and multihonor
#let honor(
tl: lorem(2),
tc: "Institution",
tr: "2333/23 - 2333/23",
extra: "",
content
) = {
block(
inset: (left: 9pt),
tl + h(1fr) + tc + h(1fr)+ tr +
linebreak() +
if extra != "" {
extra + linebreak()
}+
if content != "" {
h(9pt)+(text(9pt,blue,content))
}
)
}
#let honorline(
tl: lorem(2),
tc: "",
tr: ""
) = {
tl + h(1fr) + tc + h(1fr) + tr +linebreak()
}
#let multihonor(
honors,
explanation
) = {
block(
inset: (left: 9pt),
honors +
if explanation != ""{
h(9pt)+(text(9pt,blue,explanation))
}
)
}
// grade function for listed gpa
#let grade(
tl: lorem(2),
tc: "",
tr: "",
content
) = {
block(
inset: (left: 0pt),
strong(tl) + h(1fr) + text(style: "italic",box[GPA: #tc]) + h(1fr)+ tr +
if content != "" {
h(9pt)+(text(9pt,content))
}
)
}
#let chicv(body) = {
set par(justify: true)
show heading.where(
level: 1
): set text(
size: 22pt,
font: (
"Avenir Next LT Pro", // original chi-cv font
"Manrope", // a font available in the typst environment and looks similar to Avenir
),
weight: "light",
)
show heading.where(
level: 2
): it => text(
size: 12pt,
font: (
"Avenir Next LT Pro",
"Manrope",
),
weight: "light",
block(
chiline() + it,
)
)
set list(indent: 0pt)
show link: it => underline(offset: 2pt, it)
set page(
margin: (x: 0.9cm, y: 1.3cm),
)
set par(justify: true)
body
}