summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty19
1 files changed, 12 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
index 690f6c35509..799851a5f2a 100644
--- a/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
+++ b/Master/texmf-dist/tex/latex/moderncv/moderncvthemeclassic.sty
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvthemeclassic}[2011/11/11 v0.13.1 modern curriculum vitae style: classic]
+\ProvidesPackage{moderncvthemeclassic}[2011/12/04 v0.14 modern curriculum vitae style: classic]
%-------------------------------------------------------------------------------
@@ -123,14 +123,11 @@
% styles
% maketitle
-% setmaketitlenamemaxwidth to the full name length, capped by \maketitlenamemaxwidth
+% set \maketitlenamewidth to the desired length, or leave it up to moderncv to try to optimize it
\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
+\setlength{\maketitlenamewidth}{0pt}
\newlength{\maketitlepicturewidth}
\newlength{\maketitledetailswidth}
% recompute theme-specific lengths, called by class to recompute all lengths
@@ -142,7 +139,6 @@
{\setlength{\maketitlepicturewidth}{\@photowidth}
\addtolength{\maketitledetailswidth}{-\separatorcolumnwidth}%
\addtolength{\maketitledetailswidth}{-\maketitlepicturewidth}}}
-\recomputethemelengths
\newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\maketitledetailsnewline}{
\if@firstdetailselement%
@@ -150,6 +146,15 @@
\else%
\\[.2em]\fi}
\renewcommand*{\maketitle}{%
+ % recompute lengths (necessary to delay the computation of \maketitlenamefullwidth until \maketitle because of potential CJK requirement in \@firstname and \@familyname)
+ \ifdim\maketitlenamewidth=0pt%
+ \newlength{\maketitlenamefullwidth}%
+ \settowidth{\maketitlenamefullwidth}{\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}}%
+ \ifnum\maketitlenamemaxwidth<\maketitlenamefullwidth%
+ \setlength{\maketitlenamewidth}{\maketitlenamemaxwidth}%
+ \else%
+ \setlength{\maketitlenamewidth}{\maketitlenamefullwidth}\fi\fi
+ \recomputethemelengths{}%
% name and title
\begin{minipage}[b]{\maketitlenamewidth}%
\firstnamestyle{\@firstname~}\familynamestyle{\@familyname}%