summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
blob: 872d67d5796942c4b8752ddafeee12988cec8b90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
%% start of file `moderncvthemeclassic.sty'.
%% Copyright 2006-2008 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}
\ProvidesPackage{moderncvthemeclassic}[2008/06/17 v0.7 modern curriculum vitae style: classic]


%-------------------------------------------------------------------------------
%                required packages
%-------------------------------------------------------------------------------


%-------------------------------------------------------------------------------
%                package options
%-------------------------------------------------------------------------------
% color options
% blue (default option)
\DeclareOption{blue}{}
% orange
\newif\if@colororange\@colororangefalse
\DeclareOption{orange}{\@colororangetrue}
% green
\newif\if@colorgreen\@colorgreenfalse
\DeclareOption{green}{\@colorgreentrue}
% red
\newif\if@colorred\@colorredfalse
\DeclareOption{red}{\@colorredtrue}
% grey
\newif\if@colorgrey\@colorgreyfalse
\DeclareOption{grey}{\@colorgreytrue}

% roman option
\newif\if@roman\@romanfalse
\DeclareOption{roman}{\@romantrue}

% unused options
\DeclareOption*{
  \PackageWarning{moderncvthemeclassic}{Unknown option ‘\CurrentOption’}}

% execute default options
\ExecuteOptions{color}

% process given options
\ProcessOptions\relax


%-------------------------------------------------------------------------------
%                style definition
%-------------------------------------------------------------------------------
% symbols used
\renewcommand*{\listitemsymbol}{\textbullet}

% colors
\definecolor{firstnamecolor}{rgb}{0,0,0}
\definecolor{familynamecolor}{rgb}{0,0,0}
\definecolor{titlecolor}{rgb}{0.35,0.35,0.35}
\definecolor{quotecolor}{rgb}{0.35,0.35,0.35}
% default blue color
  \definecolor{addresscolor}{rgb}{0.25,0.5,0.75}
  \definecolor{sectionrectanglecolor}{rgb}{0.25,0.5,0.75}
  \definecolor{sectiontitlecolor}{rgb}{0.2,0.4,0.65}
  \definecolor{subsectioncolor}{rgb}{0.2,0.4,0.65}
\if@colororange
  \definecolor{addresscolor}{rgb}{0.95,0.55,0.15}
  \definecolor{sectionrectanglecolor}{rgb}{1,0.65,0.20}
  \definecolor{sectiontitlecolor}{rgb}{0.95,0.55,0.15}
  \definecolor{subsectioncolor}{rgb}{0.95,0.55,0.15}\fi
\if@colorgreen
  \definecolor{addresscolor}{rgb}{0.30,0.65,0.15}
  \definecolor{sectionrectanglecolor}{rgb}{0.55,0.85,0.35}
  \definecolor{sectiontitlecolor}{rgb}{0.30,0.65,0.15}
  \definecolor{subsectioncolor}{rgb}{0.30,0.65,0.15}\fi
\if@colorred
  \definecolor{addresscolor}{rgb}{0.95,0.20,0.20}
  \definecolor{sectionrectanglecolor}{rgb}{1.00,0.30,0.30}
  \definecolor{sectiontitlecolor}{rgb}{0.95,0.20,0.20}
  \definecolor{subsectioncolor}{rgb}{0.95,0.20,0.20}\fi
\if@colorgrey
  \definecolor{addresscolor}{rgb}{0.35,0.35,0.35}
  \definecolor{sectionrectanglecolor}{rgb}{0.75,0.75,0.75}
  \definecolor{sectiontitlecolor}{rgb}{0.35,0.35,0.35}
  \definecolor{subsectioncolor}{rgb}{0.35,0.35,0.35}\fi

% fonts
\if@roman
  \AtBeginDocument{\rmfamily}
\else
  \AtBeginDocument{\sffamily}\fi
\renewcommand*{\ttdefault}{pcr}
\renewcommand*{\firstnamefont}{\fontsize{34}{36}\sffamily\mdseries\upshape}
\renewcommand*{\titlefont}{\LARGE\sffamily\mdseries\slshape}
\renewcommand*{\addressfont}{\normalsize\rmfamily\mdseries\slshape}
\renewcommand*{\familynamefont}{\firstnamefont}
\renewcommand*{\quotefont}{\large\slshape}
\renewcommand*{\sectionfont}{\Large\sffamily\mdseries\upshape}
\renewcommand*{\subsectionfont}{\large\sffamily\mdseries\upshape}

% styles

% maketitle
%   setmaketitlenamemaxwidth to the full name length, capped by \maketitlenamemaxwidth
\newlength{\maketitlenamemaxwidth}
\setlength{\maketitlenamemaxwidth}{.525\textwidth}
\newlength{\maketitlenamefullwidth}
\settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}}
\newlength{\maketitlenamewidth}
\ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth\setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}\else\setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi
%   other lengths
\newlength{\maketitlepicturewidth}
\setlength{\maketitlepicturewidth}{\@photowidth}
\newlength{\maketitledetailswidth}
%   recompute theme-specific lengths, called by class to recompute all lengths
\renewcommand*{\recomputethemelengths}{%
  \setlength{\maketitledetailswidth}{\textwidth}%
  \addtolength{\maketitledetailswidth}{-\maketitlenamewidth}%
  \addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}%
  \addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}
\recomputethemelengths
\newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\maketitledetailsnewline}{
  \if@firstdetailselement%
    \@firstdetailselementfalse%
  \else%
    \\[.2em]\fi}
\renewcommand*{\maketitle}{%
  % name and title
  \begin{minipage}[b]{\maketitlenamewidth}%
    \firstnamestyle{\@firstname~}\familynamestyle{\@familyname}%
    \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
  \end{minipage}%
  % optional data
  \begin{minipage}[b]{\maketitledetailswidth}%
    \raggedleft\addressfont\color{addresscolor}%
    \ifthenelse{\isundefined{\@addressstreet}}{}{%
      \maketitledetailsnewline%
      \addresssymbol~\@addressstreet%
      \ifthenelse{\isundefined{\@addresscity}}{}{\\\@addresscity}}%
    \ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol~\@mobile}%
    \ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol~\@phone}%
    \ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol~\@fax}%
    \ifthenelse{\isundefined{\@email}}{}{\maketitledetailsnewline\emailsymbol~\emaillink{\@email}}%
    \ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}%
  \end{minipage}%
  % optional photo
  \ifthenelse{\isundefined{\@photo}}%
    {}%
    {\hspace*{\separatorcolumnwidth}\color{firstnamecolor}\framebox{\includegraphics[width=\maketitlepicturewidth]{\@photo}}}\\[3em]%
  % optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {\centering{\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}}\\[2.5em]}%
  }


\endinput


%% end of file `moderncvthemeclassic.sty'.