modern/moderncvthemeclassic.sty
author Eugen Sawin <sawine@me73.com>
Tue, 24 Aug 2010 21:54:15 +0200
changeset 9 6370083b2760
permissions -rw-r--r--
Bewerbung bei MediClin
     1 %% start of file `moderncvthemeclassic.sty'.
     2 %% Copyright 2006-2008 Xavier Danaux (xdanaux@gmail.com).
     3 %
     4 % This work may be distributed and/or modified under the
     5 % conditions of the LaTeX Project Public License version 1.3c,
     6 % available at http://www.latex-project.org/lppl/.
     7 
     8 
     9 %-------------------------------------------------------------------------------
    10 %                identification
    11 %-------------------------------------------------------------------------------
    12 \NeedsTeXFormat{LaTeX2e}
    13 \ProvidesPackage{moderncvthemeclassic}[2008/06/17 v0.7 modern curriculum vitae style: classic]
    14 
    15 
    16 %-------------------------------------------------------------------------------
    17 %                required packages
    18 %-------------------------------------------------------------------------------
    19 
    20 
    21 %-------------------------------------------------------------------------------
    22 %                package options
    23 %-------------------------------------------------------------------------------
    24 % color options
    25 % blue (default option)
    26 \DeclareOption{blue}{}
    27 % orange
    28 \newif\if@colororange\@colororangefalse
    29 \DeclareOption{orange}{\@colororangetrue}
    30 % green
    31 \newif\if@colorgreen\@colorgreenfalse
    32 \DeclareOption{green}{\@colorgreentrue}
    33 % red
    34 \newif\if@colorred\@colorredfalse
    35 \DeclareOption{red}{\@colorredtrue}
    36 % grey
    37 \newif\if@colorgrey\@colorgreyfalse
    38 \DeclareOption{grey}{\@colorgreytrue}
    39 
    40 % roman option
    41 \newif\if@roman\@romanfalse
    42 \DeclareOption{roman}{\@romantrue}
    43 
    44 % unused options
    45 \DeclareOption*{
    46   \PackageWarning{moderncvthemeclassic}{Unknown option ‘\CurrentOption’}}
    47 
    48 % execute default options
    49 \ExecuteOptions{color}
    50 
    51 % process given options
    52 \ProcessOptions\relax
    53 
    54 
    55 %-------------------------------------------------------------------------------
    56 %                style definition
    57 %-------------------------------------------------------------------------------
    58 % symbols used
    59 \renewcommand*{\listitemsymbol}{\textbullet}
    60 
    61 % colors
    62 \definecolor{firstnamecolor}{rgb}{0,0,0}
    63 \definecolor{familynamecolor}{rgb}{0,0,0}
    64 \definecolor{titlecolor}{rgb}{0.35,0.35,0.35}
    65 \definecolor{quotecolor}{rgb}{0.35,0.35,0.35}
    66 % default blue color
    67   \definecolor{addresscolor}{rgb}{0.25,0.5,0.75}
    68   \definecolor{sectionrectanglecolor}{rgb}{0.25,0.5,0.75}
    69   \definecolor{sectiontitlecolor}{rgb}{0.2,0.4,0.65}
    70   \definecolor{subsectioncolor}{rgb}{0.2,0.4,0.65}
    71   \definecolor{footersymbolcolor}{rgb}{0.25,0.50,0.75}
    72 \if@colororange
    73   \definecolor{addresscolor}{rgb}{0.95,0.55,0.15}
    74   \definecolor{sectionrectanglecolor}{rgb}{1,0.65,0.20}
    75   \definecolor{sectiontitlecolor}{rgb}{0.95,0.55,0.15}
    76   \definecolor{subsectioncolor}{rgb}{0.95,0.55,0.15}\fi
    77 \if@colorgreen
    78   \definecolor{addresscolor}{rgb}{0.30,0.65,0.15}
    79   \definecolor{sectionrectanglecolor}{rgb}{0.55,0.85,0.35}
    80   \definecolor{sectiontitlecolor}{rgb}{0.30,0.65,0.15}
    81   \definecolor{subsectioncolor}{rgb}{0.30,0.65,0.15}\fi
    82 \if@colorred
    83   \definecolor{addresscolor}{rgb}{0.95,0.20,0.20}
    84   \definecolor{sectionrectanglecolor}{rgb}{1.00,0.30,0.30}
    85   \definecolor{sectiontitlecolor}{rgb}{0.95,0.20,0.20}
    86   \definecolor{subsectioncolor}{rgb}{0.95,0.20,0.20}\fi
    87 \if@colorgrey
    88   \definecolor{addresscolor}{rgb}{0.35,0.35,0.35}
    89   \definecolor{sectionrectanglecolor}{rgb}{0.75,0.75,0.75}
    90   \definecolor{sectiontitlecolor}{rgb}{0.35,0.35,0.35}
    91   \definecolor{subsectioncolor}{rgb}{0.35,0.35,0.35}\fi
    92 
    93 % fonts
    94 \if@roman
    95   \AtBeginDocument{\rmfamily}
    96 \else
    97   \AtBeginDocument{\sffamily}\fi
    98 \renewcommand*{\ttdefault}{pcr}
    99 \renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape}
   100 \renewcommand*{\titlefont}{\LARGE\sffamily\mdseries\slshape}
   101 \renewcommand*{\addressfont}{\normalsize\rmfamily\mdseries\slshape}
   102 \renewcommand*{\familynamefont}{\firstnamefont}
   103 \renewcommand*{\quotefont}{\large\slshape}
   104 \renewcommand*{\sectionfont}{\Large\sffamily\mdseries\upshape}
   105 \renewcommand*{\subsectionfont}{\large\sffamily\mdseries\upshape}
   106 
   107 % styles
   108 
   109 % maketitle
   110 %   setmaketitlenamemaxwidth to the full name length, capped by \maketitlenamemaxwidth
   111 \newlength{\maketitlenamemaxwidth}
   112 \setlength{\maketitlenamemaxwidth}{.525\textwidth}
   113 \newlength{\maketitlenamefullwidth}
   114 \settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}}
   115 \newlength{\maketitlenamewidth}
   116 \ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth\setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}\else\setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi
   117 %   other lengths
   118 \newlength{\maketitlepicturewidth}
   119 \setlength{\maketitlepicturewidth}{\@photowidth}
   120 \newlength{\maketitledetailswidth}
   121 %   recompute theme-specific lengths, called by class to recompute all lengths
   122 \renewcommand*{\recomputethemelengths}{%
   123   \setlength{\maketitledetailswidth}{\textwidth}%
   124   \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}%
   125   \addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}%
   126   \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}
   127 \recomputethemelengths% cv footer
   128 \newif\if@firstfooterelement\@firstfooterelementtrue
   129 \providecommand*{\footersymbol}{}
   130 \renewcommand*{\footersymbol}{%
   131   \if@firstfooterelement%
   132   \else%
   133     { ~~\color{footersymbolcolor}\textbullet~~~}\fi}
   134 \providecommand*{\makefooter}{}
   135 \renewcommand*{\makefooter}{%
   136   \fancypagestyle{plain}{%
   137     \fancyfoot[c]{%
   138       \parbox{0.8\textwidth}{%
   139       \centering%
   140       \addressfont\color{addresscolor}%
   141       \ifthenelse{\isundefined{\@addressstreet}}{}{%
   142         \addresssymbol~\@addressstreet%
   143         \@firstfooterelementfalse%
   144         \ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}%
   145       \ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol~\@mobile\@firstfooterelementfalse}%
   146       \ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol~\@phone\@firstfooterelementfalse}%
   147       \ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol~\@fax\@firstfooterelementfalse}%
   148       \ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol~\emaillink{\@email}\@firstfooterelementfalse}%
   149       \ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
   150   }%
   151   \pagestyle{plain}}
   152 \AtBeginDocument{\makefooter}
   153 \newif\if@firstdetailselement\@firstdetailselementtrue
   154 \newcommand*{\maketitledetailsnewline}{
   155   \if@firstdetailselement%
   156     \@firstdetailselementfalse%
   157   \else%
   158     \\[.2em]\fi}
   159 \renewcommand*{\maketitle}{%
   160   % name and title
   161   \begin{minipage}[b]{\maketitlenamewidth}%
   162     \firstnamestyle{\@firstname~}\familynamestyle{\@familyname}%
   163     \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
   164   \end{minipage}%
   165   % optional data
   166   %\begin{minipage}[b]{\maketitledetailswidth}%
   167    % \raggedleft\addressfont\color{addresscolor}%
   168     %\ifthenelse{\isundefined{\@addressstreet}}{}{%
   169      % \maketitledetailsnewline%
   170       %\addresssymbol~\@addressstreet%
   171       %\ifthenelse{\isundefined{\@addresscity}}{}{\\\@addresscity}}%
   172     %\ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol~\@mobile}%
   173     %\ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol~\@phone}%
   174     %\ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol~\@fax}%
   175     %\ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol~\emaillink{\@email}}%
   176     %\ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
   177   %\end{minipage}%
   178   % optional photo
   179   \ifthenelse{\isundefined{\@photo}}%
   180     {}%
   181     {\hspace*{120pt}\color{firstnamecolor}\framebox{\includegraphics[width=\maketitlepicturewidth]{\@photo}}}\\[3em]%
   182   % optional quote
   183   \ifthenelse{\isundefined{\@quote}}%
   184     {}%
   185     {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}%
   186   }
   187 
   188 % cv footer
   189 \newif\if@firstfooterelement\@firstfooterelementtrue
   190 \providecommand*{\footersymbol}{}
   191 \renewcommand*{\footersymbol}{%
   192   \if@firstfooterelement%
   193   \else%
   194     { ~~\color{footersymbolcolor}\textbullet~~~}\fi}
   195 \providecommand*{\makefooter}{}
   196 \renewcommand*{\makefooter}{%
   197   \fancypagestyle{plain}{%
   198     \fancyfoot[c]{%
   199       \parbox{0.8\textwidth}{%
   200       \centering%
   201       \addressfont\color{addresscolor}%
   202       \ifthenelse{\isundefined{\@addressstreet}}{}{%
   203         \addresssymbol~\@addressstreet%
   204         \@firstfooterelementfalse%
   205         \ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}%
   206       \ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol~\@mobile\@firstfooterelementfalse}%
   207       \ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol~\@phone\@firstfooterelementfalse}%
   208       \ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol~\@fax\@firstfooterelementfalse}%
   209       \ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol~\emaillink{\@email}\@firstfooterelementfalse}%
   210       \ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
   211   }%
   212   \pagestyle{plain}}
   213 \AtBeginDocument{\makefooter}
   214 
   215 \endinput
   216 
   217 
   218 %% end of file `moderncvthemeclassic.sty'.