summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty
blob: 09d33f199b6fc13ea8309507cdd07c51ce6fead4 (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
%% start of file `moderncvstylecasual.sty'.
%% Copyright 2006-2012 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{moderncvstylecasual}[2012/01/15 v0.16 modern curriculum vitae style scheme: casual]


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


%-------------------------------------------------------------------------------
%                package options
%-------------------------------------------------------------------------------
\RequirePackage{moderncvstyleclassic}


%-------------------------------------------------------------------------------
%                style scheme definition
%-------------------------------------------------------------------------------
% fonts
\renewcommand*{\namefont}{\fontsize{38}{40}\mdseries\upshape}
\renewcommand*{\addressfont}{\small\mdseries\slshape}

% cv footer
\newif\if@firstfooterelement\@firstfooterelementtrue
\newcommand*{\footersymbol}{%
  \if@firstfooterelement%
  \else%
    { ~~\color{color2}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
\renewcommand*{\makefooter}{%
  \fancypagestyle{plain}{%
    \fancyfoot[c]{%
      \parbox{0.8\textwidth}{%
      \centering%
      \addressfont\color{color2}%
      \ifthenelse{\isundefined{\@addressstreet}}{}{%
        \addresssymbol\@addressstreet%
        \@firstfooterelementfalse%
        \ifthenelse{\isundefined{\@addresscity}}{}{~--~\@addresscity}\\\@firstfooterelementtrue}%
      \ifthenelse{\isundefined{\@mobile}}{}{\footersymbol\mobilesymbol\@mobile\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@phone}}{}{\footersymbol\phonesymbol\@phone\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@fax}}{}{\footersymbol\faxsymbol\@fax\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@email}}{}{\footersymbol\emailsymbol\emaillink{\@email}\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@homepage}}{}{\footersymbol\homepagesymbol\httplink{\@homepage}\@firstfooterelementfalse}%
      \ifthenelse{\isundefined{\@extrainfo}}{}{\footersymbol\@extrainfo\@firstfooterelementfalse}}}%
  }%
  \pagestyle{plain}}

% maketitle
\renewcommand*{\maketitle}{%
  \makefooter{}%
  \newbox{\maketitlepicturebox}%
  \savebox{\maketitlepicturebox}{%
    \ifthenelse{\isundefined{\@photo}}%
      {}%
      {%
       \setlength\fboxrule{\@photoframewidth}%
       \ifdim\@photoframewidth=0pt%
         \setlength{\fboxsep}{0pt}\fi%
       {\color{color1}\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}}%
  \usebox{\maketitlepicturebox}%
  \newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}%
  \parbox[b]{\textwidth-\maketitlepicturewidth}{\raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\[-.35em]% alternate design: \MakeLowercase and no space
  {\color{color2!50}\rule{\textwidth}{.25ex}\\[2.5em]}%
% optional quote
  \ifthenelse{\isundefined{\@quote}}%
    {}%
    {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
  \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle


\endinput


%% end of file `moderncvstylecasual.sty'.