Reintroduced the ability to force the width reserved to display the name in the resume header for the classic style (\maketitlenamewidth)

This commit is contained in:
Xavier Danaux
2012-02-06 15:55:54 +01:00
parent 65a8a4fa2b
commit 481dc8288f
10 changed files with 12 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -21,6 +21,7 @@
% adjust the page margins % adjust the page margins
\usepackage[scale=0.75]{geometry} \usepackage[scale=0.75]{geometry}
%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates %\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 % personal data
\firstname{John} \firstname{John}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -73,6 +73,11 @@
% fancyhdr lengths % fancyhdr lengths
\renewcommand{\headwidth}{\textwidth}} \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 \newif\if@firstdetailselement\@firstdetailselementtrue
\newcommand*{\maketitledetailsnewline}{ \newcommand*{\maketitledetailsnewline}{
\if@firstdetailselement% \if@firstdetailselement%
@ -103,20 +108,23 @@
{% {%
\hspace*{\separatorcolumnwidth}% \hspace*{\separatorcolumnwidth}%
\color{color1}% \color{color1}%
\setlength\fboxrule{\@photoframewidth}% \setlength{\fboxrule}{\@photoframewidth}%
\ifdim\@photoframewidth=0pt% \ifdim\@photoframewidth=0pt%
\setlength{\fboxsep}{0pt}\fi% \setlength{\fboxsep}{0pt}\fi%
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}% \framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and title % name and title
\newlength{\maketitledetailswidth}\settowidth{\maketitledetailswidth}{\usebox{\maketitledetailsbox}}% \newlength{\maketitledetailswidth}\settowidth{\maketitledetailswidth}{\usebox{\maketitledetailsbox}}%
\newlength{\maketitlepicturewidth}\settowidth{\maketitlepicturewidth}{\usebox{\maketitlepicturebox}}% \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}% \begin{minipage}[b]{\maketitlenamewidth}%
\namestyle{\@firstname\ \@familyname}% \namestyle{\@firstname\ \@familyname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}% \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
\end{minipage}% \end{minipage}%
\hfill%
% detailed information % 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 % optional photo
\usebox{\maketitlepicturebox}\\[2.5em]% \usebox{\maketitlepicturebox}\\[2.5em]%
% optional quote % optional quote