-
Notifications
You must be signed in to change notification settings - Fork 1
/
columncv.cls
159 lines (143 loc) · 4.75 KB
/
columncv.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
154
155
156
157
158
159
%% columncv.cls
%%
%% Package to typeset a cv, using two colmns. The left one contains
%% the labels and the right one the descriptions. These should be
%% contained within an environment defined by \begin{cvenv} ...
%% \end{cvenv}. This environment takes an optional parameter which
%% specifies the separator to be used between the columns. By default,
%% this is none, but [|] may be specified. If any other character needs
%% to be used, it must be specified as [!{decl.}] -- this is due to the
%% implementation of the array package used in this package. Labels and
%% entries are defined by using \cvitem{}{}. Sections are defined by
%% using the sectioning environments. The CV title is created with
%% \makecvtitle.
%%
%% Lengths specific to this package that can be redefined:
%% \implevel importance threshold -- al entries with value less and
%% equal to this will be inserted into document
%% \cvsecsep vertical space between sections
%% \cvitemsep vertical space between entries within an environment
%% \lcolwidth width of the left column as a percentage of \textwidth
%% \rcolwidth width of the right column as a percentage of \textwidth
%%
%% Author and Copyright: Pieter Rautenbach
%% Date: 23/09/2004-22/04/2005
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{columncv}[2005/04/22 v1.0 Column-based curriculum vitae and résumé class]
%\renewcommand{\normalsize}{\fontsize{10pt}{12pt}\selectfont}
%\pagenumbering{arabic}
%% pass all options to the article class
\DeclareOption*{%
\PassOptionsToClass{\CurrentOption}{article}%
}
\ProcessOptions\relax
%% this class builds on the article class
\LoadClass{article}
%% additional packages needed
\RequirePackage{ifthen}
\RequirePackage{longtable}
\RequirePackage{array}
%% \RequirePackage{fancyhdr}
%\DeclareRobustCommand{cmd}[num][default]{def}
%\ClassError{class}{error}{help}
%\PackageWarning
%\PackageInfo
%% \DeclareOption{}{}
%% \DeclareOption*{}
%% \ExecuteOptions{}
%% \ProcessOptions
%% margins
\setlength{\hoffset}{0pt}
\setlength{\voffset}{0pt}
\setlength{\oddsidemargin}{0pt}
\setlength{\topmargin}{0pt}
\setlength{\evensidemargin}{0pt}
\setlength{\topskip}{0pt}
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-2in}
\setlength{\marginparsep}{0pt}
\setlength{\headsep}{1ex}%0pt
\setlength{\marginparwidth}{0pt}
\setlength{\headheight}{2em}%20pt
\setlength{\textfloatsep}{0pt}
%% \footnotesep=3ex
%% importance level
\newcounter{implevel}
\setcounter{implevel}{0}
%% vspace between (sub)(sub)sections
\newlength{\cvsecsep}
\setlength{\cvsecsep}{1ex plus 0.5ex minus 0ex}
%% vspace between environment interline spacing
%% it must be a rubber length
\newlength{\cvitemsep}
\setlength{\cvitemsep}{0.5ex}
%% \DeclareOption{ex}{\setlength{\cvitemsep}{5ex}}
%% \DeclareOption*{\setlength{\cvitemsep}{0.5ex}}
%% percentage of pagewidth of left column
\newlength{\lcolwidth}
\setlength{\lcolwidth}{0.26\textwidth}
%% percentage of pagewidth of right column
\newlength{\rcolwidth}
\setlength{\rcolwidth}{0.74\textwidth}
%% cv environment
%% start a longtable with two columns:
%% the left-hand column is right aligned
%% the right-hand column is left aligned
\newenvironment{cvenv}[1][]%!{decl.}
{\begin{longtable}{>{\raggedleft}p{0.9\lcolwidth}#1>{\raggedright}p{0.9\rcolwidth}}%
\cvitemtoks={}}%
{\the\cvitemtoks\end{longtable}}%
%% cv item command
%% typeset one line in the table:
%% the left-hand column in bold font and
%% the right-hand column in normal font
%% implevel defines the importance level:
%% if the optional parameter #1 is greater than
%% implevel, it won't be inserted into the table
\newtoks\cvitemtoks
\newcommand{\cvitem}[3][0]{%
\ifthenelse{\value{implevel}<#1}{}{%
\cvitemtoks=\expandafter{\the\cvitemtoks \textit{#2}\tabularnewline}%
}%
}
%% sectioning commands, based on the standard ones,
%% but without numbering
%% \newcommand{\cvsection}[1]{%
%% \section*{#1}
%% }
\newcommand{\cvsection}{%
\@startsection{section}{1}{0pt}%
{\cvsecsep}%
{\cvsecsep}%
{\bfseries\Large}*}
%% \newcommand{\cvsubsection}[1]{%
%% \subsection*{#1}
%% }
\newcommand{\cvsubsection}{%
\@startsection{subsection}{2}{0pt}%
{\cvsecsep}%
{\cvsecsep}%
{\bfseries\large}*}
\newcommand{\cvsubsubsection}{%
\@startsection{subsubsection}{3}{0pt}%
{\cvsecsep}%
{\cvsecsep}%
{\bfseries\normalsize}*}
%% creates a heading ``Curriculum Vitae'' with today's date
\newcommand{\makecvtitle}{% [1][Curriculum Vitae]{%
\thispagestyle{plain}
\begin{center}
{\LARGE \textbf{Curriculum Vitae}} \\[\cvitemsep]
\today{}
\end{center}
}
%% creates a heading ``Résumé'' with today's date
\newcommand{\makeresumetitle}{
\thispagestyle{plain}
\begin{center}
{\LARGE \textbf{R\'esum\'e}} \\[\cvitemsep]
\today{}
\end{center}
}