-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcyb-cv.cls
169 lines (143 loc) · 3.99 KB
/
cyb-cv.cls
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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{cyb-cv}[2023/03/23 Styling for my CV]
% \LoadClass[8pt,a4paper]{article}
\LoadClass[a4paper]{article}
%% Colours
%%
\RequirePackage{xcolor}
\definecolor{accentcolor} {HTML} {43069A} % purple | used for highlights / tags
\definecolor{linkcolor} {HTML} {265699} % blue | used for external links
\colorlet{graycolor} {black!65!white}
\colorlet{secondarycolor} {black!70!white!5!accentcolor}
\newcommand{\maincolor} {\color{black}}
\newcommand{\accentcolor} {\color{accentcolor}}
\newcommand{\secondarycolor} {\color{accentcolor}}
\newcommand{\graycolor} {\color{graycolor}}
%% Layout / Geometry
%%
\newlength\margin
\setlength\margin{25mm}
\RequirePackage[
a4paper,
noheadfoot,
nomarginpar,
margin=\margin,
]{geometry}
\setlength{\parindent}{0pt}
\RequirePackage{eqparbox}
%% Titles and Typography
%%
\RequirePackage{fancyhdr}
\RequirePackage{titlesec}
\titleformat{\section}{\bfseries\uppercase}{}{0pt}{}
\titlespacing*{\section}{0pt}{*1.5}{*1}
\titleformat{\subsection}{\normalfont}{}{0pt}{}
\titlespacing*{\subsection}{0pt}{*1.5}{*1}
\renewcommand{\maketitle}{%
\maincolor\Large
\getbypath{basics.name}%
%
\large
\separator%
\secondarycolor%
\getbypath{basics.label}
\maincolor
\medskip
%
\normalsize
}
\RequirePackage[colorlinks]{hyperref}
\AtBeginDocument{
\pagestyle{empty}
\fancyhf{}
\fancyhfoffset{0mm}
\makeatletter
\hypersetup{
pdftitle = {CV --- \getbypath{basics.name}},
pdfauthor = {\getbypath{basics.name}},
pdfsubject = {Curriculum Vitae},
citecolor = {red!40!black}, % citation color
linkcolor = {cyan!40!black}, % internal link color
urlcolor = {linkcolor}, % external link color
}
\makeatother
}
%% Common Elements
%%
\newcommand \separator{%
\textcolor{gray!40!white}{\hspace{.5em}\textbar\hspace{.5em}}%
}
\newenvironment{boldiscolor}[1][accentcolor]{%
\renewcommand{\textbf}[1]{\textcolor{#1}{##1}}%
}
\newcommand\splitbox[3][splitbox]{%
\eqparbox{#1}{#2}
\begin{minipage}[t]{\dimexpr\linewidth-\eqboxwidth{#1}-4pt}{#3}\end{minipage}
}
\newcommand\quotedtext[2][normalsize]{%
\begin{#1}{\textquotedblleft}\end{#1}%
\textit{#2}%
\begin{#1}{\textquotedblright}\end{#1}%
}
\newcommand\sectionwithdatestitleandplace[4]{%
\edef\startYear{\getdate{startDate}{\%Y}}%
\edef\endYear{\getdate{endDate}{\%Y}}%
\edef\title{#2}%
\edef\place{#3}%
%
\filbreak%
\subsection[\startYear—\endYear: \title at \place]{%
\normalsize\textbf{\title}\separator%
\ifhaspath{#1.url}{%
\href{\get{url}}{\place}
}{%
\color{gray}{\place}
}
\hfill
\begin{small}%
\graycolor%
\get{location}
\textls[0]{%
\ifhaspath{#1.startDate}{%
\ifhaspath{#1.endDate}{%
\startYear -- \endYear%
}{%
\startYear%
}%
}{%
\ifhaspath{#1.date}{%
\get{date}%
}{%
\ifhaspath{#1.releaseDate}{%
\get{releaseDate}%
}{}%
}%
}%
}%
\end{small}%
}
\get{summary}
#4
}
\newcommand\highlights[2]{%
\ifhaspath{#1.#2}{%
\small
\begin{singleguillemetlist}
\each{#2}{ \item \current }
\end{singleguillemetlist}
}{%
\vskip 0.5em
}
}
\newcommand\keywords[3][Technologies]{%
\ifhaspath{#2.#3}{%
\small
\splitbox[keywordsname]{#1:~~}{%
\begin{dotspacedlist}%
\each{#3}{ \item\mbox{\footnotesize\textcolor{graycolor}\current}}
\end{dotspacedlist}
}
}{}
}
\RequirePackage{microtype}
% vim: set filetype=tex tabstop=4 softtabstop=4 shiftwidth=4 expandtab :