SHARE
TWEET

moderncvthemeclassic.sty - name hack

johannes_reichard Jun 18th, 2011 170 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. \if@colororange
  72.   \definecolor{addresscolor}{rgb}{0.95,0.55,0.15}
  73.   \definecolor{sectionrectanglecolor}{rgb}{1,0.65,0.20}
  74.   \definecolor{sectiontitlecolor}{rgb}{0.95,0.55,0.15}
  75.   \definecolor{subsectioncolor}{rgb}{0.95,0.55,0.15}\fi
  76. \if@colorgreen
  77.   \definecolor{addresscolor}{rgb}{0.30,0.65,0.15}
  78.   \definecolor{sectionrectanglecolor}{rgb}{0.55,0.85,0.35}
  79.   \definecolor{sectiontitlecolor}{rgb}{0.30,0.65,0.15}
  80.   \definecolor{subsectioncolor}{rgb}{0.30,0.65,0.15}\fi
  81. \if@colorred
  82.   \definecolor{addresscolor}{rgb}{0.95,0.20,0.20}
  83.   \definecolor{sectionrectanglecolor}{rgb}{1.00,0.30,0.30}
  84.   \definecolor{sectiontitlecolor}{rgb}{0.95,0.20,0.20}
  85.   \definecolor{subsectioncolor}{rgb}{0.95,0.20,0.20}\fi
  86. \if@colorgrey
  87.   \definecolor{addresscolor}{rgb}{0.35,0.35,0.35}
  88.   \definecolor{sectionrectanglecolor}{rgb}{0.75,0.75,0.75}
  89.   \definecolor{sectiontitlecolor}{rgb}{0.35,0.35,0.35}
  90.   \definecolor{subsectioncolor}{rgb}{0.35,0.35,0.35}\fi
  91.  
  92. % fonts
  93. \if@roman
  94.   \AtBeginDocument{\rmfamily}
  95. \else
  96.   \AtBeginDocument{\sffamily}\fi
  97. \renewcommand*{\ttdefault}{pcr}
  98. \renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape}
  99. \renewcommand*{\titlefont}{\LARGE\sffamily\mdseries\slshape}
  100. \renewcommand*{\addressfont}{\normalsize\rmfamily\mdseries\slshape}
  101. \renewcommand*{\familynamefont}{\firstnamefont}
  102. \renewcommand*{\quotefont}{\large\slshape}
  103. \renewcommand*{\sectionfont}{\Large\sffamily\mdseries\upshape}
  104. \renewcommand*{\subsectionfont}{\large\sffamily\mdseries\upshape}
  105.  
  106. % styles
  107.  
  108. % maketitle
  109. %   setmaketitlenamemaxwidth to the full name length, capped by \maketitlenamemaxwidth
  110. \newlength{\maketitlenamemaxwidth}
  111. \setlength{\maketitlenamemaxwidth}{.525\textwidth}
  112. \newlength{\maketitlenamefullwidth}
  113. \settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}}
  114. \newlength{\maketitlenamewidth}
  115. \ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth\setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}\else\setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi
  116. %   other lengths
  117. \newlength{\maketitlepicturewidth}
  118. \setlength{\maketitlepicturewidth}{\@photowidth}
  119. \newlength{\maketitledetailswidth}
  120. %   recompute theme-specific lengths, called by class to recompute all lengths
  121. \renewcommand*{\recomputethemelengths}{%
  122.   \setlength{\maketitledetailswidth}{\textwidth}%
  123.   \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}%
  124.   \addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}%
  125.   \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}
  126. \recomputethemelengths
  127. \newif\if@firstdetailselement\@firstdetailselementtrue
  128. \newcommand*{\maketitledetailsnewline}{
  129.   \if@firstdetailselement%
  130.     \@firstdetailselementfalse%
  131.   \else%
  132.     \\[.2em]\fi}
  133. \renewcommand*{\maketitle}{%
  134.   % name and title
  135.   \begin{minipage}[b]{\maketitlenamewidth}%
  136.     \firstnamestyle{\@firstname~}\familynamestyle{\@familyname}%
  137.     \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
  138.   \end{minipage}%
  139.   % optional data
  140.   \begin{minipage}[b]{\maketitledetailswidth}%
  141.     \raggedleft\addressfont\color{addresscolor}%
  142.     \ifthenelse{\isundefined{\@firstname}}{}{%
  143.         \ifthenelse{\isundefined{\@familyname}}{}{
  144.             \maketitledetailsnewline%
  145.             \ifthenelse{\isundefined{\@title}}{}{\@title~}%
  146.             \@firstname~\@familyname}}%
  147.     \ifthenelse{\isundefined{\@addressstreet}}{}{%
  148.       \maketitledetailsnewline%
  149.       \addresssymbol~\@addressstreet%
  150.       \ifthenelse{\isundefined{\@addresscity}}{}{\\\@addresscity}}%
  151.     \ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol~\@mobile}%
  152.     \ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol~\@phone}%
  153.     \ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol~\@fax}%
  154.     \ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol~\emaillink{\@email}}%
  155.     \ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
  156.   \end{minipage}%
  157.   % optional photo
  158.   \ifthenelse{\isundefined{\@photo}}%
  159.     {}%
  160.     {\hspace*{\separatorcolumnwidth}\color{firstnamecolor}\framebox{\includegraphics[width=\maketitlepicturewidth]{\@photo}}}\\[3em]%
  161.   % optional quote
  162.   \ifthenelse{\isundefined{\@quote}}%
  163.     {}%
  164.     {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}%
  165.   }
  166.  
  167.  
  168. \endinput
  169.  
  170.  
  171. %% end of file `moderncvthemeclassic.sty'.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top