-
Notifications
You must be signed in to change notification settings - Fork 137
/
Copy pathcv_brennen.cls
154 lines (133 loc) · 4.67 KB
/
cv_brennen.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
% resume_brennen.cls
% slight tweak of D. Burrows version
% resume.cls
%
% Copyright 2005 Daniel Burrows
%
% You may use, modify, and redistribute this file in any way you please, so
% long as this copyright notice is maintained.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{resume_brennen}
\LoadClassWithOptions{article}
% No page numbers by default.
\pagestyle{empty}
\RequirePackage{calc}
\RequirePackage{ifthen}
\RequirePackage{url}
\RequirePackage{tabularx}
\RequirePackage{pgf}
\RequirePackage{pgfshade}
\RequirePackage{xxcolor}
% <Brennen> Commented these trying to get back to Computer Modern.
% This appears to have worked. Should do the right thing
% at some future point.
%\RequirePackage{times}
%\RequirePackage[T1]{fontenc}
\RequirePackage[tmargin=1in,bmargin=1in]{geometry}
\definecolor{rulestartcolor}{rgb}{0,0,0}
\definecolor{ruleendcolor}{rgb}{0.4,0.4,0.4}
\newlength{\headerbuffer}
\setlength{\headerbuffer}{2pt}
\newlength{\secskip}
\setlength{\secskip}{6pt}
\newlength{\@headerscratch}
% Usage: \@setupshading{width}{height}{start}{end}
\newcommand{\@setupshading}[4]{%
\pgfdeclarehorizontalshading{@ruleshading}{#2}{%
color(0pt)=(#3); color(#1)=(#4)%
}
}
\newcommand{\pgfrule}[4]{%
\begin{pgfpicture}{0pt}{0pt}{#1}{#2}%
\pgfdeclarehorizontalshading{@ruleshading}{#2}{%
color(0pt)=(#3); color(#1)=(#4)%
}
\pgfputat{\pgfxy(0,0)}{\pgfbox[left,bottom]{\pgfuseshading{@ruleshading}}}
\end{pgfpicture}%
}
\newcommand{\lrule}[2]{\pgfrule{#1}{#2}{rulestartcolor}{ruleendcolor}}
\newcommand{\rrule}[2]{\pgfrule{#1}{#2}{ruleendcolor}{rulestartcolor}}
\newcommand{\@authorname}{}
\newcommand{\@email}{}
\newcommand{\@streetaddress}{}
\newcommand{\@citystatezip}{}
\newcommand{\@phone}{}
\newcommand{\@webpage}{}
\renewcommand{\author}[1]{\renewcommand{\@authorname}{#1}}
\newcommand{\email}[1]{\urldef{\@email}{\url}{<#1>}}
\newcommand{\streetaddress}[1]{\renewcommand{\@streetaddress}{#1}}
\newcommand{\citystatezip}[1]{\renewcommand{\@citystatezip}{#1}}
\newcommand{\phone}[1]{\renewcommand{\@phone}{#1}}
\newcommand{\webpage}[1]{\urldef{\@webpage}{\url}{#1}}
\renewcommand{\maketitle}{{%
\setlength{\@headerscratch}{\linewidth*2/3}%
% <Brennen> Commented this to get rid of rule above name.
%\noindent \lrule{\@headerscratch}{1.5pt}%
\vspace{\headerbuffer}%
\ifthenelse{\equal{\@email}{}}{%
\par\nointerlineskip\noindent\makebox[\linewidth]{\textbf{\Large{\@authorname}}}%
} {%
\par\nointerlineskip\noindent\makebox[\linewidth]{\textbf{\Large{\@authorname\ \@email}}}%
}%
\vspace{\headerbuffer}%
\par\nointerlineskip\noindent%
\hspace{\linewidth}%
\hspace{-\@headerscratch}%
% <Brennen> Commented this to get rid of rule below name.
%\rrule{\@headerscratch}{1.5pt}%
\par\nointerlineskip\noindent%
% Typeset webpage/phone in columns if both are specified, or
% just on the LHS if only one is.
\begin{small}%
\ifthenelse{\equal{\@webpage}{}}{%
\ifthenelse{\equal{\@phone}{}}{}{\@phone\par\nointerlineskip\noindent}%
} {%
\ifthenelse{\equal{\@phone}{}}{\@webpage\par\nointerlineskip\noindent}{%
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}%
\@phone & \@webpage%
\end{tabular*}%
\par\nointerlineskip\noindent%
}%
}%
\ifthenelse{\equal{\@streetaddress}{} \and%
\equal{\@citystatezip}{}}{}{%
\ifthenelse{\equal{\@streetaddress}{} \or %
\equal{\@citystatezip}{}}{%
\ClassError{resume}{%
Only one of \protect\streetaddress and \protect\citystatezip given
}{%
You must either define both \protect\streetaddress and \protect\citystatezip,
or define neither of them.
}%
}{%
%
\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}%
\@streetaddress & \@citystatezip%
\end{tabular*}%
}}%
% \ifthenelse{\equal{\@webpage}{}}{}{%
% \@webpage%
% }%
\end{small}
}}
\renewcommand{\section}[1]{%
\goodbreak\vspace{\secskip}%
\par\nointerlineskip\noindent\textbf{\textsc{\large\makebox[\linewidth][l]{#1}}}\vspace{\headerbuffer}\par\nointerlineskip\noindent%
\lrule{\linewidth}{0.4pt}%
\vspace{\headerbuffer}\par\nointerlineskip}
\renewcommand{\subsection}[1]{%
\goodbreak\vspace{\secskip}\par\nointerlineskip\vspace{-1em}\textbf{\flushleft{#1}:}\par%
}
% General catch-all for either educational or job affiliation.
%
% Usage:
% \affiliation[title]{institution}{years}
% <Brennen> Changed to \emph[#1] down there.
\newcommand{\affiliation}[3][]{%
\goodbreak\vspace{\secskip}\par\noindent\begin{tabularx}{\linewidth}{Xr}%
{\bfseries #2} & \textit{#3}%
\ifthenelse{\equal{#1}{}}{}{%
\\ \emph{#1}%
}%
\end{tabularx}%
}%