-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcv_einstein.sty
250 lines (224 loc) · 9.83 KB
/
cv_einstein.sty
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
\usepackage[T1]{fontenc}
\usepackage{fontawesome}
\setlength{\parindent}{0cm}
\usepackage{paracol}
\usepackage{ifthen}
\usepackage{tikz}
\usepackage{smartdiagram}
\usepackage{float}
\usepackage{array}
\usepackage{multirow}
\usetikzlibrary{decorations.text}
\usetikzlibrary{fadings}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.misc,positioning}
\usetikzlibrary{backgrounds}
\usetikzlibrary{shadings}
\usetikzlibrary{calendar}
\usetikzlibrary{er}
\usetikzlibrary{shapes}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{decorations}
\usetikzlibrary{topaths}
\usepackage{graphicx}
\usepackage{xcolor}
% avoid line overflow
\setlength{\emergencystretch}{2pt}
%---------------------------------------------------------------------------------
\usepackage{titlesec} % Allows creating custom \sections
%-------------------------------------------------------------
% HEADER
%-------------------------------------------------------------
% Usage: \header{1:name}{2:title}{3:summary}{4:portrait.jpg}
% The header will be a TIKZ image. Therefore, it requires a size.
\newlength{\headerheight}
\setlength{\headerheight}{5cm}
% Used to nicely spread the header text along the whole height of the portrait
\newlength{\interline}
\setlength{\interline}{0.08\headerheight} % Adjust this value if your portrait is NOT 4cm high
\newcommand{\header}[4]{
\tikz[remember picture,overlay] {%
% The -1px offset is required for the header to precisely reach the very top of the page.
% It's not always the case and a line of white pixels is sometimes visible,
\node[rectangle, below=-1px of current page.north, anchor=north, minimum width=\paperwidth, minimum height=\headerheight, fill=mediumcolor](header) at (current page.north){};%
\node[right=\leftcolwidth of header.west, anchor=west, text width=0.95\rightcolwidth](name) at (header.west)
{
\color{white}\huge #1\\[\interline]
\color{palecolor}\large #2\\[\interline]
\color{white}\small #3\\
};%
\node[right=0.5\leftcolwidth of header.west, anchor=center, inner sep=0pt, line width=10pt, draw=white](picture) at (header.west) {\includegraphics[height=0.8\headerheight]{#4}};%
}% \tikz
}% \newcommand
%-------------------------------------------------------------
% CONTACT BAND
%-------------------------------------------------------------
% Usage: \contactband{1:background-color}2:{text-color}{3:email}{4:phone-number}{5:country-flag}{6:city}{7:linkedin-id}
% The contact band will be a TIKZ image. Therefore, it requires a size.
\newlength{\contactheight}
\setlength{\contactheight}{0.6cm}
% Space to spread the details evenly along the width of the band
\newlength{\contactspacing}
\setlength{\contactspacing}{1cm}
% --- Dark blue band with picture and name
\newcommand{\contactband}[6]{
\tikz[remember picture,overlay] {%
% -- Black band with contact details
% The -1px offset is required for the header to precisely reach the very top of the page.
\node[rectangle, below=-1px of header.south, anchor=north, minimum width=\paperwidth, minimum height=\contactheight, fill=darkcolor](contact){\color{white} \small
\href{#1}{#1}
\hspace{\contactspacing} #2
\hspace{\contactspacing} {\includegraphics[height=0.24cm]{#3} #4}
\hspace{\contactspacing} \href{https://www.linkedin.com/in/#5}{\faLinkedinSquare /#5}
\hspace{\contactspacing} \href{https://calendly.com/#6}{\faCalendar/#6}
};% \node
}% \tikz
}% \newcommand
%-------------------------------------------------------------
% HEADINGS WITH BACKGROUND
%-------------------------------------------------------------
% Usage: \heading{1:icon}{2:text}
\newcommand{\heading}[2]
{
\colorbox{mediumcolor}{
\color{white}\Large\bfseries\MakeUppercase{#1\phantom{\faWrench}#2}
% AFAICT, \faWrench is the highest icon in the set of \fa icons.
% Using it as a space maker also ensures that all titles have the same (maximum) height
}
\vspace{4pt}
\newline
}
%-------------------------------------------------------------
% GOALS
%-------------------------------------------------------------
% Usage: \goal{1:fa_icon}{2:text}
\newcommand{\goal}[2]{
\begin{tabular}[t]{C{0.7cm} | L{4.5cm}}
\large#1 & #2\\
\end{tabular}
}
%-------------------------------------------------------------
% CV KEYWORDS
%-------------------------------------------------------------
% Usage: \cvkeyword{1:word}
\newcommand{\cvkeyword}[1]{
\colorbox{lightcolor}{\strut\textcolor{white}{#1}}%
}
%-------------------------------------------------------------
% CV TAGS
%-------------------------------------------------------------
% Inspired by alta-cv: https://www.overleaf.com/latex/templates/altacv-template/trgqjpwnmtgv
% Usage: \cvtag{1:word}
\newcommand{\cvtag}[1]{
\tikz[baseline]\node[draw=mediumcolor, fill=white, rounded corners, inner sep=0.3em, minimum height=1.8em]{\color{mediumcolor}#1};
}
%-------------------------------------------------------------
% BUBBLE DIAGRAM
%-------------------------------------------------------------
% Inspired by https://github.com/Johayon/Data-Scientist-Resume-LaTeX
% Usage: \bubblediagram{list of comma-separated text items}
% The first item will be written in the main bubble, at the center of the diagram
% All other items will be written in their own satellite bubble
\newcommand{\bubblediagram}[1]{
\smartdiagram[bubble diagram]{#1}
}
\smartdiagramset{
bubble center node font = \footnotesize,
bubble node font = \footnotesize,
% specifies the minimum size of the bubble center node
bubble center node size = 0.5cm,
% specifies the minimum size of the bubbles
bubble node size = 0.5cm,
% specifies which is the distance among the bubble center node and the other bubbles
distance center/other bubbles = 0.5cm,
% sets the distance from the text to the border of the bubble center node
distance text center bubble = 0.5cm,
% set center bubble color
bubble center node color = mediumcolor,
% define the list of colors usable in the diagram
set color list = {materialcyan, orange, green, materialorange, materialteal, materialamber, materialindigo, materialgreen, materiallime},
% sets the opacity at which the bubbles are shown
bubble fill opacity = 0.55,
% sets the opacity at which the bubble text is shown
bubble text opacity = 1,
border color = white
}
%-------------------------------------------------------------
% DOT SCALES
%-------------------------------------------------------------
\newcommand{\icon}[1]{\phantom{x}{\scriptsize\color{#1}\faCircle}\phantom{x}}
\newcommand{\pictofraction}[1]{%
\pgfmathparse{#1}\foreach \n in {1,...,\pgfmathresult}{\icon{mediumcolor}}%
\pgfmathparse{4-#1}\foreach \n in {0,...,\pgfmathresult}{\icon{palecolor}}%
}
%-------------------------------------------------------------
% CV EVENTS
%-------------------------------------------------------------
% Usage: \cvevent{1:from}{2:to}{3:role}{4:organisation-name}{5:location}{6:organisation-logo}{7:text}
\newlength{\leftcellwidth}
\setlength{\leftcellwidth}{1.9cm}
\newlength{\rightcellwidth}
\setlength{\rightcellwidth}{11.5cm}
\newcommand{\cvevent}[7]{
\begin{tabular}[t]{C{\leftcellwidth}| L{\rightcellwidth}}
#2 & \textbf{#3} \\
#1 & \textsc{#4} $\cdot$ {#5 ~\faMapMarker}\\
% Some work experience have very little text.
% Therefore, we constrain the size of the logo based on its height.
\includegraphics[height=1cm]{#6} & {\color{black!70}\footnotesize{#7}}
\end{tabular}
}
%-------------------------------------------------------------
% CV EVENT FACTS
%-------------------------------------------------------------
% Usage: \fact{1:text}
\newcommand{\fact}[1]{#1\newline}%\vspace{3pt}}
%-------------------------------------------------------------
% ONLINE COURSE
%-------------------------------------------------------------
% Usage: \onlinecourse{1:date}{2:course title}{3:organisation-name}{4:organisation-logo}{5:text}{6:certificates/results}
\newcommand{\onlinecourse}[6]{
\begin{tabular}[t]{C{\leftcellwidth}| L{\rightcellwidth}}
#1 & \textbf{#2} \\
\multirow{3}{*}{\includegraphics[width=1.8cm]{#4}} & \textsc{#3} ~\faLaptop\\
% Most online classes have descriptions spanning multiple lines of text.
% Therefore, we constrain the size of the logo based on its width.
& {\color{black!70}\footnotesize {#5}}\\
& {#6}\\
\end{tabular}
}
%-------------------------------------------------------------
% PUBLICATIONS
%-------------------------------------------------------------
% Usage: \publication{1:date}{2:title}{3:publisher}{4:publisher-logo}{5:text}
\newcommand{\publication}[5]{
\begin{tabular}[t]{C{\leftcellwidth}| L{\rightcellwidth}}
#1 & \textbf{#2} \\
& \textsc{#3 ~\faFileTextO}\\
\includegraphics[height=1cm]{#4} & {\color{black!70}\footnotesize{#5}}
\end{tabular}
}
%-------------------------------------------------------------
% SIMPLE QUOTES
%-------------------------------------------------------------
% Usage: \simplequote{1:text}{2:author}
\newcommand{\simplequote}[2]{
{\color{palecolor}\faQuoteLeft} \textit{#1}\\
\phantom{|}\hspace{0.1\leftcolwidth}{\color{palecolor}\scriptsize -- #2}
}
%-------------------------------------------------------------
% SIMPLE ROW
%-------------------------------------------------------------
% Usage: \simplerow{1:left-cell-text}{2:right-cell-text}
\newcommand{\simplerow}[2]{
\begin{tabular}[t]{R{\leftcellwidth}| L{\rightcellwidth}}
#1 & #2\\
\end{tabular}
}
%-------------------------------------------------------------
% "INFO" ICON WITH LINK
%-------------------------------------------------------------
% Usage: \info{1:uri}
\newcommand{\info}[1]{
\href{#1}{\faInfoCircle}
}