-
Notifications
You must be signed in to change notification settings - Fork 0
/
minimal-cv.cls
128 lines (104 loc) · 3.36 KB
/
minimal-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
\ProvidesClass{minimal-cv}[2022-10-17 Minimal CV Class]
\NeedsTeXFormat{LaTeX2e}
% Base class
% ==========
\LoadClass{article}[a4paper]
\RequirePackage{parskip}
% Don't show links.
\RequirePackage[colorlinks=true,urlcolor=blue]{hyperref}
% Hide page numbers.
\pagenumbering{gobble}
% Colors
% ======
\RequirePackage{color}
\RequirePackage{xcolor}
\definecolor{headerbg}{HTML}{1A1A1A}
\definecolor{headertext}{HTML}{FFFFFF}
\definecolor{sectioncolor}{HTML}{CC5045}
\definecolor{subsectioncolor}{HTML}{444444}
\definecolor{textcolor}{HTML}{222222}
% Fonts
% =====
\RequirePackage{fontspec}
\newfontfamily\emojifont{Symbola}
\newfontfamily\bodyfont[UprightFont=*-Light]{Roboto}
\newfontfamily\firstnamefont[UprightFont=*-Thin]{Roboto}
\newfontfamily\secondnamefont[]{Roboto}
\newfontfamily\headerfont[UprightFont=*-Bold]{Roboto}
\setmainfont[
Ligatures=TeX,
UprightFont=*-Light,
ItalicFont=*-LightItalic,
BoldFont=*-Bold,
BoldItalicFont=*-BoldItalic
]{Roboto}
% Geometry
% ========
\RequirePackage[top=1.5cm,right=2cm,bottom=2cm,left=2cm]{geometry}
% Header Box
% ==========
\RequirePackage{tikz}
\newcommand{\header}[2]{
\begin{tikzpicture}[remember picture,overlay]
\node [rectangle, left color=headerbg, right color=headerbg!70!white, anchor=north, minimum height=2cm, text width=\paperwidth, align=right] (box) at (current page.north){
\fontsize{40pt}{80pt}\textcolor{headertext}{\hfill\firstnamefont{#1}\secondnamefont{#2}\hspace{1cm}}
};
\end{tikzpicture}
}
% Section Formatting
% ==================
\RequirePackage{titlesec}
\RequirePackage{textpos}
\titleformat{\section}{\bfseries\Large\color{sectioncolor}}{}{0em}{}[{\titlerule[0.4pt]}]
\titleformat{\subsection}{\bfseries\color{subsectioncolor}}{}{0em}{}
% sectionicon command can be used to add an icon to the right side of the
% section title.
\newcommand{\sectionicon}[1]{
\begin{textblock*}{\textwidth}(0pt, -28pt)
{\Large\color{sectioncolor}\hfill#1}
\end{textblock*}
}
\newcommand{\person} {{\emojifont 🗣️}}
\newcommand{\hammer} {{\emojifont 🔨}}
\newcommand{\laptop} {{\emojifont 💻}}
\newcommand{\mortarboard} {{\emojifont 🎓}}
\newcommand{\info}{{\emojifont ℹ️}}
\newcommand{\phone}{{\emojifont 📞}}
% Compact Lists
% =============
\RequirePackage{enumitem}
\setlist[itemize]{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
% Core Skills
% ===========
\newenvironment{coreskillslist}[2][\textwidth]
{\begin{minipage}[t]{#1}\subsection{#2}\begin{itemize}[leftmargin=12pt]}
{\end{itemize}\end{minipage}}
% Tables
% ======
\RequirePackage{array}
\RequirePackage{tabularx}
% Column types for timelines.
\newcolumntype{f}{>{\hsize=22pt \centering\arraybackslash}X}
\newcolumntype{h}{>{\hsize=7pt \centering\arraybackslash}X}
\newcolumntype{t}{>{\hsize=22pt \centering\arraybackslash}X}
\newcolumntype{v}{>{\raggedright\arraybackslash}X}
% Education
% =========
% tabularx "environments" don't work inside custom environments, so use the
% command form (\tabularx, \endtabularx) which is compatible.
\newenvironment{education}{
\tabularx{\textwidth}{f h t | v}
}{\endtabularx}
\newcommand{\school}[4]{
#1 & -- & #2 & {\bfseries\textcolor{subsectioncolor}{#3}}
#4\newline\\
}
\newcommand{\qualification}[1]{
\textit{#1}
}
% Employment History
% ==================
\newenvironment{employment}
{\tabularx{\textwidth}{{f h t | v}}}
{\endtabularx}
\newcommand{\job}[4]{#1 & -- & #2 & \textit{#3}#4\\}