summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty64
1 files changed, 43 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty
index 09d33f199b6..aa4dc60a994 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncvstylecasual.sty
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstylecasual}[2012/01/15 v0.16 modern curriculum vitae style scheme: casual]
+\ProvidesPackage{moderncvstylecasual}[2012/01/25 v0.17 modern curriculum vitae style scheme: casual]
%-------------------------------------------------------------------------------
@@ -32,28 +32,47 @@
\renewcommand*{\addressfont}{\small\mdseries\slshape}
% cv footer
-\newif\if@firstfooterelement\@firstfooterelementtrue
+% footer symbol used to separate footer elements
\newcommand*{\footersymbol}{%
- \if@firstfooterelement%
+ {~~~\textbullet~~~}}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
+% internal command to add an element to the footer
+% it collects the elements in a temporary box, and checks when to flush the box
+\newsavebox{\footertempabox}%
+\newsavebox{\footertempbbox}%
+\newlength{\footerwidth}%
+\newlength{\footerboxwidth}%
+% adds an element to the footer, separated by footersymbol
+% usage: \addtofooter[footersymbol]{element}
+\newcommand*{\addtofooter}[2][\footersymbol]{%
+ \savebox{\footertempbbox}{\usebox{\footertempabox}#1#2}%
+ \settowidth{\footerboxwidth}{\usebox{\footertempbbox}}%
+ \ifnum\footerboxwidth<\footerwidth%
+ \savebox{\footertempabox}{\usebox{\footertempbbox}}
\else%
- { ~~\color{color2}\textbullet~~~}\fi\@firstfooterelementfalse}% \textbullet forces the use of the CMSY font, even when latin modern fonts are used :(
+ \flushfooter{}\\%
+ \savebox{\footertempabox}{#2}%
+ \savebox{\footertempbbox}{#2}\fi}
+% internal command to flush the footer
+\newcommand*{\flushfooter}{%
+ \strut\usebox{\footertempabox}%
+ \savebox{\footertempabox}{}%
+ \savebox{\footertempbbox}{}}
\renewcommand*{\makefooter}{%
+ \setlength{\footerwidth}{0.8\textwidth}%
\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}}}%
- }%
+ \parbox{\footerwidth}{%
+ \centering%
+ \color{color2}\addressfont%
+ \ifthenelse{\isundefined{\@addressstreet}}{}{\addtofooter[]{\addresssymbol\@addressstreet}%
+ \ifthenelse{\isundefined{\@addresscity}}{}{\addtofooter[~--~]{\@addresscity}}\flushfooter}%
+ \ifthenelse{\isundefined{\@mobile}}{}{\addtofooter[]{\mobilesymbol\@mobile}}%
+ \ifthenelse{\isundefined{\@phone}}{}{\addtofooter{\phonesymbol\@phone}}%
+ \ifthenelse{\isundefined{\@fax}}{}{\addtofooter{\faxsymbol\@fax}}%
+ \ifthenelse{\isundefined{\@email}}{}{\addtofooter{\emailsymbol\emaillink{\@email}}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\addtofooter{\homepagesymbol\httplink{\@homepage}}}%
+ \ifthenelse{\isundefined{\@extrainfo}}{}{\addtofooter{\@extrainfo}}%
+ \flushfooter}}}%
\pagestyle{plain}}
% maketitle
@@ -70,12 +89,15 @@
{\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]}%
+ \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}}%
+% optional title
+ \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\raggedleft\titlestyle{\@title}}\\[2.5em]%
% optional quote
\ifthenelse{\isundefined{\@quote}}%
{}%
- {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}%
+ {{\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