-
Notifications
You must be signed in to change notification settings - Fork 0
/
cv_12.cls
138 lines (104 loc) · 7.38 KB
/
cv_12.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
%----------------------------------------------------------------------------------------
% CLASS OPTIONS AND REQUIRED PACKAGES
%----------------------------------------------------------------------------------------
\ProvidesClass{cv_12}[2014/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass{article}
\usepackage[hmargin=1.25cm, vmargin=0.75cm]{geometry} % Specifies horizontal and vertical page margins
\usepackage[hidelinks]{hyperref} % Required for links
%----------------------------------------------------------------------------------------
% COLORS
%----------------------------------------------------------------------------------------
\usepackage[usenames,dvipsnames,svgnames]{xcolor} % Required for custom colors
\definecolor{primary}{HTML}{2b2b2b} % The primary document color for content text
\definecolor{headings}{HTML}{6A6A6A} % The color of the large sections
\definecolor{subheadings}{HTML}{333333} % The color of subsections and places worked/studied
\definecolor{date}{HTML}{666666} % The color used for the Last Updated text at the top right
%----------------------------------------------------------------------------------------
% FONTS
%----------------------------------------------------------------------------------------
\usepackage{fontspec} % Required for specifying custom fonts in XeLaTeX
\setmainfont[Color=primary, Path=fonts/Lato/,BoldItalicFont=Lato-Italic,BoldFont=Lato-Regular,ItalicFont=Lato-LightItalic]{Lato-Light} % The primary font for content text; defines bold, italic and bold-italic as well
\setsansfont[Scale=MatchLowercase,Mapping=tex-text, Path=fonts/Raleway/static/]{Raleway-ExtraLight} % The font used where \sfffamily is called
%----------------------------------------------------------------------------------------
% LAST UPDATED COMMAND
%----------------------------------------------------------------------------------------
\usepackage[absolute]{textpos} % Required for positioning the Last Updated text at the top right of the page
\usepackage[UKenglish]{isodate} % Prints the Last Updated date in UK English format
\setlength{\TPHorizModule}{0.01\paperwidth} % Sets the units for the horizontal position used in the \begin{textblock} argument
\setlength{\TPVertModule}{0.01\paperwidth} % Sets the units for the vertical position used in the \begin{textblock} argument
\newcommand{\lastupdated}{ % Create a new command for printing the Last Updated text
\begin{textblock}{25}(75,2) % The position of the Last Updated text on the page (75% of the page across, 2% down)
\color{date}\fontspec[Path = fonts/Raleway/static/]{Raleway-ExtraLight}\fontsize{8pt}{10pt}\selectfont % Text styling of the text
Last Updated on \today % Last Updated text
\end{textblock}}
%----------------------------------------------------------------------------------------
% MAIN HEADING COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\namesection}[3]{ % Defines the command for the main heading
\centering{ % Center the name
\fontsize{38pt}{58pt} % Font size
\fontspec[Path = fonts/Lato/]{Lato-Thin}\selectfont #1 % First name font
\fontspec[Path = fonts/Lato/]{Lato-Light}\selectfont #2 % Last name font
} \\
\vspace{5pt} % Whitespace between the name and contact information
\centering{ % Center the contact information
\color{headings} % Use the headings color
\fontspec[Path = fonts/Raleway/static/]{Raleway-Medium}\fontsize{12pt}{14pt}\selectfont #3
} % Contact information font
\noindent\makebox[\linewidth]{\color{headings}\rule{\paperwidth}{0.4pt}} % Horizontal rule
\vspace{-8pt} % Reduce whitespace after the rule slightly
}
%----------------------------------------------------------------------------------------
% SECTION TITLE STYLING AND SPACING
%----------------------------------------------------------------------------------------
\usepackage{titlesec} % Required for customizing section/subsection/etc titles
\titlespacing{\section}{0pt}{0pt}{0pt} % Removes the spacing around the main section titles
\titlespacing{\subsection}{0pt}{0pt}{0pt} % Removes the spacing around the subsections
\newcommand{\sectionspace}{\vspace{8pt}} % Defines a command to add a set amount of space after sections and subsections
\titleformat{\section}{ % Customize the large section titles
\color{headings}\fontspec[Path = fonts/Lato/]{Lato-Light}\fontsize{16pt}{24pt}\selectfont\raggedright\uppercase}{}{0em}{}
\titleformat{\subsection}{ % Customize the subsections and places worked/studied titles
\color{subheadings}\fontspec[Path = fonts/Lato/]{Lato-Regular}\fontsize{10pt}{10pt}\selectfont\uppercase}{}{0em}{}
\newcommand{\runsubsection}[1]{ % Used for creating subsections where a description is required on the same line
\color{subheadings}\fontspec[Path = fonts/Lato/]{Lato-Light}\fontsize{9pt}{9pt}\selectfont\uppercase {#1} \normalfont}
\newcommand{\descript}[1]{ % Used for describing the subsection either on the same line or underneath
\color{subheadings}\raggedright\fontspec[Path = fonts/Raleway/static/]{Raleway-Medium}\fontsize{10pt}{12pt}\selectfont {#1 \\} \normalfont}
\newcommand{\location}[1]{ % Used for specifying a duration and/or location under a subsection
\color{headings}\raggedright\fontspec[Path = fonts/Raleway/static/]{Raleway-Medium}\fontsize{9pt}{11pt}\selectfont {#1 \\} \normalfont}
%----------------------------------------------------------------------------------------
% ITEMS STYLING AND SPACING
%----------------------------------------------------------------------------------------
\newenvironment{tightitemize} % Defines the tightitemize environment which modifies the itemize environment to be more compact
{\vspace{-\topsep}\begin{itemize}\itemsep1pt \parskip0pt \parsep0pt}
{\end{itemize}\vspace{-\topsep}}
%----------------------------------------------------------------------------------------
% PAGE COUNTER COMMAND
%----------------------------------------------------------------------------------------
\usepackage{lastpage}
\setlength{\TPHorizModule}{0.01\paperwidth} % Sets the units for the horizontal position used in the \begin{textblock} argument
\setlength{\TPVertModule}{0.01\paperwidth} % Sets the units for the vertical position used in the \begin{textblock} argument
\newcommand{\pagecounter}{ % Create a new command for printing the Last Updated text
\begin{textblock}{10}(89,4) % The position of the Last Updated text on the page (75% of the page across, 2% down)
\color{date}\fontspec[Path = fonts/Raleway/static/]{Raleway-ExtraLight}\fontsize{8pt}{10pt}\selectfont % Text styling of the text
Page \thepage\ of \pageref{LastPage}
\end{textblock}}
%----------------------------------------------------------------------------------------
% .NET COMMAND
%----------------------------------------------------------------------------------------
\newcommand{\dotnet}{.NET}
%----------------------------------------------------------------------------------------
% RATING
%----------------------------------------------------------------------------------------
\usepackage{tabularx}
\usepackage{tikz}
\newcommand\Mark[2][5]{%
\rlap{\tikz[baseline=(current bounding box.south)]{
\shade[left color=LightGrey, right color=DarkGrey]
(0,0) rectangle ++(#1*#2/100,0.3);
}%
}%
}
%----------------------------------------------------------------------------------------