-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.cls
133 lines (114 loc) · 4.1 KB
/
style.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
% Visual theme inspired by https://github.com/posquit0/Awesome-CV
% Nikolay Dubina <nikolay.dubina.pub@gmail.com>
% LPPL v1.3c (http://www.latex-project.org/lppl)
% Identification
\ProvidesClass{style}[2019/05/12 style]
\NeedsTeXFormat{LaTeX2e}
\LoadClass[11pt, a4paper]{article}
\RequirePackage{array}
\RequirePackage{enumitem}
\RequirePackage{geometry}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\RequirePackage{xifthen}
\RequirePackage[quiet]{fontspec}
\RequirePackage{unicode-math}
\RequirePackage{fontawesome}
\RequirePackage{parskip}
\RequirePackage[default,opentype]{sourcesanspro}
\RequirePackage{hyperref}
\hypersetup{colorlinks=false,linkbordercolor=blue}
% Layout
\geometry{left=1.4cm, top=.8cm, right=1.4cm, bottom=1.8cm, footskip=.5cm}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot{}
\fancyfoot[L]{\footerstyle{\today}}
\fancyfoot[R]{\footerstyle{\thepage}}
% Fonts
\defaultfontfeatures{Ligatures=TeX}
\newfontfamily\FA[Path=fonts/]{FontAwesome}
\newfontfamily\headerfont[
Path=fonts/,
UprightFont=*-Regular,
ItalicFont=*-Italic,
BoldFont=*-Bold,
BoldItalicFont=*-BoldItalic,
]{Roboto}
\newfontfamily\headerfontlight[
Path=fonts/,
UprightFont=*-Thin,
ItalicFont=*-ThinItalic,
BoldFont=*-Medium,
BoldItalicFont=*-MediumItalic,
]{Roboto}
\newcommand{\bodyfont}{\sourcesanspro}
\newcommand{\bodyfontlight}{\sourcesansprolight}
% Colors
\definecolor{darktext}{HTML}{414141}
\definecolor{text}{HTML}{333333}
\definecolor{ligthtext}{HTML}{5D5D5D}
\newcommand{\headernamestyle}[2]{
{\fontsize{32pt}{1em}\headerfontlight\color{ligthtext} #1\space{}}%
{\fontsize{32pt}{1em}\headerfont\bfseries\color{text} #2}
}
\newcommand{\headersocialstyle}[1]{{\fontsize{8pt}{1em}\headerfont\color{text} #1}}
\newcommand{\footerstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\color{ligthtext} #1}}
\newcommand{\sectionstyle}[1]{{\fontsize{16pt}{1em}\bodyfont\bfseries\color{text}#1}}
\newcommand{\entrytitlestyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand{\entrysubtitlestyle}[1]{{\fontsize{8pt}{1em}\bodyfont\scshape\color{ligthtext} #1}}
\newcommand{\entryinfostyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\slshape\color{ligthtext} #1}}
\newcommand{\descriptionstyle}[1]{{\fontsize{8pt}{1em}\bodyfontlight\upshape\color{text} #1}}
\newcommand{\hgroupstyle}[1]{{\fontsize{10pt}{1em}\bodyfont\bfseries\color{darktext} #1}}
\newcommand{\publicationsourcestyle}[2]{
{\fontsize{10pt}{1em}\bodyfont\bfseries\color{text} #1}%
{\fontsize{10pt}{1em}\bodyfont\color{darktext} #2}
}
% Components
\newcommand{\cvsection}[1]{
\vspace{1mm}
\sectionstyle{#1}
\color{ligthtext}\leavevmode\leaders\hrule\hfill
\vspace{1mm}
}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcommand{\hgroup}[2]{\hgroupstyle{#1} & \descriptionstyle{#2} \\}
\newenvironment{hgroups}{
\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} r L{\textwidth - 2.5cm}}
}{\end{tabular*}}
\newcommand{\cventry}[5]{
\setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 5.5cm} r}
\entrytitlestyle{#2} & \entryinfostyle{#3} \\
\entrysubtitlestyle{#1} & \entryinfostyle{#4} \\
\multicolumn{2}{L{\textwidth}}{\descriptionstyle{#5}}
\end{tabular*}%
}
\newcommand{\cventryoneline}[2]{
\setlength\tabcolsep{0pt}
\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} L{\textwidth - 5.5cm} r}
\descriptionstyle{#1} & \entryinfostyle{#2} \\
\end{tabular*}%
}
\newenvironment{cvitems}{
\vspace{-4.0mm}
\begin{itemize}[leftmargin=2ex, nosep, noitemsep]
\renewcommand{\labelitemi}{\bullet}
}{
\end{itemize}
\vspace{-4.0mm}
}
\newcommand{\publication}[5]{
\setlength{\extrarowheight}{0pt}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} p{1.5cm} p{\textwidth - 7cm} >{\raggedleft\arraybackslash}p{5cm}}
\publicationsourcestyle{#1}{#2}
& {
\entrytitlestyle{#3}
\newline \descriptionstyle{#4}
}
& \descriptionstyle{#5}
\end{tabular*}%
}