]> git.donarmstrong.com Git - lib.git/blob - texmf/tex/latex/curve.cls
add a0posterslide class
[lib.git] / texmf / tex / latex / curve.cls
1 %%
2 %% This is file `curve.cls',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% curve.dtx 
8 %% 
9
10
11 %% Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Didier Verna
12
13 %% This file is part of CurVe.
14
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.
22
23 %% CurVe consists of the files listed in the file `README'.
24
25 %% \CharacterTable
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}
41
42 \ProvidesClass{curve}[2005/09/14 v1.10
43                       Curriculum Vitae class for LaTeX2e]
44
45 \RequirePackage{ltxtable}
46 \RequirePackage{calc}
47
48 \newif\ifstrok\strokfalse
49 \def\strtest#1#2{%
50   \def\@strone{#1}\def\@strtwo{#2}%
51   \ifstrok\else\ifx\@strone\@strtwo\stroktrue\fi\fi}
52
53 \gdef\@nextentry{}
54
55 \def\@keyfont{}
56 \newcommand\keyfont[1]{\gdef\@keyfont{#1}}
57
58 \newcolumntype{k}{>{\@keyfont}l}
59 \newcommand\keyalignment[1]{%
60   \strokfalse\strtest{#1}{l}\strtest{#1}{r}\strtest{#1}{c}%
61   \ifstrok\else%
62     \ClassError{curve}{Invalid key alignment}{%
63       You have called \protect\keyalignment\space with an invalid value.%
64       \MessageBreak
65       Valid options include l, c, and r.\MessageBreak
66       Type X <return> to quit, fix the typo, and rerun LaTeX.}%
67   \fi
68   \newcolumntype{k}{>{\@keyfont}#1}
69 }
70
71 \def\@prefix{\textbullet}
72 \newcommand\prefix[1]{\gdef\@prefix{#1}}
73
74 \def\@maybekey#1{%
75   \def\@newkey{#1}%
76   \ifx\@previouskey\@newkey\else%
77     #1\gdef\@previouskey{#1}%
78   \fi}
79
80 \def\@key#1{#1}
81 \DeclareOption{skipsamekey}{\let\@key\@maybekey}
82
83 \newcommand\@entry[2][]{%
84   \gdef\@nextentry{}\egroup% end of \noalign opened in \entry.
85   \@key{#1}&\@prefix&#2\\}
86
87 \newcommand\@sentry[1][]{%
88   \gdef\@nextentry{\\}\egroup% end of \noalign opened in \entry.
89   \@key{#1}&\@prefix&}
90
91 \newcommand\entry{%
92   \@nextentry
93   \noalign\bgroup\gdef\@beforespace{-\subrubricbeforespace}%
94   \@ifstar{\@sentry}{\@entry}}
95
96 \def\@subrubricfont{\Large\itshape}
97 \newcommand\subrubricfont[1]{\gdef\@subrubricfont{#1}}
98
99 \newlength\subrubricbeforespace
100 \setlength\subrubricbeforespace{10pt}
101
102 \newlength\subrubricspace
103 \setlength\subrubricspace{5pt}
104
105 \let\@subrubricmark\@gobble
106
107 \def\@@subrubric#1{%
108   \parbox{0cm}{%
109     \raisebox{\@beforespace}{\@subrubricfont#1}%
110     \par\vspace\subrubricspace}%
111   \@subrubricmark{#1}}
112
113
114 \def\@clcccolsep{\hspace{\tabcolsep}\ifx\@prefix\@empty~\fi}
115
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}}}
121
122 \let\@subrubric\@subrubric@cl
123
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.%
130       \MessageBreak
131       Valid options include l, c, r, cl and cc.\MessageBreak
132       Type X <return> to quit, fix the typo, and rerun LaTeX.}}
133 }
134
135 \newcommand\subrubric[1]{%
136   \@nextentry
137   \noalign{\gdef\@nextentry{}}%
138   \@subrubric{#1}\\*}
139
140 \newlength{\@almosttextwidth}
141 \AtBeginDocument{\setlength\@almosttextwidth{\textwidth-\hfuzz}}
142
143 \def\@rubricfont{\Large\bfseries}
144 \newcommand\rubricfont[1]{\gdef\@rubricfont{#1}}
145
146 \newlength\rubricspace
147 \setlength\rubricspace{10pt}
148
149 \let\@rubricmark\@gobble
150
151 \def\@@rubrichead#1{\@rubricfont#1\par\vspace\rubricspace}
152
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}}\\}
158
159 \let\@rubrichead\@rubrichead@c
160
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.%
167       \MessageBreak
168       Valid options include l, c, r, cl and cc.\MessageBreak
169       Type X <return> to quit, fix the typo, and rerun LaTeX.}}
170 }
171
172 \newenvironment{rubric}[1]{%
173   %% \begin{rubric}
174   \def\raggedright{%
175     \@rightskip\@flushglue\rightskip\@rightskip\leftskip\z@skip}%
176   \def\raggedleft{%
177     \rightskip\z@skip\leftskip\@flushglue\parfillskip\z@skip}%
178   \gdef\@beforespace{0pt}%
179   \gdef\@nextentry{}%
180   \gdef\@previouskey{}
181   \begin{longtable}{@{}kl@{~}X}
182     \@rubrichead{#1}
183     \endfirsthead
184     \@rubrichead{#1\@continuedname}
185     \endhead
186     \noalign{\@rubricmark{#1}}}{%
187     %% \end{rubric}
188     \@nextentry
189   \end{longtable}}
190
191 \newcommand\continuedname[1]{\gdef\@continuedname{#1}}
192
193 \def\header@scale{.5}
194 \newcommand\headerscale[1]{\gdef\header@scale{#1}}
195 \@onlypreamble\headerscale
196
197 \newlength\headerspace
198 \setlength\headerspace{10pt}
199
200 \def\@leftheader{%
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
206     and rerun LaTeX.}}
207 \newcommand\leftheader[1]{\gdef\@leftheader{#1}}
208 \@onlypreamble\leftheader
209
210 \def\@rightheader{%
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
216     and rerun LaTeX.}}
217 \newcommand\rightheader[1]{\gdef\@rightheader{#1}}
218 \@onlypreamble\rightheader
219
220 \def\photo@scale{.1}
221 \newcommand\photoscale[1]{\gdef\photo@scale{#1}}
222 \@onlypreamble\photoscale
223
224 \newlength\photosep
225 \setlength\photosep{10pt}
226
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}}
235 \@onlypreamble\photo
236
237 \newlength\photo@width
238
239 \def\includephoto@t{%
240   \raisebox{.7\baselineskip-\height}{%
241     \includegraphics[width=\photo@width]{\photo@file}}}
242
243 \def\includephoto@c{%
244   \raisebox{-.5\height}{%
245     \includegraphics[width=\photo@width]{\photo@file}}}
246
247 \def\includephoto@b{\includegraphics[width=\photo@width]{\photo@file}}
248
249 \newlength\leftheader@width
250 \newlength\rightheader@width
251
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}}
261
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}}
269
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@}}
279
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}}
285
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
292   \makeheaders@{#1}%
293   \par\vspace\headerspace}
294
295 \@onlypreamble\title
296
297 \def\@titlefont{\Huge\bfseries}
298 \newcommand\titlefont[1]{\gdef\@titlefont{#1}}
299 \@onlypreamble\titlefont
300
301 \newlength\titlespace
302 \setlength\titlespace{0pt}
303
304 \let\@subtitle\@undefined
305 \newcommand\subtitle[1]{\gdef\@subtitle{#1}}
306 \@onlypreamble\subtitle
307
308 \def\@subtitlefont{\huge\itshape}
309 \newcommand\subtitlefont[1]{\gdef\@subtitlefont{#1}}
310 \@onlypreamble\subtitlefont
311
312 \newcommand\maketitle{%
313   \begin{center}
314     {\@titlefont\@title}
315     \ifx\@subtitle\@undefined\else\\\@subtitlefont\@subtitle\fi
316   \end{center}
317   \vspace\titlespace}
318
319 \let\@flavor\empty
320 \newcommand\flavor[1]{\gdef\@flavor{#1}
321   \ifx\@flavor\empty\else\edef\@flavor{.\@flavor}\fi}
322
323 \DeclareOption{ask}{%
324   \typein[\@flavor]{Please specify a CV flavor (none by default):}
325   \ifx\@flavor\empty\else\edef\@flavor{.\@flavor}\fi}
326
327 \def\@curveinput#1{%
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}}{%
332           \@iinput{#1}}}}}}
333
334 \renewcommand\input{\@ifnextchar\bgroup\@curveinput\@@input}
335
336 \newcommand\makerubric[1]{\LTXtable{\@almosttextwidth}{#1}}
337
338 \let\newblock\par
339 \newcounter{bibcount}
340
341 \newif\if@bibentry
342 \AtBeginDocument{\@ifpackageloaded{bibentry}{\@bibentrytrue}{}}
343
344 \def\bibliography#1{%
345   \if@filesw
346     \if@bibentry\global\BR@starfalse\fi
347     \immediate\write\@auxout{\string\bibdata{#1}}%
348   \fi
349   \IfFileExists{\jobname.bbl}{\makerubric{\jobname.bbl}}{%
350     \typeout{No file \jobname.bbl.}}}
351
352 \newcommand\listpubname[1]{\gdef\@listpubname{#1}}
353
354 \newenvironment{thebibliography}[1]{%
355   \def\@lbibitem[##1]##2{\@sentry[\@biblabel{##1}]%
356     \if@filesw{%
357       \let\protect\noexpand%
358       \immediate\write\@auxout{\string\bibcite{##2}{##1}}}
359     \fi%
360     \ignorespaces}
361   \def\@bibitem##1{\@sentry[\stepcounter{bibcount}\@biblabel{\thebibcount}]%
362     \if@filesw%
363     \immediate\write\@auxout{\string\bibcite{##1}{\thebibcount}}%
364     \fi%
365     \ignorespaces}
366   \renewcommand\bibitem{%
367     \@nextentry
368     \noalign\bgroup\gdef\@beforespace{-\subrubricbeforespace}%
369     \@ifnextchar[\@lbibitem\@bibitem}
370   \begin{rubric}{\@listpubname}
371   }{%
372   \end{rubric}
373 }
374
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}}
409
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}}
432
433 \DeclareOption{10pt}{\def\@ptsize{0}}
434 \DeclareOption{11pt}{\def\@ptsize{1}}
435 \DeclareOption{12pt}{\def\@ptsize{2}}
436
437 \DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse}
438 \DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue}
439
440 \DeclareOption{draft}{\setlength\overfullrule{5pt}}
441 \DeclareOption{final}{%
442   \setlength\overfullrule{0pt}
443   \setlongtables}
444
445 \ExecuteOptions{english,letterpaper,10pt,oneside,final}
446 \ProcessOptions
447
448 \input{size1\@ptsize.clo}
449 \setlength\parindent{0pt}
450 \setlength\parskip{0pt}
451 \setlength\tabcolsep{10pt}
452 \setlength\arrayrulewidth{.4\p@}
453 \raggedbottom
454 \onecolumn
455 \pagestyle{empty}
456 \pagenumbering{arabic}
457
458 \if@twoside
459   \def\ps@headings{%
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}}%
466   }
467 \else
468   \def\ps@headings{%
469     \let\@oddfoot\@empty
470     \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
471     \let\@mkboth\markboth
472     \def\@rubricmark##1{\markright{\MakeUppercase{##1}}}%
473   }
474 \fi
475 \def\ps@myheadings{%
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
482 }
483
484 \endinput
485 %%
486 %% End of file `curve.cls'.