diff --git a/examples/template-es.pdf b/examples/template-es.pdf index e0f7208..274210c 100644 Binary files a/examples/template-es.pdf and b/examples/template-es.pdf differ diff --git a/examples/template-zh.pdf b/examples/template-zh.pdf index 344f371..51d4623 100644 Binary files a/examples/template-zh.pdf and b/examples/template-zh.pdf differ diff --git a/examples/template.pdf b/examples/template.pdf index 837c1ec..4b361f2 100644 Binary files a/examples/template.pdf and b/examples/template.pdf differ diff --git a/examples/template.tex b/examples/template.tex index 4d77fdd..267e573 100644 --- a/examples/template.tex +++ b/examples/template.tex @@ -21,6 +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{\maketitlenamewidth}{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 \firstname{John} diff --git a/examples/template_banking_black.pdf b/examples/template_banking_black.pdf index 25b2d32..46ac5c5 100644 Binary files a/examples/template_banking_black.pdf and b/examples/template_banking_black.pdf differ diff --git a/examples/template_banking_red.pdf b/examples/template_banking_red.pdf index ff1d675..045d4cf 100644 Binary files a/examples/template_banking_red.pdf and b/examples/template_banking_red.pdf differ diff --git a/examples/template_casual_orange.pdf b/examples/template_casual_orange.pdf index d1c70a7..80158ed 100644 Binary files a/examples/template_casual_orange.pdf and b/examples/template_casual_orange.pdf differ diff --git a/examples/template_classic_green.pdf b/examples/template_classic_green.pdf index 9306310..659980c 100644 Binary files a/examples/template_classic_green.pdf and b/examples/template_classic_green.pdf differ diff --git a/examples/template_multibib.pdf b/examples/template_multibib.pdf index 2614d7c..5906a4d 100644 Binary files a/examples/template_multibib.pdf and b/examples/template_multibib.pdf differ diff --git a/moderncvstyleclassic.sty b/moderncvstyleclassic.sty index ac261ef..59266c1 100644 --- a/moderncvstyleclassic.sty +++ b/moderncvstyleclassic.sty @@ -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% @@ -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