moderncvthemecasual.sty 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. %% start of file `moderncvthemecasual.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{moderncvthemecasual}[2007/05/28 v0.6 modern curriculum vitae style: casual]
  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{moderncvthemecasual}{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.65,0.65,0.65}
  50. \definecolor{familynamecolor}{rgb}{0.45,0.45,0.45}
  51. \definecolor{quotecolor}{rgb}{0.35,0.35,0.35}
  52. \definecolor{addresscolor}{rgb}{0.35,0.35,0.35}
  53. % default blue color
  54. \definecolor{sectionrectanglecolor}{rgb}{0.25,0.50,0.75}
  55. \definecolor{sectiontitlecolor}{rgb}{0.20,0.40,0.65}
  56. \definecolor{subsectioncolor}{rgb}{0.20,0.40,0.65}
  57. \definecolor{footersymbolcolor}{rgb}{0.25,0.50,0.75}
  58. \if@colororange
  59. \definecolor{sectionrectanglecolor}{rgb}{1.00,0.65,0.20}
  60. \definecolor{sectiontitlecolor}{rgb}{0.95,0.55,0.15}
  61. \definecolor{subsectioncolor}{rgb}{0.95,0.55,0.15}
  62. \definecolor{footersymbolcolor}{rgb}{0.95,0.55,0.15}\fi
  63. \if@colorgreen
  64. \definecolor{sectionrectanglecolor}{rgb}{0.55,0.85,0.35}
  65. \definecolor{sectiontitlecolor}{rgb}{0.30,0.65,0.15}
  66. \definecolor{subsectioncolor}{rgb}{0.30,0.65,0.15}
  67. \definecolor{footersymbolcolor}{rgb}{0.30,0.65,0.15}\fi
  68. \if@colorred
  69. \definecolor{sectionrectanglecolor}{rgb}{1.00,0.30,0.30}
  70. \definecolor{sectiontitlecolor}{rgb}{0.95,0.20,0.20}
  71. \definecolor{subsectioncolor}{rgb}{0.95,0.20,0.20}
  72. \definecolor{footersymbolcolor}{rgb}{0.95,0.20,0.20}\fi
  73. \if@colorgrey
  74. \definecolor{sectionrectanglecolor}{rgb}{0.75,0.75,0.75}
  75. \definecolor{sectiontitlecolor}{rgb}{0.35,0.35,0.35}
  76. \definecolor{subsectioncolor}{rgb}{0.35,0.35,0.35}
  77. \definecolor{footersymbolcolor}{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{38}{40}\sffamily\mdseries\upshape}
  85. \renewcommand*{\familynamefont}{\firstnamefont}
  86. \renewcommand*{\addressfont}{\normalsize\sffamily\mdseries\slshape}
  87. \renewcommand*{\quotefont}{\large\slshape}
  88. \renewcommand*{\sectionfont}{\Large\sffamily\mdseries\upshape}
  89. \renewcommand*{\subsectionfont}{\large\sffamily\mdseries\upshape}
  90. % styles
  91. % maketitle
  92. \renewcommand*{\maketitle}{%
  93. {%
  94. \ifthenelse{\isundefined{\@photo}}%
  95. {}%
  96. {{\color{firstnamecolor}\framebox{\includegraphics[height=\@photoheight]{\@photo}}}}%
  97. \hfill%
  98. \raggedleft{\firstnamestyle{\MakeLowercase{\@firstname}}\familynamestyle{\MakeLowercase{\@familyname}}}\\[-.35em]}%
  99. {\color{firstnamecolor}\rule{\textwidth}{.25ex}\\[2.5em]}%
  100. % optional quote
  101. \ifthenelse{\isundefined{\@quote}}%
  102. {}%
  103. {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}%
  104. }%
  105. % cv footer
  106. \newif\if@firstfooterelement\@firstfooterelementtrue
  107. \providecommand*{\footersymbol}{}
  108. \renewcommand*{\footersymbol}{%
  109. \if@firstfooterelement%
  110. \else%
  111. { ~~\color{footersymbolcolor}\textbullet~~~}\fi}
  112. \providecommand*{\makefooter}{}
  113. \renewcommand*{\makefooter}{%
  114. \fancypagestyle{plain}{%
  115. \fancyfoot[c]{%
  116. \parbox{0.8\textwidth}{%
  117. \centering%
  118. \addressfont\color{addresscolor}%
  119. \ifthenelse{\isundefined{\@addressstreet}}{}{%
  120. \addresssymbol~\@addressstreet%
  121. \@firstfooterelementfalse%
  122. \ifthenelse{\isundefined{\@addresscity}}{}{\footersymbol\@addresscity}\\\@firstfooterelementtrue}%
  123. \ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol~\@mobile\@firstfooterelementfalse}%
  124. \ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol~\@phone\@firstfooterelementfalse}%
  125. \ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol~\@fax\@firstfooterelementfalse}%
  126. \ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol~\emaillink{\@email}\@firstfooterelementfalse}%
  127. \ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
  128. }%
  129. \pagestyle{plain}}
  130. \AtBeginDocument{\makefooter}
  131. \endinput
  132. %% end of file `moderncvthemecasual.sty'.