-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhipstercv.sty
279 lines (211 loc) · 11.1 KB
/
hipstercv.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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
\usepackage{fontawesome}
\usepackage{hyperref}
\setlength{\parindent}{0cm}
\usepackage{paracol}
\usepackage{ifthen}
\usepackage{beuron}
\usepackage{LobsterTwo}%if not suposed to be main font, load other main font after this
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{smartdiagram}
\usepackage{float}
\usepackage{array}
%\setlength\extrarowheight{1.5em} % adds some spacing between the lines of the CV's tabulars
% not used here as not to interfer with other tables
\usetikzlibrary{decorations.text}
\usetikzlibrary{fadings}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.misc,positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{backgrounds}
\usetikzlibrary{shadings}
\usetikzlibrary{calendar}
\usetikzlibrary{er}
\usetikzlibrary{patterns} % horizontal lines, vertical lines, north east lines, north west lines, grid, crosshatch, dots, crosshatch dots, fivepointed stars, sixpointed stars, bricks
\usetikzlibrary{shapes}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{decorations}
\usetikzlibrary{topaths}
\usepackage{graphicx}
%\usepackage[usenames, dvipsnames]{color}
% https://de.sharelatex.com/learn/Using_colours_in_LaTeX#!#Reference_guide z.B. \color{RubineRed}
%\usepackage{xcolor}
%-------------------------------
\newcommand{\lorem}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.} % Dummy text
% avoid line overflow
\setlength{\emergencystretch}{2pt}
%---------------------------------------------------------------------------------
\usepackage{titlesec} % Allows creating custom \sections
% Format of the section titles
\titleformat{\section}{
\scshape\Large\raggedright}{}{0em}{}[\titlerule] % smallcaps, Large, continuous line - looks better if two columns, might look a bit too dramatic if just one ;)
\titlespacing{\section}{0pt}{12pt}{5pt} % Spacing around titles {<left spacing>}{<before spacing>}{<after spacing>}
%----------------------------------------------------
\newcommand{\cvkeyword}[3]{
\colorbox{#2}{\textcolor{#3}{#1}} \phantom{}%
}
%------------------------
\newcommand{\cvtag}[1]{% from alta-cv: https://www.overleaf.com/latex/templates/altacv-template/trgqjpwnmtgv
\tikz[baseline]\node[draw=black!40,rounded corners,inner sep=0.4em]{\color{black!50}#1};
}
%------------------- ICON Cross
\newcommand{\iconcross}[7]{%
\begin{tikzpicture}%
\draw[ultra thick,draw=#2] (-2,-2) -- (2,2);%
\draw[ultra thick, draw=#2] (-2,2) -- (2,-2);%
\node[above=0.5em,text=#3] at (0,1) {#1 #4};%
\node[below=0.5em,text=#3] at (0,-1) {#1 #5};%
\node[right=0.5em,text=#3] at (1,0) {#1 #6};%
\node[left=0.5em,text=#3] at (-1,0) {#1 #7};%
\end{tikzpicture}%
}
\usepackage{smartdiagram}
%-----------------------------------------------------
% set smartdiagram colours, from: https://github.com/Johayon/Data-Scientist-Resume-LaTeX/blob/master/twentysecondcv.cls
%-------------------------------------------------------
\smartdiagramset{
bubble center node font = \footnotesize,
bubble node font = \footnotesize,
% specifies the minimum size of the bubble center node
bubble center node size = 0.3cm,
% specifies the minimum size of the bubbles
bubble node size = 0.3cm,
% specifies which is the distance among the bubble center node and the other bubbles
distance center/other bubbles = 0.3cm,
% sets the distance from the text to the border of the bubble center node
distance text center bubble = 0.4cm,
% set center bubble color
bubble center node color = pblue,
% 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.6,
% sets the opacity at which the bubble text is shown
bubble text opacity = 1,
description title text width=0.5cm,
description title width=0.5cm,
description width=5cm,
description text width=5cm,
descriptive items y sep =1.25,
back arrow distance = 0,
back arrow disabled = true,
border color = white
}
%-------------------------------
%--------------------------------------------------- pictures
\newcommand{\roundpic}[1]{\begin{figure}[H]\tikz \draw [path picture={ \node at (path picture bounding box.center){\includegraphics[height=4.3cm]{#1}} ;}] (0,2) circle (2) ;\end{figure}}
\newcommand{\squarepic}[1]{\begin{figure}[H]\tikz \draw [path picture={ \node at (path picture bounding box.center){\includegraphics[height=4cm]{#1}} ;}] (0,0) - - (-2,2) - - (0,4) - - (2,2) - - cycle ;\end{figure}}
%------------------------------------ pictoFraction
\newcommand{\icon}[3]{\phantom{x}{#3\color{#2}#1}\phantom{x}}
%------------------- pictogram Fraction: pictoFraction
\newcommand{\pictofraction}[6]{%
\pgfmathparse{#3 - 1}\foreach \n in {0,...,\pgfmathresult}{\icon{#1}{#2}{#6}}%
\pgfmathparse{#5 - 1}\foreach \n in {0,...,\pgfmathresult}{\icon{#1}{#4}{#6}}%
}
%----------------------------------------------------- font highlighting / boxes with background color
\newcommand{\bg}[3]{\colorbox{#1}{\bfseries\color{#2}#3}}
\newcommand{\bgupper}[3]{\colorbox{#1}{\color{#2}\huge\bfseries\MakeUppercase{#3}}}
%------------------------- Bubble Diagram
\newcommand{\bubblediagram}[1]{\smartdiagram[bubble diagram]{#1}}
\newcommand{\skillbubble}[2]{%
\begin{tikzpicture}%
\draw[draw=none,fill=#1] (0,0) circle (0.#2);%
\end{tikzpicture}%
}
\newcommand{\hobbyicon}[5]{%
\begin{tikzpicture}%
\draw[draw=none,fill=#3] (0,0) circle (0.5);%
\node[](icon) at (0,0) {#4#1};%
\node[below=#5,align=center] at (icon) {#2};%
\end{tikzpicture}
}
%-------------------------------------------- rules / separators
\newcommand{\dashrule}[2]{\begin{figure}[H]\begin{minipage}[t]{#1\textwidth}\tikz \draw[loosely dashed,#2] (0pt,0pt) -- (\textwidth,0pt);\end{minipage}\end{figure}}
\newcommand{\dotrule}[2]{\begin{figure}[H]\begin{minipage}[t]{#1\textwidth}\tikz \draw[loosely dotted, ultra thick,#2] (0,0) -- (\textwidth,0);\end{minipage}\end{figure}}
%-------------------------------------------------------
%---------------------------------------------------------
\newcommand{\barrule}[3]{\hspace{0.5em}
{\color{#3}\rule[\baselineskip]{#1\textwidth}{#2}}\vspace{0.5em}
}
\newcommand{\cvevent}[6]{{#1} & \textbf{#2}\newline\textsc{#3} $\cdot$ {#4 ~\faMapMarker}\newline{\color{black!70}\footnotesize #5}\vspace{1.5em} & \raisebox{-0.7\height}{\includegraphics[height=1cm]{#6}}}
\newcommand{\cvdegree}[6]{{#1} & \textbf{#2}\newline\textsc{#3} $\cdot$ {#4 {\phantom{i}\footnotesize ~\faUniversity}}\newline{\color{black!70}\scriptsize #5}\vspace{0.5em} & \raisebox{-0.7\height}{\includegraphics[height=0.5cm]{#6}}}
% -------------------------------------------------------------------------------------------
% inspired by: https://www.sharelatex.com/templates/cv-or-resume/fancy-cv
\newcommand{\header}[7]{
\tikz[remember picture,overlay] {%
\node[rectangle, fill=#5, anchor=north, minimum width=\paperwidth, minimum height=5cm](header) at (current page.north){};%
\node[left=#7 of header.north, anchor=east](name) at (header.east) {\fontfamily{\sfdefault}\selectfont #2};%
\node[anchor=south east](degree) at (name.north east) {\fontfamily{\sfdefault}\selectfont #1};%
\node[anchor=north east](descr) at (name.south east) {\fontfamily{\sfdefault}\selectfont #3};%
\node[right=#6 of header.west, anchor=west](picture) at (header.west) {};%
\draw[path picture={\node[anchor=center] at (path picture bounding box.center){\includegraphics[height=4.3cm]{#4}} ;}] (picture) circle (2) ;}%
\vspace{1.5cm}%
}
%--------------------------------------------------------------------------
\newenvironment{timeline}[4]{
%\pgfmathparse{\start - \end}\foreach \n in {0,...,\pgfmathresult}{\pgfmathresult~}%
\pgfmathtruncatemacro\total{#1 - #2} % calculate total years between start and end
\pgfmathtruncatemacro\scalefactor{\total/#3} % get the scale factor for the actual length
\pgfmathsetmacro{\startyear}{#1}
%
\newcommand{\event}[5]{%
\pgfmathsetmacro{\currentyear}{##1}
\pgfmathsetmacro{\yearrelative}{\startyear - \currentyear}
\pgfmathsetmacro{\var}{#1}
\pgfmathparse{ifthenelse(\yearrelative<=0,-\yearrelative,-\yearrelative)}
\let\yearrel\pgfmathresult%
\pgfmathtruncatemacro\eventposition{\yearrel/\scalefactor}% get the event position
%\node[] at (0,\eventposition) {\eventposition};
\draw[draw=black, line width=0.2em,anchor=west] (0,\eventposition) -- (##5,\eventposition);% line
\node[fill=##2,right,inner sep=0.5em, align=left] at (##5,\eventposition) {\textbf{##3}~~##4};% textbox
\node[left, inner sep=1.5em] at (0,\eventposition) {##1};%draw year left
\draw[fill=white,draw=black, line width=0.1em] (0,\eventposition) circle (0.1);%year circle
} % startpunkt #1. Farbe #2, Detaildatum #3, Beschreibung #4, Entfernung von Timeline #5
%
%
\begin{tikzpicture}%
\draw[draw=black,line width=0.4em] (0,0) -- (0,-#3);%the timeline
\filldraw[fill=white!100,draw=#4,line width=0.5em] (0,0) node[draw=none]{\textbf{\large \color{#4} #1}} circle (0.75);%start year
\filldraw[fill=white,line width=0.5em,draw=#4](0,-#3) node[draw=none]{\textbf{\large\color{#4} #2}} circle (0.75);%end year
}{%
\end{tikzpicture}%
}
%----------------------------------------------------------------------------------------
\newenvironment{timelinehorizontal}[4]{
%\pgfmathparse{\start - \end}\foreach \n in {0,...,\pgfmathresult}{\pgfmathresult~}%
\pgfmathtruncatemacro\total{#1 - #2} % calculate total years between start and end
\pgfmathtruncatemacro\scalefactor{\total/#3} % get the scale factor for the actual length
\pgfmathsetmacro{\startyear}{#1}
%
\newcommand{\event}[6]{%
\pgfmathsetmacro{\currentyear}{##1}
\pgfmathsetmacro{\yearrelative}{\startyear - \currentyear}
\pgfmathsetmacro{\var}{#1}
\pgfmathparse{ifthenelse(\yearrelative<=0,-\yearrelative,-\yearrelative)}
\let\yearrel\pgfmathresult%
\pgfmathtruncatemacro\eventposition{\yearrel/\scalefactor}% get the event position
%\node[] at (0,\eventposition) {\eventposition};
\draw[draw=black, line width=0.2em,anchor=west] (\eventposition,0) -- (\eventposition+##6,##5);% line
\node[fill=##2,right=-0.1em,inner sep=0.5em] at (\eventposition+##6,##5) {\textbf{##3}~~##4};% textbox
\node[below, inner sep=1.5em] at (\eventposition,0) {##1};%draw year left
\draw[fill=white,draw=black, line width=0.1em] (\eventposition,0) circle (0.1);%year circle
} % startpunkt #1. Farbe #2, Detaildatum #3, Beschreibung #4, Entfernung von Timeline #5
%
%
\begin{tikzpicture}%
\draw[draw=black,line width=0.4em] (0,0) -- (-#3,0);%the timeline
\filldraw[fill=white!100,draw=#4,line width=0.5em] (0,0) node[draw=none]{\textbf{\large \color{#4} #1}} circle (0.75);%start year
\filldraw[fill=white,line width=0.5em,draw=#4](-#3,0) node[draw=none]{\textbf{\large\color{#4} #2}} circle (0.75);%end year
}{%
\end{tikzpicture}%
}
% --------------------------------------------------------------------------------
\newcommand{\progressarc}[8]{
\begin{tikzpicture}
\draw [line width=#1,#4] (0,#3) arc[start angle=90,radius=#3,delta angle=-3.60*100]; % von Prozent zu Kreiswerten
\draw [line width=#1,#2] (0,#3) arc[start angle=90,radius=#3,delta angle=-3.60*#8]; % von Prozent zu Kreiswerten
\node[] at (0,0) {#5};
\node[#7=#3+#1,align=center] at (0,0) {#6};
\end{tikzpicture}
}