summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvstyleclassic.sty
diff options
context:
space:
mode:
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