
sawine@0: %% start of file `moderncv.cls'.
sawine@0: %% Copyright 2006-2008 Xavier Danaux (xdanaux@gmail.com).
sawine@0: %
sawine@0: % This work may be distributed and/or modified under the
sawine@0: % conditions of the LaTeX Project Public License version 1.3c,
sawine@0: % available at http://www.latex-project.org/lppl/.
sawine@0: 
sawine@0: 
sawine@0: %-------------------------------------------------------------------------------
sawine@0: %                identification
sawine@0: %-------------------------------------------------------------------------------
sawine@0: \NeedsTeXFormat{LaTeX2e}
sawine@0: \ProvidesClass{moderncv}[2008/06/17 v0.7 modern curriculum vitae document class]
sawine@0: 
sawine@0: 
sawine@0: %-------------------------------------------------------------------------------
sawine@0: %                debugging
sawine@0: %-------------------------------------------------------------------------------
sawine@0: \newif\if@DEBUG\@DEBUGfalse
sawine@0: 
sawine@0: 
sawine@0: %-------------------------------------------------------------------------------
sawine@0: %                class options
sawine@0: %
sawine@0: % (need to be done before the external package loading, for example because
sawine@0: % we need \paperwidth, \paperheight and \@ptsize to be defined before loading
sawine@0: % geometry and fancyhdr)
sawine@0: %-------------------------------------------------------------------------------
sawine@0: % paper size option
sawine@0: \DeclareOption{a4paper}{
sawine@0:   \setlength\paperheight{297mm}
sawine@0:   \setlength\paperwidth{210mm}}
sawine@0: \DeclareOption{a5paper}{
sawine@0:   \setlength\paperheight{210mm}
sawine@0:   \setlength\paperwidth{148mm}}
sawine@0: \DeclareOption{b5paper}{
sawine@0:   \setlength\paperheight{250mm}
sawine@0:   \setlength\paperwidth{176mm}}
sawine@0: \DeclareOption{letterpaper}{
sawine@0:   \setlength\paperheight{11in}
sawine@0:   \setlength\paperwidth{8.5in}}
sawine@0: \DeclareOption{legalpaper}{
sawine@0:   \setlength\paperheight{14in}
sawine@0:   \setlength\paperwidth{8.5in}}
sawine@0: \DeclareOption{executivepaper}{
sawine@0:   \setlength\paperheight{10.5in}
sawine@0:   \setlength\paperwidth{7.25in}}
sawine@0: \DeclareOption{landscape}{
sawine@0:   \setlength\@tempdima{\paperheight}
sawine@0:   \setlength\paperheight{\paperwidth}
sawine@0:   \setlength\paperwidth{\@tempdima}}
sawine@0: 
sawine@0: % font size options
sawine@0: \newcommand\@ptsize{}
sawine@0: \DeclareOption{10pt}{\renewcommand\@ptsize{0}}
sawine@0: \DeclareOption{11pt}{\renewcommand\@ptsize{1}}
sawine@0: \DeclareOption{12pt}{\renewcommand\@ptsize{2}}
sawine@0: 
sawine@0: % draft/final option
sawine@0: \DeclareOption{draft}{\setlength\overfullrule{5pt}}
sawine@0: \DeclareOption{final}{\setlength\overfullrule{0pt}}
sawine@0: 
sawine@0: % nolmodern option
sawine@0: \newif\if@lmodern\@lmoderntrue
sawine@0: \DeclareOption{nolmodern}{\@lmodernfalse}
sawine@0: 
sawine@0: % nocolor option
sawine@0: \newif\if@color\@colortrue
sawine@0: \DeclareOption{nocolor}{\@colorfalse}
sawine@0: 
sawine@0: % execute default options
sawine@0: \ExecuteOptions{a4paper,11pt,color,final}
sawine@0: 
sawine@0: % process given options
sawine@0: \ProcessOptions\relax
sawine@0: \input{size1\@ptsize.clo}
sawine@0: 
sawine@0: 
sawine@0: %-------------------------------------------------------------------------------
sawine@0: %                required packages
sawine@0: %-------------------------------------------------------------------------------
sawine@0: % ifthen package
sawine@0: \RequirePackage{ifthen}
sawine@0: 
sawine@0: % ifpdf package
sawine@0: \RequirePackage{ifpdf}
sawine@0: 
sawine@0: % color package
sawine@0: \ifpdf
sawine@0:   \RequirePackage[pdftex]{color}
sawine@0: \else
sawine@0:   \RequirePackage[dvips]{color}
sawine@0: \fi
sawine@0: 
sawine@0: % fontenc package
sawine@0: \RequirePackage[T1]{fontenc}
sawine@0: 
sawine@0: % scalable Computer Modern fonts
sawine@0: %\usepackage{type1cm}
sawine@0: 
sawine@0: % latin modern fonts
sawine@0: \AtEndOfClass{%
sawine@0:   \if@lmodern
sawine@0:     \RequirePackage{lmodern}\fi}
sawine@0: 
sawine@0: % symbols like \Telefon, \Mobilefone, \Letter and \Email
sawine@0: \RequirePackage{marvosym}
sawine@0: 
sawine@0: % extended characters of T1 in .ps + other guillemets
sawine@0: %\RequirePackage{ae,aecompl,aeguill}
sawine@0: 
sawine@0: % page geometry
sawine@0: \addtolength{\oddsidemargin}{-54pt}
sawine@0: \addtolength{\textwidth}{109pt}
sawine@0: \addtolength{\topmargin}{-70pt}
sawine@0: \addtolength{\textheight}{122pt}
sawine@0: \addtolength{\marginparsep}{-5pt}
sawine@0: \addtolength{\marginparwidth}{-10pt}
sawine@0: 
sawine@0: % hyperrefs
sawine@0: \RequirePackage{url}
sawine@0: \ifpdf
sawine@0:   \RequirePackage[pdftex,]{hyperref}
sawine@0: \else
sawine@0:   \RequirePackage[dvips]{hyperref}\fi
sawine@0: \hypersetup{%
sawine@0:   breaklinks,
sawine@0:   baseurl       = http://,%
sawine@0:   pdfborder     = 0 0 0,%
sawine@0:   pdfpagemode   = UseNone,%
sawine@0: %  pdfstartview  = XYZ,%
sawine@0:   pdfstartpage  = 1,%
sawine@0:   pdfcreator    = \LaTeX{} with `moderncv' package,%
sawine@0:   pdfproducer   = \LaTeX}
sawine@0: \AtEndOfClass{%
sawine@0:   \AtBeginDocument{%
sawine@0:     \hypersetup{%
sawine@0:       pdfauthor     = \@firstname~\@familyname,%
sawine@0:       pdftitle      = \@title,%
sawine@0:       pdfsubject    = \@firstname~\@familyname,%
sawine@0:       pdfkeywords   = \@firstname~\@familyname{} curriculum vit\ae{}}}}
sawine@0: \urlstyle{tt}
sawine@0: 
sawine@0: % graphics
sawine@0: \ifpdf
sawine@0:   \RequirePackage[pdftex]{graphicx}
sawine@0: \else
sawine@0:   \RequirePackage[dvips]{graphicx}\fi
sawine@0: 
sawine@0: % headers and footers
sawine@0: \usepackage{fancyhdr}
sawine@0: \fancypagestyle{plain}{%
sawine@0:   \renewcommand{\headrulewidth}{0pt}
sawine@0:   \renewcommand{\footrulewidth}{0pt}
sawine@0:   \fancyhf{}}
sawine@0: \pagestyle{plain}
sawine@0: 
sawine@0: % compatibility package with older versions of moderncv
sawine@0: \RequirePackageWithOptions{moderncvcompatibility}
sawine@0: 
sawine@0: 
sawine@0: %-------------------------------------------------------------------------------
sawine@0: %                class definition
sawine@0: %-------------------------------------------------------------------------------
sawine@0: % minimal base settings
sawine@0: \setlength\lineskip{1\p@}
sawine@0: \setlength\normallineskip{1\p@}
sawine@0: \renewcommand\baselinestretch{}
sawine@0: \setlength{\parindent}{0pt}
sawine@0: \setlength{\parskip}{0pt}
sawine@0: \setlength\columnsep{10\p@}
sawine@0: \setlength\columnseprule{0\p@}
sawine@0: \pagestyle{empty}
sawine@0: \pagenumbering{arabic}
sawine@0: \raggedbottom
sawine@0: \onecolumn
sawine@0: 
sawine@0: 
sawine@0: %-------------------------------------------------------------------------------
sawine@0: %                style commands definitions
sawine@0: %-------------------------------------------------------------------------------
sawine@0: % symbols used 
sawine@0: \providecommand*{\listitemsymbol}{\textbullet}
sawine@0: \providecommand*{\addresssymbol}{}
sawine@0: \providecommand*{\mobilesymbol}{\Mobilefone}
sawine@0: \providecommand*{\phonesymbol}{\Telefon}
sawine@0: \providecommand*{\faxsymbol}{\FAX}
sawine@0: \providecommand*{\emailsymbol}{\Letter}
sawine@0: 
sawine@0: % colors
sawine@0: \definecolor{firstnamecolor}{rgb}{0,0,0}
sawine@0: \definecolor{familynamecolor}{rgb}{0,0,0}
sawine@0: \definecolor{titlecolor}{rgb}{0,0,0}
sawine@0: \definecolor{addresscolor}{rgb}{0,0,0}
sawine@0: \definecolor{quotecolor}{rgb}{0,0,0}
sawine@0: \definecolor{sectionrectanglecolor}{rgb}{0,0,0}
sawine@0: \definecolor{sectiontitlecolor}{rgb}{0,0,0}
sawine@0: \definecolor{subsectioncolor}{rgb}{0,0,0}
sawine@0: \definecolor{hintcolor}{rgb}{0,0,0}
sawine@0: 
sawine@0: % fonts
sawine@0: \providecommand*{\firstnamefont}{}
sawine@0: \providecommand*{\familynamefont}{}
sawine@0: \providecommand*{\titlefont}{}
sawine@0: \providecommand*{\addressfont}{}
sawine@0: \providecommand*{\quotefont}{}
sawine@0: \providecommand*{\sectionfont}{}
sawine@0: \providecommand*{\subsectionfont}{}
sawine@0: \providecommand*{\hintfont}{\small\sffamily}
sawine@0: 
sawine@0: % styles
sawine@0: \providecommand*{\firstnamestyle}[1]{{\firstnamefont\color{firstnamecolor}#1}}
sawine@0: \providecommand*{\familynamestyle}[1]{{\familynamefont\color{familynamecolor}#1}}
sawine@0: \providecommand*{\titlestyle}[1]{{\titlefont\color{titlecolor}#1}}
sawine@0: \providecommand*{\addresstyle}[1]{{\addressfont\color{addresscolor}#1}}
sawine@0: \providecommand*{\quotestyle}[1]{{\quotefont\color{quotecolor}#1}}
sawine@0: \providecommand*{\sectionstyle}[1]{{\sectionfont\color{sectiontitlecolor}#1}}
sawine@0: \providecommand*{\subsectionstyle}[1]{{\subsectionfont\color{subsectioncolor}#1}}
sawine@0: \providecommand*{\hintstyle}[1]{{\hintfont\color{hintcolor}#1}}
sawine@0: 
sawine@0: % themes: casual (default), classic, ...
sawine@0: \newcommand*{\moderncvtheme}[2][]{
sawine@0:   \def\@moderncvtheme{#2}
sawine@0:   \def\@moderncvthemeoptions{#1}}
sawine@0: \moderncvtheme{casual}   % default theme
sawine@0: \AtBeginDocument{\RequirePackage[\@moderncvthemeoptions]{moderncvtheme\@moderncvtheme}}
sawine@0: 
sawine@0: 
sawine@0: %-------------------------------------------------------------------------------
sawine@0: %                structure commands definitions
sawine@0: %-------------------------------------------------------------------------------
sawine@0: \newcommand*{\firstname}[1]{\def\@firstname{#1}}
sawine@0: \newcommand*{\familyname}[1]{\def\@familyname{#1}}
sawine@0: \renewcommand*{\title}[1]{\def\@title{#1}}
sawine@0: \newcommand*{\address}[2]{\def\@addressstreet{#1}\def\@addresscity{#2}}
sawine@0: \newcommand*{\mobile}[1]{\def\@mobile{#1}}
sawine@0: \newcommand*{\phone}[1]{\def\@phone{#1}}
sawine@0: \renewcommand*{\fax}[1]{\def\@fax{#1}}
sawine@0: \newcommand*{\email}[1]{\def\@email{#1}}
sawine@0: \newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}}
sawine@0: \def\@photowidth{0pt}
sawine@0: \newcommand*{\photo}[2][64pt]{\def\@photowidth{#1}\def\@photo{#2}}
sawine@0: \newcommand*{\quote}[1]{\def\@quote{#1}}
sawine@0: 
sawine@0: % length used by the moderncv layout
sawine@0: % quote length
sawine@0: \newlength{\quotewidth}
sawine@0: % section lengths
sawine@0: \newlength{\hintscolumnwidth}
sawine@0: \newlength{\separatorcolumnwidth}
sawine@0: \setlength{\separatorcolumnwidth}{0.025\textwidth}
sawine@0: \newlength{\maincolumnwidth}
sawine@0: % doubleitem lengths
sawine@0: \newlength{\doubleitemmaincolumnwidth}
sawine@0: % listitem lengths
sawine@0: \newlength{\listitemsymbolwidth}
sawine@0: \settowidth{\listitemsymbolwidth}{\listitemsymbol{}~}
sawine@0: \newlength{\listitemmaincolumnwidth}
sawine@0: % listdoubleitem lengths
sawine@0: \newlength{\listdoubleitemmaincolumnwidth}
sawine@0: % recompute all the lengths that depends on the text width
sawine@0: \newcommand*{\recomputethemelengths}{}
sawine@0: \newcommand*{\recomputelengths}{%
sawine@0:   \setlength{\quotewidth}{0.65\textwidth}%
sawine@0:   % main lenghts
sawine@0:   \setlength{\maincolumnwidth}{\textwidth}%
sawine@0:   \addtolength{\maincolumnwidth}{-\separatorcolumnwidth}%
sawine@0:   \addtolength{\maincolumnwidth}{-\hintscolumnwidth}%
sawine@0:   % listitem lengths
sawine@0:   \setlength{\listitemmaincolumnwidth}{\maincolumnwidth}%
sawine@0:   \addtolength{\listitemmaincolumnwidth}{-\listitemsymbolwidth}%
sawine@0:   % doubleitem lengths
sawine@0:   \setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth}%
sawine@0:   \addtolength{\doubleitemmaincolumnwidth}{-\hintscolumnwidth}%
sawine@0:   \addtolength{\doubleitemmaincolumnwidth}{-\separatorcolumnwidth}%
sawine@0:   \setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}%
sawine@0:   % listdoubleitem lengths
sawine@0:   \setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth}%
sawine@0:   \addtolength{\listdoubleitemmaincolumnwidth}{-\listitemsymbolwidth}%
sawine@0:   \setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}%
sawine@0:   % fancyhdr lengths
sawine@0:   \renewcommand{\headwidth}{\textwidth}%
sawine@0:   \recomputethemelengths}
sawine@0: \setlength{\hintscolumnwidth}{0.15\textwidth}
sawine@0: \recomputelengths
sawine@0: 
sawine@0: % makes the cv title
sawine@0: \title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title
sawine@0: \renewcommand*{\maketitle}{}%
sawine@0: 
sawine@0: % draws a colored rectangle
sawine@0: % usage: \colorrule[optional height]{width}
sawine@0: %\newcommand*{\colorrule}[2][1ex]{{\color{sectionrectanglecolor}{\rule{#2}{#1}}}}
sawine@0: 
sawine@0: % usage: \section{<title>}
sawine@0: \newcommand*{\section}[1]{%
sawine@0: 	\vspace*{2.5ex \@plus 1ex \@minus .2ex}%
sawine@0:   \phantomsection{}% reset the anchor for hyperrefs
sawine@0:   \addcontentsline{toc}{part}{#1}%
sawine@0:   \parbox[m]{\hintscolumnwidth}{\raggedleft\hintfont{\color{sectionrectanglecolor}\rule{\hintscolumnwidth}{1ex}}}%
sawine@0:   \hspace{\separatorcolumnwidth}%
sawine@0:   \parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}\\[1ex]}
sawine@0: %  \cvline[1ex]{\color{sectionrectanglecolor}\rule[0]{\hintscolumnwidth}{1ex}}{\sectionstyle{#1}}}% gives bad alignment of rectangle; too bad m{width} columns seem not to work as a valid column definition for tabular environments
sawine@0: 
sawine@0: % usage: \subsection{title}
sawine@0: \newcommand*{\subsection}[1]{%
sawine@0:   \cvline[0.45em]{}{\subsectionstyle{#1}}}
sawine@0: 
sawine@0: % usage: \cvline{margintext}{linetext}
sawine@0: \newcommand*{\cvline}[3][.25em]{%
sawine@0:   \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
sawine@0:  	  \raggedleft\hintfont{#2} &{#3}%
sawine@0:   \end{tabular}\\[#1]}
sawine@0: 
sawine@0: % usage: \cvdoubleitem{subtitle}{text}{subtitle}{text}
sawine@0: \newcommand*{\cvdoubleitem}[4]{%
sawine@0:  \cvline{#1}{\begin{minipage}[t]{\doubleitemmaincolumnwidth}#2\end{minipage}%
sawine@0:  \hfill%
sawine@0:  \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#3}\end{minipage}\hspace*{\separatorcolumnwidth}\begin{minipage}[t]{\doubleitemmaincolumnwidth}#4\end{minipage}}}
sawine@0: 
sawine@0: % usage: \cvlistitem[symbol]{point1}
sawine@0: \newcommand*{\cvlistitem}[2][\listitemsymbol{}]{%
sawine@0:   \cvline[0pt]{}{#1~\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
sawine@0: 
sawine@0: % usage: \cvlistdoubleitem[symbol]{point1}{point2}
sawine@0: \newcommand*{\cvlistdoubleitem}[3][\listitemsymbol{}]{%
sawine@0:   \cvline[0pt]{}{#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#2\end{minipage}%
sawine@0:   \hfill%
sawine@0:   \ifthenelse{\equal{#3}{}}%
sawine@0:     {}%
sawine@0:     {#1~\begin{minipage}[t]{\listdoubleitemmaincolumnwidth}#3\end{minipage}}}}
sawine@0: 
sawine@0: % usage: \cventry{years}{degree/job title}{institution/employer}{localization}{optionnal: grade/...}{optional: comment/job description}
sawine@0: \newcommand*{\cventry}[6]{%
sawine@0:   \cvline{#1}{%
sawine@0:     {\bfseries#2}%
sawine@0:     \ifx#3\else{, {\slshape#3}}\fi%
sawine@0:     \ifx#4\else{, #4}\fi%
sawine@0:     \ifx#5\else{, #5}\fi%
sawine@0:     .%
sawine@0:     \ifx#6\else{\newline{}\begin{minipage}[t]{\linewidth}\small#6\end{minipage}}\fi
sawine@0:     }}%
sawine@0: 
sawine@0: % usage (inside 'language' cvsection environment): \cvlanguage{name}{level}{comment}
sawine@0: \newcommand*{\cvlanguage}[3]{%
sawine@0:   \cvline{#1}{\begin{minipage}[t]{.225\maincolumnwidth}\textbf{#2}\end{minipage}\hfill\begin{minipage}[t]{0.725\maincolumnwidth}\raggedleft\footnotesize\itshape #3\end{minipage}}}
sawine@0: 
sawine@0: % usage (inside 'computer skills' cvsection environment): \cvcomputer{category}{programs}{category}{programs}
sawine@0: \newcommand*{\cvcomputer}[4]{%
sawine@0:   \cvdoubleitem{#1}{\small#2}{#3}{\small#4}}
sawine@0: 
sawine@0: % usage: \link[optional text]{link}
sawine@0: \newcommand*{\link}[2][]{%
sawine@0:   \ifthenelse{\equal{#1}{}}%
sawine@0:     {\href{#2}{#2}}%
sawine@0:     {\href{#2}{#1}}}
sawine@0: 
sawine@0: % usage: \httplink[optional text]{link}
sawine@0: \newcommand*{\httplink}[2][]{%
sawine@0:   \ifthenelse{\equal{#1}{}}%
sawine@0:     {\href{http://#2}{#2}}%
sawine@0:     {\href{http://#2}{#1}}}
sawine@0: 
sawine@0: % usage: \emaillink[optional text]{link}
sawine@0: \newcommand*{\emaillink}[2][]{%
sawine@0:   \ifthenelse{\equal{#1}{}}%
sawine@0:     {\href{mailto:#2}{#2}}%
sawine@0:     {\href{mailto:#2}{#1}}}
sawine@0: 
sawine@0: % usage: \nopagenumbers{}
sawine@0: \newif\if@displaypagenumbers\@displaypagenumberstrue
sawine@0: \newcommand*{\nopagenumbers}{\@displaypagenumbersfalse}
sawine@0: \AtBeginDocument{%
sawine@0:   \if@displaypagenumbers%
sawine@0:     \@ifundefined{r@lastpage}{}{%
sawine@0:       \ifthenelse{\pageref{lastpage} > 1}{%
sawine@0:       \fancypagestyle{plain}{%
sawine@0:         \fancyfoot[r]{\addressfont\color{quotecolor}\footnotesize\thepage/\pageref{lastpage}}}%
sawine@0:       \pagestyle{plain}}{}}%
sawine@0:   \AtEndDocument{\label{lastpage}}%
sawine@0:   \fi}
sawine@0: 
sawine@0: % thebibliography environment, for use with BibTeX
sawine@0: \newcommand{\refname}{Publications}
sawine@0: \newlength{\bibindent}
sawine@0: \setlength{\bibindent}{1.5em}
sawine@0: % bibliography item label
sawine@0: \newcommand*{\bibliographyitemlabel}{}% use \@biblabel{\arabic{enumiv}} for BibTeX labels
sawine@0: \newenvironment{thebibliography}[1]%
sawine@0:   {%
sawine@0:     \section{\refname}%
sawine@0: %    \vspace*{-0.65em}%
sawine@0:     \small%
sawine@0:     \begin{list}{\bibliographyitemlabel}%
sawine@0:       {%
sawine@0:         \setlength{\topsep}{0pt}%
sawine@0:         \setlength{\labelwidth}{\hintscolumnwidth}%
sawine@0:         \setlength{\labelsep}{\separatorcolumnwidth}%
sawine@0:         \leftmargin\labelwidth%
sawine@0:         \advance\leftmargin\labelsep%
sawine@0:         \@openbib@code%
sawine@0:         \usecounter{enumiv}%
sawine@0:         \let\p@enumiv\@empty%
sawine@0:         \renewcommand\theenumiv{\@arabic\c@enumiv}}%
sawine@0:         \sloppy\clubpenalty4000\widowpenalty4000%
sawine@0: %        \sfcode`\.\@m%
sawine@0: %        \sfcode `\=1000\relax%
sawine@0:   }%
sawine@0:   {%
sawine@0:     \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
sawine@0:     \end{list}%
sawine@0:   }
sawine@0: \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
sawine@0: \let\@openbib@code\@empty
sawine@0: 
sawine@0: % the classical \today definition
sawine@0: \def\today{\ifcase\month\or
sawine@0:   January\or February\or March\or April\or May\or June\or
sawine@0:   July\or August\or September\or October\or November\or December\fi
sawine@0:   \space\number\day, \number\year}
sawine@0: 
sawine@0: 
sawine@0: \endinput
sawine@0: 
sawine@0: 
sawine@0: %% end of file `moderncv.cls'.




