2 %% This is file `curve.cls',
3 %% generated with the docstrip utility.
5 %% The original source files were:
11 %% Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Didier Verna
13 %% This file is part of CurVe.
15 %% CurVe may be distributed and/or modified under the
16 %% conditions of the LaTeX Project Public License, either version 1.1
17 %% of this license or (at your option) any later version.
18 %% The latest version of this license is in
19 %% http://www.latex-project.org/lppl.txt
20 %% and version 1.1 or later is part of all distributions of LaTeX
21 %% version 1999/06/01 or later.
23 %% CurVe consists of the files listed in the file `README'.
26 %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
27 %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
28 %% Digits \0\1\2\3\4\5\6\7\8\9
29 %% Exclamation \! Double quote \" Hash (number) \#
30 %% Dollar \$ Percent \% Ampersand \&
31 %% Acute accent \' Left paren \( Right paren \)
32 %% Asterisk \* Plus \+ Comma \,
33 %% Minus \- Point \. Solidus \/
34 %% Colon \: Semicolon \; Less than \<
35 %% Equals \= Greater than \> Question mark \?
36 %% Commercial at \@ Left bracket \[ Backslash \\
37 %% Right bracket \] Circumflex \^ Underscore \_
38 %% Grave accent \` Left brace \{ Vertical bar \|
39 %% Right brace \} Tilde \~}
40 \NeedsTeXFormat{LaTeX2e}
42 \ProvidesClass{curve}[2005/09/14 v1.10
43 Curriculum Vitae class for LaTeX2e]
45 \RequirePackage{ltxtable}
48 \newif\ifstrok\strokfalse
50 \def\@strone{#1}\def\@strtwo{#2}%
51 \ifstrok\else\ifx\@strone\@strtwo\stroktrue\fi\fi}
56 \newcommand\keyfont[1]{\gdef\@keyfont{#1}}
58 \newcolumntype{k}{>{\@keyfont}l}
59 \newcommand\keyalignment[1]{%
60 \strokfalse\strtest{#1}{l}\strtest{#1}{r}\strtest{#1}{c}%
62 \ClassError{curve}{Invalid key alignment}{%
63 You have called \protect\keyalignment\space with an invalid value.%
65 Valid options include l, c, and r.\MessageBreak
66 Type X <return> to quit, fix the typo, and rerun LaTeX.}%
68 \newcolumntype{k}{>{\@keyfont}#1}
71 \def\@prefix{\textbullet}
72 \newcommand\prefix[1]{\gdef\@prefix{#1}}
76 \ifx\@previouskey\@newkey\else%
77 #1\gdef\@previouskey{#1}%
81 \DeclareOption{skipsamekey}{\let\@key\@maybekey}
83 \newcommand\@entry[2][]{%
84 \gdef\@nextentry{}\egroup% end of \noalign opened in \entry.
85 \@key{#1}&\@prefix\\}
87 \newcommand\@sentry[1][]{%
88 \gdef\@nextentry{\\}\egroup% end of \noalign opened in \entry.
93 \noalign\bgroup\gdef\@beforespace{-\subrubricbeforespace}%
94 \@ifstar{\@sentry}{\@entry}}
96 \def\@subrubricfont{\Large\itshape}
97 \newcommand\subrubricfont[1]{\gdef\@subrubricfont{#1}}
99 \newlength\subrubricbeforespace
100 \setlength\subrubricbeforespace{10pt}
102 \newlength\subrubricspace
103 \setlength\subrubricspace{5pt}
105 \let\@subrubricmark\@gobble
109 \raisebox{\@beforespace}{\@subrubricfont#1}%
110 \par\vspace\subrubricspace}%
114 \def\@clcccolsep{\hspace{\tabcolsep}\ifx\@prefix\@empty~\fi}
116 \def\@subrubric@l#1{\multicolumn{3}{@{}l}{\@@subrubric{#1}}}
117 \def\@subrubric@c#1{\multicolumn{3}{@{}c}{\@@subrubric{#1}}}
118 \def\@subrubric@r#1{\multicolumn{3}{@{}r}{\@@subrubric{#1}}}
119 \def\@subrubric@cl#1{&\multicolumn{2}{@{\@clcccolsep}l}{\@@subrubric{#1}}}
120 \def\@subrubric@cc#1{&\multicolumn{2}{@{\@clcccolsep}c}{\@@subrubric{#1}}}
122 \let\@subrubric\@subrubric@cl
124 \newcommand\subrubricalignment[1]{%
125 \def\@curve@temp@a{\let\@subrubric}
126 \expandafter\@curve@temp@a\csname @subrubric@#1\endcsname
127 \@ifundefined{@subrubric}{%
128 \ClassError{curve}{Invalid subrubric alignment}{%
129 You have called \protect\subrubricalignment\space with an invalid value.%
131 Valid options include l, c, r, cl and cc.\MessageBreak
132 Type X <return> to quit, fix the typo, and rerun LaTeX.}}
135 \newcommand\subrubric[1]{%
137 \noalign{\gdef\@nextentry{}}%
140 \newlength{\@almosttextwidth}
141 \AtBeginDocument{\setlength\@almosttextwidth{\textwidth-\hfuzz}}
143 \def\@rubricfont{\Large\bfseries}
144 \newcommand\rubricfont[1]{\gdef\@rubricfont{#1}}
146 \newlength\rubricspace
147 \setlength\rubricspace{10pt}
149 \let\@rubricmark\@gobble
151 \def\@@rubrichead#1{\@rubricfont#1\par\vspace\rubricspace}
153 \def\@rubrichead@l#1{\multicolumn{3}{@{}l}{\@@rubrichead{#1}}\\}
154 \def\@rubrichead@c#1{\multicolumn{3}{@{}c}{\@@rubrichead{#1}}\\}
155 \def\@rubrichead@r#1{\multicolumn{3}{@{}r}{\@@rubrichead{#1}}\\}
156 \def\@rubrichead@cl#1{&\multicolumn{2}{@{\@clcccolsep}l}{\@@rubrichead{#1}}\\}
157 \def\@rubrichead@cc#1{&\multicolumn{2}{@{\@clcccolsep}c}{\@@rubrichead{#1}}\\}
159 \let\@rubrichead\@rubrichead@c
161 \newcommand\rubricalignment[1]{%
162 \def\@curve@temp@a{\let\@rubrichead}
163 \expandafter\@curve@temp@a\csname @rubrichead@#1\endcsname
164 \@ifundefined{@rubrichead}{%
165 \ClassError{curve}{Invalid rubric alignment}{%
166 You have called \protect\rubricalignment\space with an invalid value.%
168 Valid options include l, c, r, cl and cc.\MessageBreak
169 Type X <return> to quit, fix the typo, and rerun LaTeX.}}
172 \newenvironment{rubric}[1]{%
175 \@rightskip\@flushglue\rightskip\@rightskip\leftskip\z@skip}%
177 \rightskip\z@skip\leftskip\@flushglue\parfillskip\z@skip}%
178 \gdef\@beforespace{0pt}%
181 \begin{longtable}{@{}kl@{~}X}
184 \@rubrichead{#1\@continuedname}
186 \noalign{\@rubricmark{#1}}}{%
191 \newcommand\continuedname[1]{\gdef\@continuedname{#1}}
193 \def\header@scale{.5}
194 \newcommand\headerscale[1]{\gdef\header@scale{#1}}
195 \@onlypreamble\headerscale
197 \newlength\headerspace
198 \setlength\headerspace{10pt}
201 \ClassError{curve}{No \protect\leftheader\space given}{%
202 You have called \protect\makeheaders, %
203 but you didn't provide a left header.\MessageBreak
204 Type X <return> to quit, add a call to \protect\lefheader\space %
205 in the preamble of your CV,\MessageBreak
207 \newcommand\leftheader[1]{\gdef\@leftheader{#1}}
208 \@onlypreamble\leftheader
211 \ClassError{curve}{No \protect\rightheader\space given}{%
212 You have called \protect\makeheaders, %
213 but you didn't provide a right header.\MessageBreak
214 Type X <return> to quit, add a call to \protect\rightheader\space %
215 in the preamble of your CV,\MessageBreak
217 \newcommand\rightheader[1]{\gdef\@rightheader{#1}}
218 \@onlypreamble\rightheader
221 \newcommand\photoscale[1]{\gdef\photo@scale{#1}}
222 \@onlypreamble\photoscale
225 \setlength\photosep{10pt}
227 \newcommand\photo[2][l]{%
228 \RequirePackage{graphicx}
229 \strokfalse\strtest{#1}{l}\strtest{#1}{r}\strtest{#1}{c}%
230 \ifstrok\else\ClassError{curve}{Invalid argument to \protect\photo}{%
231 Argument 2 of \protect\photo must be `l', `r' or `c'.}\fi
232 \def\tmp@cmd{\global\let\makeheaders@}
233 \expandafter\tmp@cmd\csname makeheaders@#1\endcsname
234 \gdef\photo@file{#2}}
237 \newlength\photo@width
239 \def\includephoto@t{%
240 \raisebox{.7\baselineskip-\height}{%
241 \includegraphics[width=\photo@width]{\photo@file}}}
243 \def\includephoto@c{%
244 \raisebox{-.5\height}{%
245 \includegraphics[width=\photo@width]{\photo@file}}}
247 \def\includephoto@b{\includegraphics[width=\photo@width]{\photo@file}}
249 \newlength\leftheader@width
250 \newlength\rightheader@width
252 \def\makeheaders@l#1{%
253 \setlength\photo@width{\photo@scale\textwidth}
254 \setlength\leftheader@width{%
255 (\textwidth - \photo@width - \photosep) * \real{\header@scale}}
256 \setlength\rightheader@width{%
257 \textwidth - \photo@width - \photosep - \leftheader@width}
258 \parbox[#1]{\photo@width + \photosep}{\includephoto@\hspace\photosep}%
259 \parbox[#1]{\leftheader@width}{\@leftheader}%
260 \parbox[#1]{\rightheader@width}{\raggedleft\@rightheader}}
262 \def\makeheaders@c#1{%
263 \setlength\photo@width{\photo@scale\textwidth}
264 \setlength\leftheader@width{(\textwidth - \photo@width) * \real{.5}}
265 \setlength\rightheader@width{\leftheader@width}
266 \parbox[#1]{\leftheader@width}{\@leftheader}%
267 \parbox[#1]{\photo@width}{\includephoto@}%
268 \parbox[#1]{\rightheader@width}{\raggedleft\@rightheader}}
270 \def\makeheaders@r#1{%
271 \setlength\photo@width{\photo@scale\textwidth}
272 \setlength\leftheader@width{%
273 (\textwidth - \photo@width - \photosep) * \real{\header@scale}}
274 \setlength\rightheader@width{%
275 \textwidth - \photo@width - \photosep - \leftheader@width}
276 \parbox[#1]{\leftheader@width}{\@leftheader}%
277 \parbox[#1]{\rightheader@width}{\raggedleft\@rightheader}%
278 \parbox[#1]{\photo@width + \photosep}{\hspace\photosep\includephoto@}}
280 \def\makeheaders@#1{%
281 \setlength\leftheader@width{\header@scale\textwidth}%
282 \setlength\rightheader@width{\textwidth - \leftheader@width}%
283 \parbox[#1]{\leftheader@width}{\@leftheader}%
284 \parbox[#1]{\rightheader@width}{\raggedleft\@rightheader}}
286 \newcommand\makeheaders[1][c]{%
287 \strokfalse\strtest{#1}{t}\strtest{#1}{b}\strtest{#1}{c}%
288 \ifstrok\else\ClassError{curve}{Invalid argument to \protect\makeheaders}{%
289 Argument of \protect\makeheaders must be `t', `b' or `c'.}\fi
290 \def\tmp@cmd{\global\let\includephoto@}
291 \expandafter\tmp@cmd\csname includephoto@#1\endcsname
293 \par\vspace\headerspace}
297 \def\@titlefont{\Huge\bfseries}
298 \newcommand\titlefont[1]{\gdef\@titlefont{#1}}
299 \@onlypreamble\titlefont
301 \newlength\titlespace
302 \setlength\titlespace{0pt}
304 \let\@subtitle\@undefined
305 \newcommand\subtitle[1]{\gdef\@subtitle{#1}}
306 \@onlypreamble\subtitle
308 \def\@subtitlefont{\huge\itshape}
309 \newcommand\subtitlefont[1]{\gdef\@subtitlefont{#1}}
310 \@onlypreamble\subtitlefont
312 \newcommand\maketitle{%
315 \ifx\@subtitle\@undefined\else\\\@subtitlefont\@subtitle\fi
320 \newcommand\flavor[1]{\gdef\@flavor{#1}
321 \ifx\@flavor\empty\else\edef\@flavor{.\@flavor}\fi}
323 \DeclareOption{ask}{%
324 \typein[\@flavor]{Please specify a CV flavor (none by default):}
325 \ifx\@flavor\empty\else\edef\@flavor{.\@flavor}\fi}
328 \IfFileExists{#1\@flavor.ltx}{\@iinput{#1\@flavor.ltx}}{%
329 \IfFileExists{#1\@flavor.tex}{\@iinput{#1\@flavor.tex}}{%
330 \IfFileExists{#1.ltx}{\@iinput{#1.ltx}}{%
331 \IfFileExists{#1.tex}{\@iinput{#1.tex}}{%
334 \renewcommand\input{\@ifnextchar\bgroup\@curveinput\@@input}
336 \newcommand\makerubric[1]{\LTXtable{\@almosttextwidth}{#1}}
339 \newcounter{bibcount}
342 \AtBeginDocument{\@ifpackageloaded{bibentry}{\@bibentrytrue}{}}
344 \def\bibliography#1{%
346 \if@bibentry\global\BR@starfalse\fi
347 \immediate\write\@auxout{\string\bibdata{#1}}%
349 \IfFileExists{\jobname.bbl}{\makerubric{\jobname.bbl}}{%
350 \typeout{No file \jobname.bbl.}}}
352 \newcommand\listpubname[1]{\gdef\@listpubname{#1}}
354 \newenvironment{thebibliography}[1]{%
355 \def\@lbibitem[##1]##2{\@sentry[\@biblabel{##1}]%
357 \let\protect\noexpand%
358 \immediate\write\@auxout{\string\bibcite{##2}{##1}}}
361 \def\@bibitem##1{\@sentry[\stepcounter{bibcount}\@biblabel{\thebibcount}]%
363 \immediate\write\@auxout{\string\bibcite{##1}{\thebibcount}}%
366 \renewcommand\bibitem{%
368 \noalign\bgroup\gdef\@beforespace{-\subrubricbeforespace}%
369 \@ifnextchar[\@lbibitem\@bibitem}
370 \begin{rubric}{\@listpubname}
375 \DeclareOption{english}{%
376 \continuedname{~(continued)}
377 \listpubname{List of Publications}}
378 \DeclareOption{french}{%
379 \continuedname{~(suite)}
380 \listpubname{Liste des Publications}}
381 \DeclareOption{francais}{%
382 \ExecuteOptions{french}}
383 \DeclareOption{spanish}{%
384 \continuedname{~(contin\'ua)}
385 \listpubname{Lista de Publicaciones}}
386 \DeclareOption{italian}{%
387 \continuedname{~(continua)}
388 \listpubname{Pubblicazioni}}
389 \DeclareOption{german}{%
390 \continuedname{~(fortgesetzt)}
391 \listpubname{Verzeichnis der Ver\"offentlichungen}}
392 \DeclareOption{ngerman}{%
393 \ExecuteOptions{german}}
394 \DeclareOption{danish}{%
395 \continuedname{~(fortsat)}
396 \listpubname{Udgivelser}}
397 \DeclareOption{dutch}{%
398 \continuedname{~(vervolg)}
399 \listpubname{Publicaties}}
400 \DeclareOption{portuges}{%
401 \continuedname{~(continua\c c\~ao)}
402 \listpubname{Publica\c c\~oes}}
403 \DeclareOption{portuguese}{%
404 \ExecuteOptions{portuges}}
405 \DeclareOption{brazil}{%
406 \ExecuteOptions{portuges}}
407 \DeclareOption{brazilian}{%
408 \ExecuteOptions{portuges}}
410 \DeclareOption{a4paper}{
411 \setlength\paperheight{297mm}
412 \setlength\paperwidth{210mm}}
413 \DeclareOption{a5paper}{
414 \setlength\paperheight{210mm}
415 \setlength\paperwidth{148mm}}
416 \DeclareOption{b5paper}{
417 \setlength\paperheight{250mm}
418 \setlength\paperwidth{176mm}}
419 \DeclareOption{letterpaper}{
420 \setlength\paperheight{11in}
421 \setlength\paperwidth{8.5in}}
422 \DeclareOption{legalpaper}{
423 \setlength\paperheight{14in}
424 \setlength\paperwidth{8.5in}}
425 \DeclareOption{executivepaper}{
426 \setlength\paperheight{10.5in}
427 \setlength\paperwidth{7.25in}}
428 \DeclareOption{landscape}{
429 \setlength\@tempdima{\paperheight}
430 \setlength\paperheight{\paperwidth}
431 \setlength\paperwidth{\@tempdima}}
433 \DeclareOption{10pt}{\def\@ptsize{0}}
434 \DeclareOption{11pt}{\def\@ptsize{1}}
435 \DeclareOption{12pt}{\def\@ptsize{2}}
437 \DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse}
438 \DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue}
440 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
441 \DeclareOption{final}{%
442 \setlength\overfullrule{0pt}
445 \ExecuteOptions{english,letterpaper,10pt,oneside,final}
448 \input{size1\@ptsize.clo}
449 \setlength\parindent{0pt}
450 \setlength\parskip{0pt}
451 \setlength\tabcolsep{10pt}
452 \setlength\arrayrulewidth{.4\p@}
456 \pagenumbering{arabic}
460 \let\@oddfoot\@empty\let\@evenfoot\@empty
461 \def\@evenhead{\thepage\hfil\slshape\leftmark}%
462 \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
463 \let\@mkboth\markboth
464 \def\@rubricmark##1{\markboth{\MakeUppercase{##1}}{}}%
465 \def\@subrubricmark##1{\markright{##1}}%
470 \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
471 \let\@mkboth\markboth
472 \def\@rubricmark##1{\markright{\MakeUppercase{##1}}}%
476 \let\@oddfoot\@empty\let\@evenfoot\@empty
477 \def\@evenhead{\thepage\hfil\slshape\leftmark}%
478 \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
479 \let\@mkboth\@gobbletwo
480 \let\@rubricmark\@gobble
481 \let\@subrubricmark\@gobble
486 %% End of file `curve.cls'.