-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresume.cls
151 lines (125 loc) · 3.75 KB
/
resume.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
% -- Encoding UTF-8 without BOM
\ProvidesClass{resume}
\LoadClass{article}
\NeedsTeXFormat{LaTeX2e}
\ProcessOptions\relax
% 8.5x11 paper size for our 1 page resume
\usepackage[papersize={8.5in,11in}]{geometry}
% FancyHDR is used for custom footer text
\usepackage{fancyhdr}
\pagestyle{fancy}
% Forces the footer further down, so it's not overlapping text
\setlength{\footskip}{135pt}
% --- Shortcuts --- %
\newcommand{\br}{\vspace{\baselineskip}} % lineskip
% --- Colors --- %
% The colors we'll use throughout the document
\RequirePackage{xcolor} % Load before pagecolor
% This throws some warnings, but seems to work?
\usepackage[pagecolor=white]{pagecolor}
\definecolor{white}{RGB}{255,255,255}
\definecolor{darkgray}{HTML}{333333}
\definecolor{gray}{HTML}{4D4D4D}
\definecolor{lightgray}{HTML}{999999}
\definecolor{kewlpurple}{HTML}{534E6C}
\colorlet{fillheader}{kewlpurple} % best shade of purple
\colorlet{header}{white}
\colorlet{textcolor}{gray} % lightens up the text just a bit
\colorlet{headercolor}{gray} % headers should be lighter than job titles
% --- Fonts --- %
\RequirePackage[quiet]{fontspec}
% Roboto Regular doesn't come with a bold/italic face, so we have to specify each face manually
\newfontfamily\bodyfont{Roboto-Regular}[Path=fonts/]
\newfontfamily\bodyfontitalics{Roboto-Italic}[Path=fonts/]
\newfontfamily\bodyfontbold{Roboto-Bold}[Path=fonts/]
\newfontfamily\bodyfontit{Roboto-LightItalic}[Path=fonts/]
\newfontfamily\thinfont{Roboto-Thin}[Path=fonts/]
\newfontfamily\headingfont{RobotoCondensed-Bold}[Path=fonts/]
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=textcolor, Path = fonts/]{Roboto-Light}
\newcommand{\italica}[1]{%
{\color{gray}\bodyfontit #1}%
}
% --- Header --- %
\RequirePackage{tikz}
\newcommand{\header}[3]{%
\begin{tikzpicture}[remember picture,overlay]
\node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=3.5cm] (box) at (current page.north){};
\node [anchor=center] (name) at (box) {%
\fontsize{40pt}{72pt}\color{header}%
{\thinfont #1}{\bodyfont #2}
};
\node [anchor=north] at (name.south) {%
\fontsize{14pt}{24pt}\color{header}%
\thinfont #3%
};
\end{tikzpicture}
\vspace{2.5cm}
\vspace{-2\parskip}
}
% --- Footer --- %
\newcommand{\footer}[1]{%
\fancyfoot[C]{#1}
}
% --- Aside --- %
\RequirePackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{1cm}
\newenvironment{aside}{%
\let\oldsection\section
\renewcommand{\section}[1]{
\par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} ##1}
}
\begin{textblock}{0.22}(0, 3.3)
\begin{flushright}
\obeycr
}{%
\restorecr
\end{flushright}
\end{textblock}
\let\section\oldsection
}
% --- Body --- %
\RequirePackage{parskip}
\newenvironment{main}{%
\let\oldsection\section
\renewcommand{\section}[1]{
\par\vspace{\baselineskip}
{\Large\headingfont\color{headercolor} ##1}
}
\begin{textblock}{0.70}(0.26, 3.3)
\begin{flushleft}
\obeycr
}{%
\restorecr
\end{flushleft}
\end{textblock}
\let\section\oldsection
}
% --- Experience --- %
\newcommand{\experience}[4]{%
\vspace{3mm}
\begin{minipage}[t]{7cm}
\flushleft
{\Large\headingfont #1}
{\large\bodyfontbold\textsc{\MakeLowercase{#3}}}
\end{minipage}
\hfill
\begin{minipage}[t]{7cm}
\flushright
{\large\textsc{\MakeLowercase{#2}}}
{\large\textsc{\MakeLowercase{#4}}}
\end{minipage}
\vspace{2mm}
~
}
% --- Bullet points --- %
% Due to some oddities with the minipage used to format
% job titles, \begin{itemize} can't be used.
\newcommand{\point}[1]{%
\quad \textbullet \space #1
}
\newcommand{\subpoint}[1]{%
\qquad {\bodyfontbold \textperiodcentered} \space #1
}