diff --git a/examples/template.tex b/examples/template.tex index fbfd347..ea0b9ff 100644 --- a/examples/template.tex +++ b/examples/template.tex @@ -21,7 +21,7 @@ % adjust the page margins \usepackage[scale=0.75]{geometry} %\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates -%\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... +%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks... % personal data \name{John}{Doe} diff --git a/moderncvcompatibility.sty b/moderncvcompatibility.sty index 681eaf4..f0ca454 100644 --- a/moderncvcompatibility.sty +++ b/moderncvcompatibility.sty @@ -97,6 +97,9 @@ \newcommand*{\mobilesymbol}{\mobilephonesymbol} \newcommand*{\faxsymbol}{\faxphonesymbol} +% compatibility with versions <= 1.5.1 +\newcommand*{\makecvtitlenamewidth}{\makecvheadnamewidth} % only used in header variants 1 and 4, themself used by the classic and oldstyle styles + \endinput diff --git a/moderncvheadi.sty b/moderncvheadi.sty index 3c57891..8c9ab97 100644 --- a/moderncvheadi.sty +++ b/moderncvheadi.sty @@ -54,8 +54,7 @@ %------------------------------------------------------------------------------- % lengths \@initializelength{\quotewidth} -% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically) -\@initializelength{\makecvheadnamewidth} +\@initializelength{\makecvheadnamewidth}% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically) \renewcommand*{\recomputecvheadlengths}{% \setlength{\quotewidth}{0.65\textwidth}} diff --git a/moderncvheadii.sty b/moderncvheadii.sty index f6d19c3..2062e98 100644 --- a/moderncvheadii.sty +++ b/moderncvheadii.sty @@ -93,8 +93,6 @@ %------------------------------------------------------------------------------- % lengths \@initializelength{\quotewidth} -% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically) -\@initializelength{\makecvheadnamewidth} \renewcommand*{\recomputecvheadlengths}{% \setlength{\makeheaddetailswidth}{\textwidth}% \setlength{\quotewidth}{0.65\textwidth}} diff --git a/moderncvheadiv.sty b/moderncvheadiv.sty index bed59f5..f3ceaf7 100644 --- a/moderncvheadiv.sty +++ b/moderncvheadiv.sty @@ -49,6 +49,7 @@ %------------------------------------------------------------------------------- % lengths \@initializelength{\quotewidth} +\@initializelength{\makecvheadnamewidth}% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically) \setlength{\marginparwidth}{0\p@} \setlength{\marginparsep}{0\p@} \renewcommand*{\recomputecvheadlengths}{% @@ -86,7 +87,9 @@ \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}% % name and optional title \newlength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}% - \newlength{\makecvheadnamewidth}\setlength{\makecvheadnamewidth}{\textwidth-\makecvheadpicturewidth}% + \ifthenelse{\lengthtest{\makecvheadnamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvheadnamewidth=0pt) + {\setlength{\makecvheadnamewidth}{\textwidth-\makecvheadpicturewidth}}% + {}% \begin{minipage}[b]{\makecvheadnamewidth}% \namestyle{\@firstname\ \@lastname}% \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}% diff --git a/moderncvheadv.sty b/moderncvheadv.sty index e00be88..7a2c15b 100644 --- a/moderncvheadv.sty +++ b/moderncvheadv.sty @@ -48,8 +48,6 @@ %------------------------------------------------------------------------------- % lengths \@initializelength{\quotewidth} -% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically) -\@initializelength{\makecvheadnamewidth} \renewcommand*{\recomputecvheadlengths}{% \setlength{\quotewidth}{0.65\textwidth}}