forked from treyhunner/resume
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resume.cls
118 lines (99 loc) · 3.43 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
% resume.cls
% \documentstyle{resume}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright (C) 2010 by Trey Hunner
%
% Copying and distribution of this file, with or without modification,
% are permitted in any medium without royalty provided the copyright
% notice and this notice are preserved. This file is offered as-is,
% without any warranty.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ProvidesClass{resume}[2010/07/10 v0.9 Resume class]
\LoadClass[11pt,letterpaper]{article}
\usepackage[parfill]{parskip} % Do not indent aragraphs
\usepackage{array} % required for boldface tabular columns
\usepackage{ifthen}
\nofiles % .aux files are not needed for resumes
\pagestyle{empty} % resumes do not need page numbers
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HEADINGS: Commands for printing name and address
\def \name#1{\def\@name{#1}} % \name command can be used to set name
\def \@name {} % Set \@name to empty by default
\def \addressSep {$\diamond$} % Set default address seperator
% One or two address lines can be specified
\let \@addressone \relax
\let \@addresstwo \relax
% \address command can be used to set first and second address (optional)
\def \address #1{
\@ifundefined{@addresstwo}{
\def \@addresstwo {#1}
}{
\def \@addressone {#1}
}
}
% \printaddress is used to style an address line (given as input)
\def \printaddress #1{
\begingroup
\def \\ {\addressSep\ }
\centerline{#1}
\endgroup
\par
\addressskip
}
% \printname is used to print the name as a page header
\def \printname {
\begingroup
\hfil{\MakeUppercase{\namesize\bf \@name}}\hfil
\nameskip\break
\endgroup
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT: Create the head of the document
\let\ori@document=\document
\renewcommand{\document}{
\ori@document % Begin document
\printname % Print the name specified with \name
\@ifundefined{@addressone}{}{ % Print the first address if specified
\printaddress{\@addressone}}
\@ifundefined{@addresstwo}{}{ % Print the second address if specified
\printaddress{\@addresstwo}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SECTIONS: Create section headings
% Used to create large resume section
\newenvironment{rSection}[1]{
\sectionskip
\MakeUppercase{\bf #1}
\sectionlineskip
\hrule
\begin{list}{}{
\setlength{\leftmargin}{1.5em}
}
\item[]
}{
\end{list}
}
% Used to format job listing
\newenvironment{rSubsection}[4]{
%%%%%%%%%%%%%%%%%%%%%% Default Layout: %%%%%%%%%%%%%%%%%%%%%%%%
%% Employer (bold) Dates (regular) %%
%% Title (emphasis) Location (emphasis) %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{\bf #1} \hfill { #2}
\ifthenelse{\equal{#3}{}}{}{
\\
{\em #3} \hfill {\em #4}
}\smallskip
% \cdot used for bullets, items non-indented
\begin{list}{$\cdot$}{\leftmargin=0em}
\itemsep -0.5em \vspace{-0.5em}
}{
\end{list}
\vspace{0.5em}
}
\def\namesize{\huge}
\def\nameskip{\medskip}
\def\addressskip{\smallskip}
\def\sectionskip{\bigskip}
\def\sectionlineskip{\medskip}