summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-06 23:36:45 +0000
committerKarl Berry <karl@freefriends.org>2012-02-06 23:36:45 +0000
commita75f7e798d1c5d31c4bcb89338923f0120ccc6df (patch)
tree08781946fa861b70b58e3e8d7d8d7d510a24af98 /Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
parent28d6df0334340cc773572c1c4897bdc640d5423a (diff)
moderncv 0.19 (6feb12)
git-svn-id: svn://tug.org/texlive/trunk@25319 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty20
1 files changed, 14 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
index ac261ef8bdd..2ee5989eb25 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstyleclassic}[2012/02/05 v0.18 modern curriculum vitae style scheme: classic]
+\ProvidesPackage{moderncvstyleclassic}[2012/02/06 v0.19 modern curriculum vitae style scheme: classic]
%-------------------------------------------------------------------------------
@@ -73,6 +73,11 @@
% fancyhdr lengths
\renewcommand{\headwidth}{\textwidth}}
+
+% optional maketitle width to force a certain width (if set to 0pt, the width is calculated automatically)
+\newlength{\maketitlenamewidth}
+\setlength{\maketitlenamewidth}{0pt}% dummy value
+% internal maketitle command to issue a new line only when required
\newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\maketitledetailsnewline}{
\if@firstdetailselement%
@@ -85,8 +90,8 @@
\savebox{\maketitledetailsbox}{%
\addressfont\color{color2}%
\begin{tabular}[b]{@{}r@{}}%
- \ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet}%
- \ifthenelse{\isundefined{\@addresscity}}{}{\maketitledetailsnewline\@addresscity}%
+ \ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet%
+ \ifthenelse{\equal{\@addresscity}{}}{}{\maketitledetailsnewline\@addresscity}}% if \addresstreet is defined, \addresscity will always be defined but could be empty
\ifthenelse{\isundefined{\@mobile}}{}{\maketitledetailsnewline\mobilesymbol\@mobile}%
\ifthenelse{\isundefined{\@phone}}{}{\maketitledetailsnewline\phonesymbol\@phone}%
\ifthenelse{\isundefined{\@fax}}{}{\maketitledetailsnewline\faxsymbol\@fax}%
@@ -103,20 +108,23 @@
{%
\hspace*{\separatorcolumnwidth}%
\color{color1}%
- \setlength\fboxrule{\@photoframewidth}%
+ \setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title
\newlength{\maketitledetailswidth}\settowidth{\maketitledetailswidth}{\usebox{\maketitledetailsbox}}%
\newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}%
- \newlength{\maketitlenamewidth}\setlength{\maketitlenamewidth}{\textwidth-\maketitledetailswidth-\maketitlepicturewidth}%
+ \ifthenelse{\lengthtest{\maketitlenamewidth=0pt}}% check for dummy value (equivalent to \ifdim\maketitlenamewidth=0pt)
+ {\setlength{\maketitlenamewidth}{\textwidth-\maketitledetailswidth-\maketitlepicturewidth}}%
+ {}%
\begin{minipage}[b]{\maketitlenamewidth}%
\namestyle{\@firstname\ \@familyname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}%
+ \hfill%
% detailed information
- \usebox{\maketitledetailsbox}%
+ \llap{\usebox{\maketitledetailsbox}}% \llap is used to suppress the width of the box, allowing overlap if the value of maketitlenamewidth is forced
% optional photo
\usebox{\maketitlepicturebox}\\[2.5em]%
% optional quote