diff --git a/CHANGELOG b/CHANGELOG index 777fdd4..d6ebb9e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ version 0.18 (xx Feb 2012) -- corrects the handling of pdf bookmarks, as suggested on stackexchange by -U. Fischer. + - corrected the handling of pdf bookmarks, as suggested on stackexchange by + U. Fischer. + - corrected 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). + version 0.17 (25 Jan 2012) - changed the footer algorithm of style casual to avoid starting lines with diff --git a/KNOWN_BUGS b/KNOWN_BUGS index 92a6f36..8517a29 100644 --- a/KNOWN_BUGS +++ b/KNOWN_BUGS @@ -3,3 +3,8 @@ - Moderncv produces an error ("lonely \item--perhaps a missing list environment") when used with bibentry, through the output is actually correct. Amongst other, this causes compilation by LyX to stop. +- The space after a cventry gets eaten up when the last argument contains a nested + itemize environment. An ugly hack and uncomplete solution was implemented by + including a \strut in every item label, but this doesn't solve the problem for + multi-line items. Ideally, the strut should end the item, but there seem to be + no way to do this. diff --git a/examples/template-es.pdf b/examples/template-es.pdf index 3c03ff6..f6af113 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 b8bd21b..3b05041 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 a8ab00e..de87bf4 100644 Binary files a/examples/template.pdf and b/examples/template.pdf differ diff --git a/examples/template_casual_orange.pdf b/examples/template_casual_orange.pdf index 9bad8d2..d7568a4 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 824ec51..c57e8ed 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 65f0efe..269168c 100644 Binary files a/examples/template_multibib.pdf and b/examples/template_multibib.pdf differ diff --git a/moderncv.cls b/moderncv.cls index 4e0a568..4b10c84 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -176,11 +176,11 @@ % design commands definitions %------------------------------------------------------------------------------- % symbols -% itemize labels -\newcommand*{\labelitemi}{\textcolor{color1}{\Neutral}}% alternative" \fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102} -\newcommand*{\labelitemii}{\textcolor{color1}{\large\bfseries-}} -\newcommand*{\labelitemiii}{\textcolor{color1}{\textperiodcentered}}% alternative: \textasteriskcentered; both force the use of the CMSY font, even when lmodern fonts are used :( -\newcommand*{\labelitemiv}{\textcolor{color1}{\textperiodcentered}} +% itemize labels (the struts were added to correct inter-item spacing (works for single line items, until a solution is found for multi-line ones...) +\newcommand*{\labelitemi}{\strut\textcolor{color1}{\Neutral}}% alternative" \fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102} +\newcommand*{\labelitemii}{\strut\textcolor{color1}{\large\bfseries-}} +\newcommand*{\labelitemiii}{\strut\textcolor{color1}{\textperiodcentered}}% alternative: \textasteriskcentered; both force the use of the CMSY font, even when lmodern fonts are used :( +\newcommand*{\labelitemiv}{\strut\textcolor{color1}{\textperiodcentered}} % enumerate labels \renewcommand{\theenumi}{\@arabic\c@enumi} \renewcommand{\theenumii}{\@alph\c@enumii} diff --git a/moderncvstylecasual.sty b/moderncvstylecasual.sty index d9ac5d3..e074e9e 100644 --- a/moderncvstylecasual.sty +++ b/moderncvstylecasual.sty @@ -92,9 +92,9 @@ \parbox[b]{\textwidth-\maketitlepicturewidth}{% \raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\[-.35em]% alternate design: \MakeLowercase and no space {\color{color2!50}\rule{\textwidth}{.25ex}}% -% optional title + % optional title \ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\raggedleft\titlestyle{\@title}}\\[2.5em]% -% optional quote + % optional quote \ifthenelse{\isundefined{\@quote}}% {}% {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% diff --git a/moderncvstyleclassic.sty b/moderncvstyleclassic.sty index bce1ca9..81cef2a 100644 --- a/moderncvstyleclassic.sty +++ b/moderncvstyleclassic.sty @@ -122,34 +122,35 @@ % optional quote \ifthenelse{\isundefined{\@quote}}% {}% - {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% - } + {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% + \par}% to avoid weird spacing bug at the first section if no blank line is left after \maketitle \newlength{\baseletterheight} \settoheight{\baseletterheight}{\sectionstyle{o}} \setlength{\baseletterheight}{\baseletterheight-0.95ex} \renewcommand*{\section}[1]{% - \par\vspace{2.5ex}% + \par\addvspace{2.5ex}% \phantomsection{}% reset the anchor for hyperrefs \addcontentsline{toc}{section}{#1}% \parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}% \hspace{\separatorcolumnwidth}% \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}% - \par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading + \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading \renewcommand*{\subsection}[1]{% - \par% + \par\addvspace{1ex}% \phantomsection{}% reset the anchor for hyperrefs \addcontentsline{toc}{subsection}{#1}% \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}% - \raggedleft\hintfont{} &{\subsectionstyle{#1}}% + \raggedleft\hintfont{} &{\strut\subsectionstyle{#1}}% \end{tabular}% - \par\nobreak\vskip 0.5ex\@afterheading}% to avoid a pagebreak after the heading + \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}% - \end{tabular}\\[#1]} + \end{tabular}% + \par\addvspace{#1}} \renewcommand*{\cvdoubleitem}[5][.25em]{% \cvitem[#1]{#2}{% @@ -175,7 +176,7 @@ \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}% \ifthenelse{\equal{#5}{}}{}{, #5}% \ifthenelse{\equal{#6}{}}{}{, #6}% - .% + .\strut% \ifx&% \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}} @@ -194,7 +195,7 @@ \renewenvironment{thebibliography}[1]% {% \bibliographyhead{\refname}% - \small% +% \small% \begin{list}{\bibliographyitemlabel}% {% \setlength{\topsep}{0pt}% diff --git a/moderncvstyleoldstyle.sty b/moderncvstyleoldstyle.sty index e23cb43..ee39b05 100644 --- a/moderncvstyleoldstyle.sty +++ b/moderncvstyleoldstyle.sty @@ -126,7 +126,7 @@ % optional quote \ifthenelse{\isundefined{\@quote}}% {}% - {{\centering{}\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% + {{\centering\begin{minipage}{\quotewidth}\centering\quotestyle{\@quote}\end{minipage}\\[2.5em]}}% % optional details \makeinfo{% \ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet}% @@ -139,27 +139,28 @@ \ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}}} \renewcommand*{\section}[1]{% - \par\vspace{2.5ex}% + \par\addvspace{2.5ex}% \phantomsection{}% reset the anchor for hyperrefs \addcontentsline{toc}{section}{#1}% - \parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}% - \par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading + \strut\sectionstyle{#1}% + \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading -\newif\@if \renewcommand*{\subsection}[1]{% - \par% + \par\addvspace{1ex}% \phantomsection{}% reset the anchor for hyperrefs \addcontentsline{toc}{subsection}{#1}% - \subsectionstyle{#1}% - \par\nobreak\vskip 0.5ex\@afterheading}% to avoid a pagebreak after the heading + \strut\subsectionstyle{#1}% + \par\nobreak\addvspace{0.5ex}\@afterheading}% to avoid a pagebreak after the heading \renewcommand*{\cvitem}[3][.25em]{% - \ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }{#3}\\[#1]} + \ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }{#3}% + \par\addvspace{#1}} \renewcommand*{\cvdoubleitem}[5][.25em]{% \begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#2}: #3\end{minipage}% \hfill% fill of \separatorcolumnwidth - \begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#4}: #5\end{minipage}\\[#1]} + \begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#4}: #5\end{minipage}% + \par\addvspace{#1}} \renewcommand*{\cvlistitem}[2][.25em]{% \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}} @@ -181,17 +182,22 @@ \setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}% \begin{minipage}{\maincolumnwidth}% \parbox[t]{\cventrytitleboxwidth}{% + \strut% {\bfseries#3}% \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}% \ifthenelse{\equal{#5}{}}{}{, #5}% \ifthenelse{\equal{#6}{}}{}{, #6}% - .}% + .\strut}% \usebox{\cventryyearbox}% \end{minipage}% \ifx&% \else{% - \newline{}\begin{minipage}[t]{\maincolumnwidth}\small#7\end{minipage}}\fi% - \\[#1]} + \newline{}% + \begin{minipage}[t]{\maincolumnwidth}% + \small% + #7% + \end{minipage}}\fi% + \par\addvspace{#1}} \newbox{\cvitemwithcommentmainbox} @@ -208,7 +214,7 @@ \renewenvironment{thebibliography}[1]% {% \bibliographyhead{\refname}% - \small% +% \small% \begin{list}{\bibliographyitemlabel}% {% \setlength{\topsep}{0pt}%