-
Notifications
You must be signed in to change notification settings - Fork 3
/
resume.sty
177 lines (130 loc) · 6.19 KB
/
resume.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
% resume.sty
% Copyright (c) 2012 Cies Breijs
%
% The MIT License
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in
% all copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
%
% This style contains some commands for making a LaTeX resume
%
% Please refer to the README.md file for more info.
%
% This project is currently hosted at: https://github.com/cies/resume
%
%%% LOAD AND SETUP PACKAGES
% To finetune lists with a inline heading and indented content.
% See the Experiences section in the example.
\usepackage{mdwlist}
% For multiple column text.
\usepackage{multicol}
% For \textscale, which I prefer over \sc (small caps).
% See the \acr command definition below.
\usepackage{relsize}
% Setup the hyperrefs witht he right color.
\usepackage{hyperref}
\usepackage{xcolor}
\definecolor{dark-blue}{rgb}{0.15,0.15,0.4}
\hypersetup{colorlinks,linkcolor={dark-blue},citecolor={dark-blue},urlcolor={dark-blue}}
% XeTeX specific stuff with fall-back.
\usepackage{ifxetex}
\ifxetex
\usepackage{fontspec}
% the main font, with all features on
\setmainfont
[ ExternalLocation ,
Mapping = tex-text ,
Numbers = OldStyle ,
Ligatures = {Common,Contextual} ,
BoldFont = texgyrepagella-bold.otf ,
ItalicFont = texgyrepagella-italic.otf ,
BoldItalicFont = texgyrepagella-bolditalic.otf ]
{texgyrepagella-regular.otf}
% same like the main font, but without old-style nums
\newfontfamily\newnums
[ ExternalLocation ,
Mapping = tex-text ,
Ligatures = {Common,Contextual} ,
BoldFont = texgyrepagella-bold.otf ,
ItalicFont = texgyrepagella-italic.otf ,
BoldItalicFont = texgyrepagella-bolditalic.otf ]
{texgyrepagella-regular.otf}
% Comment out the previous statement and uncomment the following line to use the
% Linux Libertine font (it has nice lignatures).
% Make sure to have the `ttf-linux-libertine` package installed on Ubuntu.
% \setmainfont[Mapping=tex-text, Numbers=OldStyle, Ligatures={Common,Contextual}]{Linux Libertine O}
% needs an experimental and impossible to find package for xetex
\usepackage[protrusion]{microtype}
\else
% this case we likely use the `pdftex` back-end
% therefor we lack:
% * lower case numbers,
% * ligatures and
% * some typographic niceties
% We do make use of the possibility to use `microtype`
\usepackage{tgpagella}
\usepackage[expansion,protrusion]{microtype}
\fi
%%% DOCUMENT WIDE STYLING
\pagestyle{empty}
\setlength{\tabcolsep}{0em}
\xspaceskip7pt % some more spacing between sentences (use "i.e.\ " or "with SQL\@. " in case of errors)
%%% CUSTOM COMMANDS
% main title (name) with subtitle (date)
\newcommand\maintitle[3]{\vbox to 0pt{\hfill\scriptsize\color{gray} #3}\vspace{-0.4em}\noindent{\LARGE \textbf{#1}}\ \ \ \emph{#2}}
% title for the root sections (experience, education, etc) of the resume
\newcommand*\roottitle[1]{\subsection*{#1}\vspace{-0.3em}\nopagebreak[4]}
% acr command, to quickly mark acronyms for special formatting
\newcommand*\acr[1]{\textscale{.85}{#1}}
% pretty bullet (created from a much smaller centerdot), \sbull contains its spacing
\newcommand*\bull{\raisebox{-0.365em}[-1em][-1em]{\textscale{4}{$\cdot$}}}
\newcommand*\sbull{\ \ \bull \ \ }
% it seems not to work when simply using \parindent...
\newlength{\newparindent}
\addtolength{\newparindent}{\parindent}
% a double \parindent...
\newlength{\doubleparindent}
\addtolength{\doubleparindent}{\parindent}
\addtolength{\doubleparindent}{\parindent}
% indentsection style, used for sections that aren't already in lists
% that need indentation to the level of all text in the document
\newenvironment{indentsection}%
{\begin{list}{}%
{\setlength{\leftmargin}{\newparindent}\setlength{\parsep}{0pt}\setlength{\parskip}{0pt}\setlength{\itemsep}{0pt}\setlength{\topsep}{0pt}}%
}
{\end{list}}
% headerrow command, used for a new employer
\newcommand{\headedsection}[3]{\nopagebreak[4]\begin{indentsection}\item[]\textscale{1.1}{#1}\hfill#2#3\end{indentsection}\nopagebreak[4]}
% subheaderrow command, used for a new position
\newcommand{\headedsubsection}[3]{\nopagebreak[4]\begin{indentsection}\item[]\textbf{#1}\hfill\emph{#2}#3\end{indentsection}\nopagebreak[4]}
% body text (indented)
\newcommand{\bodytext}[1]{\nopagebreak[4]\begin{indentsection}\item[]#1\end{indentsection}\pagebreak[2]}
% \vspace variaties
\newcommand{\breakvspace}[1]{\pagebreak[2]\vspace{#1}\pagebreak[2]}
\newcommand{\nobreakvspace}[1]{\nopagebreak[4]\vspace{#1}\nopagebreak[4]}
% \spacedhrule a horizontal line with some vertical space before and after it
\newcommand{\spacedhrule}[2]{\breakvspace{#1}\hrule\nobreakvspace{#2}}
% \inlineheadsection command, used for a new employer
\newcommand{\inlineheadsection}[2]{\begin{basedescript}{\setlength{\leftmargin}{\doubleparindent}}\item[\hspace{\newparindent}\textbf{#1}]#2\end{basedescript}\vspace{-1.7em}}
% apo command, for an apostrophe that looks good on old style nums
\newcommand{\apo}{\raisebox{-.18ex}{'}{\hspace{-.1em}}}
% non space that allows line breaks
\newcommand*{\nsp}{\hskip0pt}
%%% MORE SPECIFIC COMMANDS
% CPP command (found it in some corner of the internet and decided to use it)
\newcommand{\CPP}{C\nolinebreak[4]\hspace{-.04em}\raisebox{.20ex}{\footnotesize\bf++}}