-
Notifications
You must be signed in to change notification settings - Fork 0
/
cv.cls
206 lines (161 loc) · 7.32 KB
/
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
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Developer CV
% LaTeX Class
% Version 1.0 (28/1/19)
%
% This class originates from:
% http://www.LaTeXTemplates.com
%
% Authors:
% Jan Vorisek ([email protected])
% Based on a template by Jan Küster ([email protected])
% Modified for LaTeX Templates by Vel ([email protected])
%
% License:
% The MIT License (see included LICENSE file)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% CLASS CONFIGURATION
%----------------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{developercv}[2019/01/28 Developer CV class v1.0]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{extarticle}} % Pass through any options to the base class
\ProcessOptions\relax % Process given options
\LoadClass{extarticle} % Load the base class
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\setlength{\parindent}{0mm} % Suppress paragraph indentation
\usepackage[hidelinks]{hyperref} % Required for links but hide the default boxes around links
\newcommand{\lorem}{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.} % Dummy text
\pagestyle{empty} % No headers or footers
\usepackage{moresize} % Provides more font size commands (\HUGE and \ssmall)
%----------------------------------------------------------------------------------------
% PAGE LAYOUT
%----------------------------------------------------------------------------------------
\usepackage{geometry} % Required for adjusting page dimensions and margins
\geometry{
paper=a4paper, % Paper size, change to letterpaper for US letter size
top=1.75cm, % Top margin
bottom=1.75cm, % Bottom margin
left=2cm, % Left margin
right=2cm, % Right margin
headheight=0.75cm, % Header height
footskip=1cm, % Space from the bottom margin to the baseline of the footer
headsep=0.5cm, % Space from the top margin to the baseline of the header
%showframe, % Uncomment to show how the type block is set on the page
}
%----------------------------------------------------------------------------------------
% FONTS
%----------------------------------------------------------------------------------------
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage[default]{raleway}
%\usepackage[defaultsans]{droidsans}
%\usepackage{cmbright}
%\usepackage{fetamont}
%\usepackage[default]{gillius}
%\usepackage{roboto}
\renewcommand*\familydefault{\sfdefault} % Force the sans-serif version of any font used
%------------------------------------------------
\usepackage{fontawesome} % Required for FontAwesome icons
% Command to output an icon in a black square box with text to the right
\newcommand{\icon}[3]{% The first parameter is the FontAwesome icon name, the second is the box size and the third is the text
\vcenteredhbox{\colorbox{black}{\makebox(#2, #2){\textcolor{white}{\large\csname fa#1\endcsname}}}}% Icon and box
\hspace{0.2cm}% Whitespace
\vcenteredhbox{\textcolor{black}{#3}}% Text
}
%----------------------------------------------------------------------------------------
% GRAPHICS DEFINITIONS
%----------------------------------------------------------------------------------------
\usepackage{tikz} % Required for creating the plots
\usetikzlibrary{shapes, backgrounds}
\tikzset{x=1cm, y=1cm} % Default tikz units
% Command to vertically centre adjacent content
\newcommand{\vcenteredhbox}[1]{% The only parameter is for the content to centre
\begingroup%
\setbox0=\hbox{#1}\parbox{\wd0}{\box0}%
\endgroup%
}
%----------------------------------------------------------------------------------------
% CHARTS
%----------------------------------------------------------------------------------------
\newcounter{barcount}
% Environment to hold a new bar chart
\newenvironment{barchart}[1]{ % The only parameter is the maximum bar width, in cm
\newcommand{\barwidth}{0.35}
\newcommand{\barsep}{0.2}
% Command to add a bar to the bar chart
\newcommand{\baritem}[2]{ % The first argument is the bar label and the second is the percentage the current bar should take up of the total width
\pgfmathparse{##2}
\let\perc\pgfmathresult
\pgfmathparse{#1}
\let\barsize\pgfmathresult
\pgfmathparse{\barsize*##2/100}
\let\barone\pgfmathresult
\pgfmathparse{(\barwidth*\thebarcount)+(\barsep*\thebarcount)}
\let\barx\pgfmathresult
\filldraw[fill=black, draw=none] (0,-\barx) rectangle (\barone,-\barx-\barwidth);
\node [label=180:\colorbox{black}{\textcolor{white}{##1}}] at (0,-\barx-0.175) {};
\addtocounter{barcount}{1}
}
\begin{tikzpicture}
\setcounter{barcount}{0}
}{
\end{tikzpicture}
}
%------------------------------------------------
\newcounter{a}
\newcounter{b}
\newcounter{c}
% Command to output a number of automatically-sized bubbles from a string in the format of '<size>/<label>', e.g. \bubbles{5/Eclipse, 6/git, 4/Office, 3/Inkscape, 3/Blender}
\newcommand{\bubbles}[1]{
% Reset counters
\setcounter{a}{0}
\setcounter{c}{150}
\begin{tikzpicture}[scale=3]
\foreach \p/\t in {#1} {
\addtocounter{a}{1}
\bubble{\thea/2.1}{\theb}{\p/25}{\t}{1\p0}
}
\end{tikzpicture}
}
% Command to output a bubble at a specific position with a specific size
\newcommand{\bubble}[5]{
\filldraw[fill=black, draw=none] (#1,0.5) circle (#3); % Bubble
\node[label=\textcolor{black}{#4}] at (#1,0.7) {}; % Label
}
%----------------------------------------------------------------------------------------
% CUSTOM SECTIONS
%----------------------------------------------------------------------------------------
% Command to output section title headings
\newcommand{\cvsect}[1]{% The only parameter is the section text
\vspace{\baselineskip} % Whitespace before the section title
\colorbox{black}{\textcolor{white}{\MakeUppercase{\textbf{#1}}}}\\% Section title
}
%----------------------------------------------------------------------------------------
% ENTRY LIST
%----------------------------------------------------------------------------------------
\usepackage{longtable} % Required for tables that span multiple pages
\setlength{\LTpre}{0pt} % Remove default whitespace before longtable
\setlength{\LTpost}{0pt} % Remove default whitespace after longtable
\setlength{\tabcolsep}{0pt} % No spacing between table columns
% Environment to hold a new list of entries
\newenvironment{entrylist}{
\begin{longtable}[H]{l l}
}{
\end{longtable}
}
\newcommand{\entry}[4]{% First argument for the leftmost date(s) text, second is for the bold entry heading, third is for the bold right-aligned entry qualifier and the fourth is for the entry description
\parbox[t]{0.175\textwidth}{% 17.5% of the text width of the page
#1 % Leftmost entry date(s) text
}%
&\parbox[t]{0.825\textwidth}{% 82.5% of the text width of the page
\textbf{#2}% Entry heading text
\hfill% Horizontal whitespace
{\footnotesize \textbf{\textcolor{black}{#3}}}\\% Right-aligned entry qualifier text
#4 % Entry description text
}\\\\}
% Command to output a separator slash between lists, e.g. ' / '
\newcommand{\slashsep}{\hspace{3mm}/\hspace{3mm}}