moderncvthemeclassic.sty 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. %% start of file `moderncvthemeclassic.sty'.
  2. %% Copyright 2007 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. % identification
  9. %-------------------------------------------------------------------------------
  10. \NeedsTeXFormat{LaTeX2e}
  11. \ProvidesPackage{moderncvthemeclassic}[2007/05/28 v0.6 modern curriculum vitae style: classic]
  12. %-------------------------------------------------------------------------------
  13. % required packages
  14. %-------------------------------------------------------------------------------
  15. %-------------------------------------------------------------------------------
  16. % package options
  17. %-------------------------------------------------------------------------------
  18. % color options
  19. % blue (default option)
  20. \DeclareOption{blue}{}
  21. % orange
  22. \newif\if@colororange\@colororangefalse
  23. \DeclareOption{orange}{\@colororangetrue}
  24. % green
  25. \newif\if@colorgreen\@colorgreenfalse
  26. \DeclareOption{green}{\@colorgreentrue}
  27. % red
  28. \newif\if@colorred\@colorredfalse
  29. \DeclareOption{red}{\@colorredtrue}
  30. % grey
  31. \newif\if@colorgrey\@colorgreyfalse
  32. \DeclareOption{grey}{\@colorgreytrue}
  33. % roman option
  34. \newif\if@roman\@romanfalse
  35. \DeclareOption{roman}{\@romantrue}
  36. % unused options
  37. \DeclareOption*{
  38. \PackageWarning{moderncvthemeclassic}{Unknown option ‘\CurrentOption’}}
  39. % execute default options
  40. \ExecuteOptions{color}
  41. % process given options
  42. \ProcessOptions\relax
  43. %-------------------------------------------------------------------------------
  44. % style definition
  45. %-------------------------------------------------------------------------------
  46. % symbols used
  47. \renewcommand*{\listitemsymbol}{\textbullet}
  48. % colors
  49. \definecolor{firstnamecolor}{rgb}{0,0,0}
  50. \definecolor{familynamecolor}{rgb}{0,0,0}
  51. \definecolor{titlecolor}{rgb}{0.35,0.35,0.35}
  52. \definecolor{quotecolor}{rgb}{0.35,0.35,0.35}
  53. % default blue color
  54. \definecolor{addresscolor}{rgb}{0.25,0.5,0.75}
  55. \definecolor{sectionrectanglecolor}{rgb}{0.25,0.5,0.75}
  56. \definecolor{sectiontitlecolor}{rgb}{0.2,0.4,0.65}
  57. \definecolor{subsectioncolor}{rgb}{0.2,0.4,0.65}
  58. \if@colororange
  59. \definecolor{addresscolor}{rgb}{0.95,0.55,0.15}
  60. \definecolor{sectionrectanglecolor}{rgb}{1,0.65,0.20}
  61. \definecolor{sectiontitlecolor}{rgb}{0.95,0.55,0.15}
  62. \definecolor{subsectioncolor}{rgb}{0.95,0.55,0.15}\fi
  63. \if@colorgreen
  64. \definecolor{addresscolor}{rgb}{0.30,0.65,0.15}
  65. \definecolor{sectionrectanglecolor}{rgb}{0.55,0.85,0.35}
  66. \definecolor{sectiontitlecolor}{rgb}{0.30,0.65,0.15}
  67. \definecolor{subsectioncolor}{rgb}{0.30,0.65,0.15}\fi
  68. \if@colorred
  69. \definecolor{addresscolor}{rgb}{0.95,0.20,0.20}
  70. \definecolor{sectionrectanglecolor}{rgb}{1.00,0.30,0.30}
  71. \definecolor{sectiontitlecolor}{rgb}{0.95,0.20,0.20}
  72. \definecolor{subsectioncolor}{rgb}{0.95,0.20,0.20}\fi
  73. \if@colorgrey
  74. \definecolor{addresscolor}{rgb}{0.35,0.35,0.35}
  75. \definecolor{sectionrectanglecolor}{rgb}{0.75,0.75,0.75}
  76. \definecolor{sectiontitlecolor}{rgb}{0.35,0.35,0.35}
  77. \definecolor{subsectioncolor}{rgb}{0.35,0.35,0.35}\fi
  78. % fonts
  79. \if@roman
  80. \AtBeginDocument{\rmfamily}
  81. \else
  82. \AtBeginDocument{\sffamily}\fi
  83. \renewcommand*{\ttdefault}{pcr}
  84. \renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape}
  85. \renewcommand*{\titlefont}{\LARGE\sffamily\mdseries\slshape}
  86. \renewcommand*{\addressfont}{\normalsize\rmfamily\mdseries\slshape}
  87. \renewcommand*{\familynamefont}{\firstnamefont}
  88. \renewcommand*{\quotefont}{\large\slshape}
  89. \renewcommand*{\sectionfont}{\Large\sffamily\mdseries\upshape}
  90. \renewcommand*{\subsectionfont}{\large\sffamily\mdseries\upshape}
  91. % styles
  92. % maketitle
  93. \renewcommand*{\maketitle}{%
  94. % name and title
  95. \if@DEBUG\framebox{\fi
  96. \begin{minipage}[b]{.725\textwidth}%
  97. \firstnamestyle{\@firstname~}\familynamestyle{\@familyname}%
  98. \ifthenelse{\isundefined{\@title}}%
  99. {}%
  100. {\\[1.25em]\titlestyle{\@title}}%
  101. \end{minipage}%
  102. \if@DEBUG}\fi
  103. \hfill%
  104. \if@DEBUG\framebox{\fi%
  105. % optional data
  106. \begin{minipage}[b]{.525\textwidth}%
  107. \raggedleft\addressfont\color{addresscolor}%
  108. \ifthenelse{\isundefined{\@addressstreet}}{}{%
  109. \addresssymbol~\@addressstreet%
  110. \ifthenelse{\isundefined{\@addresscity}}{}{\\\@addresscity}%
  111. \\[.2em]}%
  112. \ifthenelse{\isundefined{\@mobile}}{}{\mobilesymbol~\@mobile\\[.2em]}%
  113. \ifthenelse{\isundefined{\@phone}}{}{\phonesymbol~\@phone\\[.2em]}%
  114. \ifthenelse{\isundefined{\@fax}}{}{\faxsymbol~\@fax\\[.2em]}%
  115. \ifthenelse{\isundefined{\@email}}{}{\emailsymbol~\emaillink{\@email}\\[.2em]}%
  116. \ifthenelse{\isundefined{\@extrainfo}}{}{\@extrainfo\\[.2em]}%
  117. \end{minipage}%
  118. % optional photo
  119. \ifthenelse{\isundefined{\@photo}}%
  120. {}%
  121. {\hspace*{0.75em}\color{firstnamecolor}\framebox{\includegraphics[height=\@photoheight]{\@photo}}}\\[3em]%
  122. \if@DEBUG}\fi%
  123. % optional quote
  124. \ifthenelse{\isundefined{\@quote}}%
  125. {}%
  126. {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}%
  127. }
  128. \endinput
  129. %% end of file `moderncvthemeclassic.sty'.