%% start of file `moderncv.cls'. %% Copyright 2006-2010 Xavier Danaux (xdanaux@gmail.com). % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License version 1.3c, % available at http://www.latex-project.org/lppl/. %------------------------------------------------------------------------------- % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} \ProvidesClass{moderncv}[2010/08/03 v0.12 modern curriculum vitae document class] %------------------------------------------------------------------------------- % debugging %------------------------------------------------------------------------------- \newif\if@DEBUG\@DEBUGfalse %------------------------------------------------------------------------------- % class options % % (need to be done before the external package loading, for example because % we need \paperwidth, \paperheight and \@ptsize to be defined before loading % geometry and fancyhdr) %------------------------------------------------------------------------------- % paper size option \DeclareOption{a4paper}{ \setlength\paperheight{297mm} \setlength\paperwidth{210mm}} \DeclareOption{a5paper}{ \setlength\paperheight{210mm} \setlength\paperwidth{148mm}} \DeclareOption{b5paper}{ \setlength\paperheight{250mm} \setlength\paperwidth{176mm}} \DeclareOption{letterpaper}{ \setlength\paperheight{11in} \setlength\paperwidth{8.5in}} \DeclareOption{legalpaper}{ \setlength\paperheight{14in} \setlength\paperwidth{8.5in}} \DeclareOption{executivepaper}{ \setlength\paperheight{10.5in} \setlength\paperwidth{7.25in}} \DeclareOption{landscape}{ \setlength\@tempdima{\paperheight} \setlength\paperheight{\paperwidth} \setlength\paperwidth{\@tempdima}} % font size options \newcommand\@ptsize{} \DeclareOption{10pt}{\renewcommand\@ptsize{0}} \DeclareOption{11pt}{\renewcommand\@ptsize{1}} \DeclareOption{12pt}{\renewcommand\@ptsize{2}} % draft/final option \DeclareOption{draft}{\setlength\overfullrule{5pt}} \DeclareOption{final}{\setlength\overfullrule{0pt}} % nolmodern option \newif\if@lmodern\@lmoderntrue \DeclareOption{nolmodern}{\@lmodernfalse} % nocolor option \newif\if@color\@colortrue \DeclareOption{nocolor}{\@colorfalse} % CJK option %\newif\if@CJK\@CJKfalse %\DeclareOption{CJK}{\@CJKtrue} % execute default options \ExecuteOptions{a4paper,10pt,color,final} % process given options \ProcessOptions\relax \input{size1\@ptsize.clo} %------------------------------------------------------------------------------- % required packages %------------------------------------------------------------------------------- % \AtEndPreamble hook (loading tetoolbox instead of defining the macro, as to avoid incompatibilities with etoolbox (and packages relying on it) defining the macro too) \RequirePackage{etoolbox} %\let\@endpreamblehook\@empty %\def\AtEndPreamble{\g@addto@macro\@endpreamblehook} %\let\moderncv@document\document %\def\document{\endgroup\@endpreamblehook\begingroup\moderncv@document} % if... then... else... constructs \RequirePackage{ifthen} % latex vs pdflatex vs xelatex vs luatex compilation %\RequirePackage{ifpdf} % color \RequirePackage{color} % font encoding \RequirePackage[T1]{fontenc} % scalable Computer Modern fonts %\usepackage{type1cm} % latin modern fonts \if@lmodern \RequirePackage{lmodern}\fi % symbols like \Telefon, \Mobilefone, \Letter and \Email \RequirePackage{marvosym} % extended characters of T1 in .ps + other guillemets %\RequirePackage{ae,aecompl,aeguill} % page geometry \addtolength{\oddsidemargin}{-54pt} \addtolength{\textwidth}{109pt} \addtolength{\topmargin}{-70pt} \addtolength{\textheight}{122pt} \addtolength{\marginparsep}{-5pt} \addtolength{\marginparwidth}{-10pt} % hyperrefs \RequirePackage{url} \urlstyle{tt} % load hyperred at the end of the preamble to pass options required by loaded packages (like CJK) \AtEndPreamble{ \@ifpackageloaded{CJK} {\RequirePackage[CJKbookmarks]{hyperref}} {\RequirePackage[pdftex]{hyperref}} \AtBeginDocument{ \hypersetup{ breaklinks, % baseurl = http://, pdfborder = 0 0 0, % pdfpagemode = UseNone,% do not show thumbnails or bookmarks on opening % pdfstartview = FitH, % pdfstartpage = 1, pdfcreator = \LaTeX{} with `moderncv' package, pdfproducer = \LaTeX{}, bookmarksopen = true, pdfauthor = \@firstname~\@familyname, pdftitle = \@title, pdfsubject = \@firstname~\@familyname, pdfkeywords = \@firstname~\@familyname{} curriculum vit\ae{}}} \pagenumbering{arabic}% has to be issued after loading hyperref } % graphics \RequirePackage{graphicx} % headers and footers \RequirePackage{fancyhdr} \fancypagestyle{plain}{ \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancyhf{}} \pagestyle{plain} % compatibility package with older versions of moderncv \RequirePackageWithOptions{moderncvcompatibility} %------------------------------------------------------------------------------- % class definition %------------------------------------------------------------------------------- % minimal base settings \setlength\lineskip{1\p@} \setlength\normallineskip{1\p@} \renewcommand\baselinestretch{} \setlength{\parindent}{0pt} \setlength{\parskip}{0pt} \setlength\columnsep{10\p@} \setlength\columnseprule{0\p@} % TO BE TESTED %\setlength\arraycolsep{5\p@} %\setlength\tabcolsep{6\p@} %\setlength\arrayrulewidth{.4\p@} %\setlength\doublerulesep{2\p@} %\setlength\tabbingsep{\labelsep} %\setlength\fboxsep{3\p@} %\setlength\fboxrule{.4\p@} \pagestyle{empty} \raggedbottom \onecolumn %------------------------------------------------------------------------------- % style commands definitions %------------------------------------------------------------------------------- % symbols used \providecommand*{\listitemsymbol}{\Neutral}%{{\fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102}}} \providecommand*{\addresssymbol}{} \providecommand*{\mobilesymbol}{\Mobilefone} \providecommand*{\phonesymbol}{\Telefon} \providecommand*{\faxsymbol}{\FAX} \providecommand*{\emailsymbol}{\Letter} \providecommand*{\homepagesymbol}{{\Large\ComputerMouse}} % colors \definecolor{firstnamecolor}{rgb}{0,0,0} \definecolor{familynamecolor}{rgb}{0,0,0} \definecolor{titlecolor}{rgb}{0,0,0} \definecolor{addresscolor}{rgb}{0,0,0} \definecolor{quotecolor}{rgb}{0,0,0} \definecolor{sectionrectanglecolor}{rgb}{0,0,0} \definecolor{sectiontitlecolor}{rgb}{0,0,0} \definecolor{subsectioncolor}{rgb}{0,0,0} \definecolor{hintcolor}{rgb}{0,0,0} % fonts \providecommand*{\firstnamefont}{} \providecommand*{\familynamefont}{} \providecommand*{\titlefont}{} \providecommand*{\addressfont}{} \providecommand*{\quotefont}{} \providecommand*{\sectionfont}{} \providecommand*{\subsectionfont}{} \providecommand*{\hintfont}{\small\sffamily} % styles \providecommand*{\firstnamestyle}[1]{{\firstnamefont\color{firstnamecolor}#1}} \providecommand*{\familynamestyle}[1]{{\familynamefont\color{familynamecolor}#1}} \providecommand*{\titlestyle}[1]{{\titlefont\color{titlecolor}#1}} \providecommand*{\addresstyle}[1]{{\addressfont\color{addresscolor}#1}} \providecommand*{\quotestyle}[1]{{\quotefont\color{quotecolor}#1}} \providecommand*{\sectionstyle}[1]{{\sectionfont\color{sectiontitlecolor}#1}} \providecommand*{\subsectionstyle}[1]{{\subsectionfont\color{subsectioncolor}#1}} \providecommand*{\hintstyle}[1]{{\hintfont\color{hintcolor}#1}} % themes: casual (default), classic, ... \newcommand*{\moderncvtheme}[2][]{ \def\@moderncvtheme{#2} \def\@moderncvthemeoptions{#1}} \moderncvtheme{casual}% default theme \AtEndPreamble{\RequirePackage[\@moderncvthemeoptions]{moderncvtheme\@moderncvtheme}} %------------------------------------------------------------------------------- % structure commands definitions %------------------------------------------------------------------------------- \newcommand*{\firstname}[1]{\def\@firstname{#1}} \newcommand*{\familyname}[1]{\def\@familyname{#1}} \renewcommand*{\title}[1]{\def\@title{#1}} \newcommand*{\address}[2]{\def\@addressstreet{#1}\def\@addresscity{#2}} \newcommand*{\mobile}[1]{\def\@mobile{#1}} \newcommand*{\phone}[1]{\def\@phone{#1}} \renewcommand*{\fax}[1]{\def\@fax{#1}} \newcommand*{\email}[1]{\def\@email{#1}} \newcommand*{\homepage}[1]{\def\@homepage{#1}} \newcommand*{\extrainfo}[1]{\def\@extrainfo{#1}} \def\@photowidth{0pt} \newcommand*{\photo}[2][64pt]{\def\@photowidth{#1}\def\@photo{#2}} \newcommand*{\quote}[1]{\def\@quote{#1}} % length used by the moderncv layout % quote length \newlength{\quotewidth} % section lengths \newlength{\hintscolumnwidth} \newlength{\separatorcolumnwidth} \setlength{\separatorcolumnwidth}{0.025\textwidth} \newlength{\maincolumnwidth} % doubleitem lengths \newlength{\doubleitemmaincolumnwidth} % listitem lengths \newlength{\listitemsymbolwidth} \settowidth{\listitemsymbolwidth}{\listitemsymbol{}~} \newlength{\listitemmaincolumnwidth} % listdoubleitem lengths \newlength{\listdoubleitemmaincolumnwidth} % recompute all the lengths that depends on the text width \newcommand*{\recomputethemelengths}{} \newcommand*{\recomputelengths}{% \setlength{\quotewidth}{0.65\textwidth}% % main lenghts \setlength{\maincolumnwidth}{\textwidth}% \addtolength{\maincolumnwidth}{-\separatorcolumnwidth}% \addtolength{\maincolumnwidth}{-\hintscolumnwidth}% % listitem lengths \setlength{\listitemmaincolumnwidth}{\maincolumnwidth}% \addtolength{\listitemmaincolumnwidth}{-\listitemsymbolwidth}% % doubleitem lengths \setlength{\doubleitemmaincolumnwidth}{\maincolumnwidth}% \addtolength{\doubleitemmaincolumnwidth}{-\hintscolumnwidth}% \addtolength{\doubleitemmaincolumnwidth}{-\separatorcolumnwidth}% \setlength{\doubleitemmaincolumnwidth}{0.5\doubleitemmaincolumnwidth}% % listdoubleitem lengths \setlength{\listdoubleitemmaincolumnwidth}{\maincolumnwidth}% \addtolength{\listdoubleitemmaincolumnwidth}{-\listitemsymbolwidth}% \setlength{\listdoubleitemmaincolumnwidth}{0.475\listdoubleitemmaincolumnwidth}% % fancyhdr lengths \renewcommand{\headwidth}{\textwidth}% \recomputethemelengths} \setlength{\hintscolumnwidth}{0.15\textwidth} \recomputelengths % makes the cv title %\newcommand*{\maketitle}{}% \title{}% to avoid LaTeX complaining that \maketitle is a called without first a call to \title % draws a colored rectangle % usage: \colorrule[optional height]{width} %\newcommand*{\colorrule}[2][1ex]{{\color{sectionrectanglecolor}{\rule{#2}{#1}}}} % usage: \section{