-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.tex
196 lines (163 loc) · 6.83 KB
/
functions.tex
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
% returns minipage width minus two times \fboxsep
% to keep padding included in width calculations
% can also be used for other boxes / environments
\newcommand{\mpwidth}{\linewidth-\fboxsep-\fboxsep}
%============================================================================%
%
% CV COMMANDS
%
%============================================================================%
%----------------------------------------------------------------------------------------
% CV LIST
%----------------------------------------------------------------------------------------
% renders a standard latex list but abstracts away the environment definition (begin/end)
\newcommand{\cvlist}[1] {
\begin{itemize}{#1}\end{itemize}
}
%----------------------------------------------------------------------------------------
% CV TEXT
%----------------------------------------------------------------------------------------
% base class to wrap any text based stuff here. Renders like a paragraph.
% Allows complex commands to be passed, too.
% param 1: *any
\newcommand{\cvtext}[1] {
\begin{tabular*}{1\mpwidth}{p{0.98\mpwidth}}
\parbox{1\mpwidth}{#1}
\end{tabular*}
}
%----------------------------------------------------------------------------------------
% CV SECTION
%----------------------------------------------------------------------------------------
% Renders a a CV section headline with a nice underline in main color.
% param 1: section title
\newcommand{\cvsection}[1] {
\vspace{14pt}
\cvtext{
\textbf{\LARGE{\textcolor{darkcol}{\uppercase{#1}}}}\\[-4pt]
\textcolor{maincol}{ \rule{0.1\textwidth}{2pt} } \\
}
}
%----------------------------------------------------------------------------------------
% META SKILL
%----------------------------------------------------------------------------------------
% Renders a progress-bar to indicate a certain skill in percent.
% param 1: name of the skill / tech / etc.
% param 2: level (for example in years)
% param 3: percent, values range from 0 to 1
\newcommand{\cvskill}[3] {
\begin{tabular*}{1\mpwidth}{p{0.72\mpwidth} r}
\textcolor{black}{\textbf{#1}} & \textcolor{maincol}{#2}\\
\end{tabular*}%
\hspace{4pt}
\begin{tikzpicture}[scale=1,rounded corners=2pt,very thin]
\fill [lightcol] (0,0) rectangle (1\mpwidth, 0.15);
\fill [maincol] (0,0) rectangle (#3\mpwidth, 0.15);
\end{tikzpicture}%
\vspace{1pt}
}
\newcommand{\cvlanguage}[3] {
\begin{tabular*}{1\mpwidth}{p{0.40\mpwidth} >{\raggedleft}p{0.56\mpwidth}r}
\textcolor{black}{\textbf{#1}} & \textcolor{maincol}{#2}
\end{tabular*}%
\hspace{4pt}
\begin{tikzpicture}[scale=1,rounded corners=2pt,very thin]
\fill [lightcol] (0,0) rectangle (1\mpwidth, 0.15);
\fill [maincol] (0,0) rectangle (#3\mpwidth, 0.15);
\end{tikzpicture}%
\vspace{1pt}
}
%----------------------------------------------------------------------------------------
% CV EVENT
%----------------------------------------------------------------------------------------
% Renders a table and a paragraph (cvtext) wrapped in a parbox (to ensure minimum content
% is glued together when a pagebreak appears).
% Additional Information can be passed in text or list form (or other environments).
% the work you did
% param 1: time-frame i.e. Sep 14 - Jan 15 etc.
% param 2: event name (job position etc.)
% param 3: Customer, Employer, Industry
% param 4: Short description
% param 5: work done (optional)
% param 6: technologies include (optional)
% param 7: achievements (optional)
\newcommand{\cvevent}[7] {
% we wrap this part in a parbox, so title and description are not separated on a pagebreak
% if you need more control on page breaks, remove the parbox
\parbox{\mpwidth}{
\begin{tabular*}{1\mpwidth}{p{0.72\mpwidth} r}
\textcolor{black}{\textbf{#2}} & \colorbox{maincol}{\makebox[0.25\mpwidth]{\textcolor{white}{#1}}} \\
\textcolor{maincol}{\textbf{#3}} & \\
\end{tabular*}\\[8pt]
\ifthenelse{\isempty{#4}}{}{
\cvtext{#4}\\
}
}
\ifthenelse{\isempty{#5}}{}{
\vspace{9pt}
{#5}
}
\ifthenelse{\isempty{#6}}{}{
\vspace{9pt}
\cvtext{\textbf{Technologies include:}}\\
{#6}
}
\ifthenelse{\isempty{#7}}{}{
\vspace{9pt}
\cvtext{\textbf{Achievements include:}}\\
{#7}
}
\vspace{14pt}
}
%----------------------------------------------------------------------------------------
% CV META EVENT
%----------------------------------------------------------------------------------------
% Renders a CV event on the sidebar
% param 1: title
% param 2: subtitle (optional)
% param 3: customer, employer, etc,. (optional)
% param 4: info text (optional)
\newcommand{\cvmetaevent}[4] {
\textcolor{maincol} {\cvtext{\textbf{\begin{flushleft}#1\end{flushleft}}}}
\ifthenelse{\isempty{#2}}{}{
\textcolor{darkcol} {\cvtext{\textbf{#2}} }
}
\ifthenelse{\isempty{#3}}{}{
\cvtext{{ \textcolor{darkcol} {#3} }}\\
}
\ifthenelse{\isempty{#4}}{}{
\cvtext{#4}\\[14pt]
}
}
%---------------------------------------------------------------------------------------
% HEADER
%----------------------------------------------------------------------------------------
\definecolor{headerblue}{HTML}{2EB6E1}%
\definecolor{headerfontbox}{HTML}{000000}
\definecolor{headerfontboxfont}{HTML}{FFFFFF}
\newcommand{\bg}[3]{\colorbox{#1}{\bfseries\color{#2}#3}}
\newcommand{\bgupper}[3]{\colorbox{#1}{\color{#2}\huge\bfseries\MakeUppercase{#3}}}
\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, fill=#5] at (path picture bounding box.center){\includegraphics[height=4.3cm,angle=90,origin=c]{#4}} ;}] (picture) circle (2) ;}%
\vspace{1.5cm}%
}
%---------------------------------------------------------------------------------------
% QR CODE
%----------------------------------------------------------------------------------------
% Renders a qrcode image (centered, relative to the parentwidth)
% param 1: percent width, from 0 to 1
\newcommand{\cvqrcode}[1] {
\begin{center}
\includegraphics[width={#1}\mpwidth]{qr-code.pdf}
\end{center}
}
\newcommand{\cvqrcodevcard}[1] {
\begin{center}
\includegraphics[width={#1}\mpwidth]{qr-code-vcard.pdf}
\end{center}
}