Improved the spacing between sections and subscetions by using \addvspace instead of \vspace
This commit is contained in:
@ -1,6 +1,11 @@
|
|||||||
version 0.18 (xx Feb 2012)
|
version 0.18 (xx Feb 2012)
|
||||||
- corrects the handling of pdf bookmarks, as suggested on stackexchange by
|
- corrected the handling of pdf bookmarks, as suggested on stackexchange by
|
||||||
U. Fischer.
|
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)
|
version 0.17 (25 Jan 2012)
|
||||||
- changed the footer algorithm of style casual to avoid starting lines with
|
- changed the footer algorithm of style casual to avoid starting lines with
|
||||||
|
|||||||
@ -3,3 +3,8 @@
|
|||||||
- Moderncv produces an error ("lonely \item--perhaps a missing list environment")
|
- Moderncv produces an error ("lonely \item--perhaps a missing list environment")
|
||||||
when used with bibentry, through the output is actually correct. Amongst other,
|
when used with bibentry, through the output is actually correct. Amongst other,
|
||||||
this causes compilation by LyX to stop.
|
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.
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
moderncv.cls
10
moderncv.cls
@ -176,11 +176,11 @@
|
|||||||
% design commands definitions
|
% design commands definitions
|
||||||
%-------------------------------------------------------------------------------
|
%-------------------------------------------------------------------------------
|
||||||
% symbols
|
% symbols
|
||||||
% itemize labels
|
% 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}{\textcolor{color1}{\Neutral}}% alternative" \fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102}
|
\newcommand*{\labelitemi}{\strut\textcolor{color1}{\Neutral}}% alternative" \fontencoding{U}\fontfamily{ding}\selectfont\tiny\symbol{'102}
|
||||||
\newcommand*{\labelitemii}{\textcolor{color1}{\large\bfseries-}}
|
\newcommand*{\labelitemii}{\strut\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*{\labelitemiii}{\strut\textcolor{color1}{\textperiodcentered}}% alternative: \textasteriskcentered; both force the use of the CMSY font, even when lmodern fonts are used :(
|
||||||
\newcommand*{\labelitemiv}{\textcolor{color1}{\textperiodcentered}}
|
\newcommand*{\labelitemiv}{\strut\textcolor{color1}{\textperiodcentered}}
|
||||||
% enumerate labels
|
% enumerate labels
|
||||||
\renewcommand{\theenumi}{\@arabic\c@enumi}
|
\renewcommand{\theenumi}{\@arabic\c@enumi}
|
||||||
\renewcommand{\theenumii}{\@alph\c@enumii}
|
\renewcommand{\theenumii}{\@alph\c@enumii}
|
||||||
|
|||||||
@ -92,9 +92,9 @@
|
|||||||
\parbox[b]{\textwidth-\maketitlepicturewidth}{%
|
\parbox[b]{\textwidth-\maketitlepicturewidth}{%
|
||||||
\raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\[-.35em]% alternate design: \MakeLowercase and no space
|
\raggedleft\namefont{\color{color2!50}\@firstname} {\color{color2}\@familyname}}\\[-.35em]% alternate design: \MakeLowercase and no space
|
||||||
{\color{color2!50}\rule{\textwidth}{.25ex}}%
|
{\color{color2!50}\rule{\textwidth}{.25ex}}%
|
||||||
% optional title
|
% optional title
|
||||||
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\raggedleft\titlestyle{\@title}}\\[2.5em]%
|
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\raggedleft\titlestyle{\@title}}\\[2.5em]%
|
||||||
% optional quote
|
% optional quote
|
||||||
\ifthenelse{\isundefined{\@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]}}%
|
||||||
|
|||||||
@ -122,34 +122,35 @@
|
|||||||
% optional quote
|
% optional quote
|
||||||
\ifthenelse{\isundefined{\@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}
|
\newlength{\baseletterheight}
|
||||||
\settoheight{\baseletterheight}{\sectionstyle{o}}
|
\settoheight{\baseletterheight}{\sectionstyle{o}}
|
||||||
\setlength{\baseletterheight}{\baseletterheight-0.95ex}
|
\setlength{\baseletterheight}{\baseletterheight-0.95ex}
|
||||||
\renewcommand*{\section}[1]{%
|
\renewcommand*{\section}[1]{%
|
||||||
\par\vspace{2.5ex}%
|
\par\addvspace{2.5ex}%
|
||||||
\phantomsection{}% reset the anchor for hyperrefs
|
\phantomsection{}% reset the anchor for hyperrefs
|
||||||
\addcontentsline{toc}{section}{#1}%
|
\addcontentsline{toc}{section}{#1}%
|
||||||
\parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
|
\parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%
|
||||||
\hspace{\separatorcolumnwidth}%
|
\hspace{\separatorcolumnwidth}%
|
||||||
\parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}%
|
\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]{%
|
\renewcommand*{\subsection}[1]{%
|
||||||
\par%
|
\par\addvspace{1ex}%
|
||||||
\phantomsection{}% reset the anchor for hyperrefs
|
\phantomsection{}% reset the anchor for hyperrefs
|
||||||
\addcontentsline{toc}{subsection}{#1}%
|
\addcontentsline{toc}{subsection}{#1}%
|
||||||
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
|
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
|
||||||
\raggedleft\hintfont{} &{\subsectionstyle{#1}}%
|
\raggedleft\hintfont{} &{\strut\subsectionstyle{#1}}%
|
||||||
\end{tabular}%
|
\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]{%
|
\renewcommand*{\cvitem}[3][.25em]{%
|
||||||
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
|
\begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
|
||||||
\raggedleft\hintfont{#2} &{#3}%
|
\raggedleft\hintfont{#2} &{#3}%
|
||||||
\end{tabular}\\[#1]}
|
\end{tabular}%
|
||||||
|
\par\addvspace{#1}}
|
||||||
|
|
||||||
\renewcommand*{\cvdoubleitem}[5][.25em]{%
|
\renewcommand*{\cvdoubleitem}[5][.25em]{%
|
||||||
\cvitem[#1]{#2}{%
|
\cvitem[#1]{#2}{%
|
||||||
@ -175,7 +176,7 @@
|
|||||||
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
|
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
|
||||||
\ifthenelse{\equal{#5}{}}{}{, #5}%
|
\ifthenelse{\equal{#5}{}}{}{, #5}%
|
||||||
\ifthenelse{\equal{#6}{}}{}{, #6}%
|
\ifthenelse{\equal{#6}{}}{}{, #6}%
|
||||||
.%
|
.\strut%
|
||||||
\ifx&%
|
\ifx&%
|
||||||
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
|
\else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
|
||||||
|
|
||||||
@ -194,7 +195,7 @@
|
|||||||
\renewenvironment{thebibliography}[1]%
|
\renewenvironment{thebibliography}[1]%
|
||||||
{%
|
{%
|
||||||
\bibliographyhead{\refname}%
|
\bibliographyhead{\refname}%
|
||||||
\small%
|
% \small%
|
||||||
\begin{list}{\bibliographyitemlabel}%
|
\begin{list}{\bibliographyitemlabel}%
|
||||||
{%
|
{%
|
||||||
\setlength{\topsep}{0pt}%
|
\setlength{\topsep}{0pt}%
|
||||||
|
|||||||
@ -126,7 +126,7 @@
|
|||||||
% optional quote
|
% optional quote
|
||||||
\ifthenelse{\isundefined{\@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
|
% optional details
|
||||||
\makeinfo{%
|
\makeinfo{%
|
||||||
\ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet}%
|
\ifthenelse{\isundefined{\@addressstreet}}{}{\maketitledetailsnewline\addresssymbol\@addressstreet}%
|
||||||
@ -139,27 +139,28 @@
|
|||||||
\ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}}}
|
\ifthenelse{\isundefined{\@extrainfo}}{}{\maketitledetailsnewline\@extrainfo}}}
|
||||||
|
|
||||||
\renewcommand*{\section}[1]{%
|
\renewcommand*{\section}[1]{%
|
||||||
\par\vspace{2.5ex}%
|
\par\addvspace{2.5ex}%
|
||||||
\phantomsection{}% reset the anchor for hyperrefs
|
\phantomsection{}% reset the anchor for hyperrefs
|
||||||
\addcontentsline{toc}{section}{#1}%
|
\addcontentsline{toc}{section}{#1}%
|
||||||
\parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}%
|
\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
|
||||||
|
|
||||||
\newif\@if
|
|
||||||
\renewcommand*{\subsection}[1]{%
|
\renewcommand*{\subsection}[1]{%
|
||||||
\par%
|
\par\addvspace{1ex}%
|
||||||
\phantomsection{}% reset the anchor for hyperrefs
|
\phantomsection{}% reset the anchor for hyperrefs
|
||||||
\addcontentsline{toc}{subsection}{#1}%
|
\addcontentsline{toc}{subsection}{#1}%
|
||||||
\subsectionstyle{#1}%
|
\strut\subsectionstyle{#1}%
|
||||||
\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]{%
|
\renewcommand*{\cvitem}[3][.25em]{%
|
||||||
\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }{#3}\\[#1]}
|
\ifthenelse{\equal{#2}{}}{}{{\hintfont#2}: }{#3}%
|
||||||
|
\par\addvspace{#1}}
|
||||||
|
|
||||||
\renewcommand*{\cvdoubleitem}[5][.25em]{%
|
\renewcommand*{\cvdoubleitem}[5][.25em]{%
|
||||||
\begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#2}: #3\end{minipage}%
|
\begin{minipage}[t]{\doubleitemcolumnwidth}{\hintfont#2}: #3\end{minipage}%
|
||||||
\hfill% fill of \separatorcolumnwidth
|
\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]{%
|
\renewcommand*{\cvlistitem}[2][.25em]{%
|
||||||
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
|
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemmaincolumnwidth}#2\end{minipage}}}
|
||||||
@ -181,17 +182,22 @@
|
|||||||
\setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}%
|
\setlength{\cventrytitleboxwidth}{\maincolumnwidth-\cventrytitleboxwidth}%
|
||||||
\begin{minipage}{\maincolumnwidth}%
|
\begin{minipage}{\maincolumnwidth}%
|
||||||
\parbox[t]{\cventrytitleboxwidth}{%
|
\parbox[t]{\cventrytitleboxwidth}{%
|
||||||
|
\strut%
|
||||||
{\bfseries#3}%
|
{\bfseries#3}%
|
||||||
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
|
\ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
|
||||||
\ifthenelse{\equal{#5}{}}{}{, #5}%
|
\ifthenelse{\equal{#5}{}}{}{, #5}%
|
||||||
\ifthenelse{\equal{#6}{}}{}{, #6}%
|
\ifthenelse{\equal{#6}{}}{}{, #6}%
|
||||||
.}%
|
.\strut}%
|
||||||
\usebox{\cventryyearbox}%
|
\usebox{\cventryyearbox}%
|
||||||
\end{minipage}%
|
\end{minipage}%
|
||||||
\ifx&%
|
\ifx&%
|
||||||
\else{%
|
\else{%
|
||||||
\newline{}\begin{minipage}[t]{\maincolumnwidth}\small#7\end{minipage}}\fi%
|
\newline{}%
|
||||||
\\[#1]}
|
\begin{minipage}[t]{\maincolumnwidth}%
|
||||||
|
\small%
|
||||||
|
#7%
|
||||||
|
\end{minipage}}\fi%
|
||||||
|
\par\addvspace{#1}}
|
||||||
|
|
||||||
|
|
||||||
\newbox{\cvitemwithcommentmainbox}
|
\newbox{\cvitemwithcommentmainbox}
|
||||||
@ -208,7 +214,7 @@
|
|||||||
\renewenvironment{thebibliography}[1]%
|
\renewenvironment{thebibliography}[1]%
|
||||||
{%
|
{%
|
||||||
\bibliographyhead{\refname}%
|
\bibliographyhead{\refname}%
|
||||||
\small%
|
% \small%
|
||||||
\begin{list}{\bibliographyitemlabel}%
|
\begin{list}{\bibliographyitemlabel}%
|
||||||
{%
|
{%
|
||||||
\setlength{\topsep}{0pt}%
|
\setlength{\topsep}{0pt}%
|
||||||
|
|||||||
Reference in New Issue
Block a user