From f10694a6ef0f3496263ede7941d8f11f49de00cd Mon Sep 17 00:00:00 2001 From: Xavier Danaux Date: Sat, 4 Feb 2012 23:56:48 +0100 Subject: [PATCH] Added a check in the oldstyle style for an empty 4th argument in the \cvdoubleitem definition --- CHANGELOG | 4 +++- moderncvstyleclassic.sty | 8 ++++---- moderncvstyleoldstyle.sty | 16 ++++++++-------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d6ebb9e..e648ac2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,12 @@ version 0.18 (xx Feb 2012) - corrected the handling of pdf bookmarks, as suggested on stackexchange by U. Fischer. - - corrected the spacing between sections and subsections by using \addvspace + - improved the spacing between sections and subsections by using \addvspace instead of \vspace. - corrected the spacing between entries with nested itemize environments (temporary solution working only for single line items). + - added a check in the oldstyle style for an empty 4th argument in the + \cvdoubleitem definition, to avoid printing a colon without preceding label. version 0.17 (25 Jan 2012) diff --git a/moderncvstyleclassic.sty b/moderncvstyleclassic.sty index 81cef2a..21e2a88 100644 --- a/moderncvstyleclassic.sty +++ b/moderncvstyleclassic.sty @@ -142,13 +142,13 @@ \phantomsection{}% reset the anchor for hyperrefs \addcontentsline{toc}{subsection}{#1}% \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}% - \raggedleft\hintfont{} &{\strut\subsectionstyle{#1}}% + \raggedleft\hintstyle{} &{\strut\subsectionstyle{#1}}% \end{tabular}% \par\nobreak\addvspace{0.5ex}\@afterheading}% to avoid a pagebreak after the heading \renewcommand*{\cvitem}[3][.25em]{% \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}% - \raggedleft\hintfont{#2} &{#3}% + \raggedleft\hintstyle{#2} &{#3}% \end{tabular}% \par\addvspace{#1}} @@ -156,7 +156,7 @@ \cvitem[#1]{#2}{% \begin{minipage}[t]{\doubleitemmaincolumnwidth}#3\end{minipage}% \hfill% fill of \separatorcolumnwidth - \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintfont{#4}\end{minipage}% + \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintstyle{#4}\end{minipage}% \hspace*{\separatorcolumnwidth}% \begin{minipage}[t]{\doubleitemmaincolumnwidth}#5\end{minipage}}} @@ -188,7 +188,7 @@ \setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}% \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}% \cvitem[#1]{#2}{% - \begin{minipage}[t]{\cvitemwithcommentmainlength}\textbf{#3}\end{minipage}% + \begin{minipage}[t]{\cvitemwithcommentmainlength}\bfseries#3\end{minipage}% \hfill% fill of \separatorcolumnwidth \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}}} diff --git a/moderncvstyleoldstyle.sty b/moderncvstyleoldstyle.sty index ee39b05..5c81522 100644 --- a/moderncvstyleoldstyle.sty +++ b/moderncvstyleoldstyle.sty @@ -153,13 +153,13 @@ \par\nobreak\addvspace{0.5ex}\@afterheading}% to avoid a pagebreak after the heading \renewcommand*{\cvitem}[3][.25em]{% - \ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }{#3}% + \ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }{#3}% \par\addvspace{#1}} \renewcommand*{\cvdoubleitem}[5][.25em]{% - \begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#2}: #3\end{minipage}% + \begin{minipage}[t]{\doubleitemcolumnwidth}\hintstyle{#2}: #3\end{minipage}% \hfill% fill of \separatorcolumnwidth - \begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#4}: #5\end{minipage}% + \begin{minipage}[t]{\doubleitemcolumnwidth}\ifthenelse{\equal{#4}{}}{}{\hintstyle{#4}: }#5\end{minipage}% \par\addvspace{#1}} \renewcommand*{\cvlistitem}[2][.25em]{% @@ -177,7 +177,7 @@ \renewcommand*{\cventry}[7][.25em]{% \savebox{\cventryyearbox}{% \hspace*{2\separatorcolumnwidth}% - {\hintfont#2}}% + \hintstyle{#2}}% \setlength{\cventrytitleboxwidth}{\widthof{\usebox{\cventryyearbox}}}% \setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}% \begin{minipage}{\maincolumnwidth}% @@ -199,17 +199,17 @@ \end{minipage}}\fi% \par\addvspace{#1}} - \newbox{\cvitemwithcommentmainbox} \newlength{\cvitemwithcommentmainlength} \newlength{\cvitemwithcommentcommentlength} \renewcommand*{\cvitemwithcomment}[4][.25em]{% - \savebox{\cvitemwithcommentmainbox}{\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }#3}% + \savebox{\cvitemwithcommentmainbox}{\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }#3}% \setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}% \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}% - \begin{minipage}[t]{\cvitemwithcommentmainlength}\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }#3\end{minipage}% + \begin{minipage}[t]{\cvitemwithcommentmainlength}\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }#3\end{minipage}% \hfill% fill of \separatorcolumnwidth - \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}\\[#1]} + \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}% + \par\addvspace{#1}} \renewenvironment{thebibliography}[1]% {%