From acd71285ca866203901c5d49403bbcb31bd7bb8f Mon Sep 17 00:00:00 2001 From: Xavier Danaux Date: Tue, 3 Aug 2010 23:23:19 -0400 Subject: [PATCH] Fix for Launchpad bug #409902 --- CHANGELOG | 6 +++++- moderncv.cls | 17 +++++++++-------- moderncvcompatibility.sty | 2 +- moderncvthemecasual.sty | 2 +- moderncvthemeclassic.sty | 2 +- moderncvthemeempty.sty | 2 +- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3636514..f8ffbb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +version 0.12 (03 August 2010) + - prevents pagebreaks after sections and subsections (launchpad bug #409902), + as originally reported by C. Gaspoz and fixed by launchpad user tentotwo). + version 0.11 (20 July 2010) - removed the \ifpdf check when loading the graphicx package, as graphicx does does check internally and this was preventing proper functionning with xelatex @@ -8,7 +12,7 @@ version 0.11 (20 July 2010) version 0.10 (13 June 2010) - fixed a compatibility issue with the natbib package (natbib uses \section* to format the bibliography title, while only \section was defined by moderncv), - as reported on launchpad (bug #393920). + as reported on launchpad (launchpad bug #393920). - fixed a compatibility issues with (any package relying on) the etoolbox package, due to the double definition of \AtEndPreamble, as reported by D. Becker. diff --git a/moderncv.cls b/moderncv.cls index 530be77..431367e 100644 --- a/moderncv.cls +++ b/moderncv.cls @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{moderncv}[2010/07/20 v0.11 modern curriculum vitae document class] +\ProvidesClass{moderncv}[2010/08/03 v0.12 modern curriculum vitae document class] %------------------------------------------------------------------------------- @@ -315,8 +315,8 @@ \phantomsection{}% reset the anchor for hyperrefs \addcontentsline{toc}{part}{#1}% \hspace{\separatorcolumnwidth}% - \parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}\\[1ex]} -% \cvline[1ex]{\color{sectionrectanglecolor}\rule[0]{\hintscolumnwidth}{1ex}}{\sectionstyle{#1}}}% gives bad alignment of rectangle; too bad m{width} columns seem not to work as a valid column definition for tabular environments + \parbox[m]{\maincolumnwidth}{\sectionstyle{#1}}% + \par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading % starred variant, which is identical but defined to allow its use (e.g. for natbib compatibility, who uses \section*{} for the bibliography header) \AtEndPreamble{% \@ifpackageloaded{natbib} @@ -328,11 +328,12 @@ % usage: \subsection{title} \newcommand*{\subsection}[1]{% - \cvline[0.5ex]{}{% - \subsectionstyle{#1}% -% \phantomsection{}% reset the anchor for hyperrefs -% \addcontentsline{toc}{chapter}{#1}% does not work, the bookmark is placed at the same level as sections (placed themselves at part level to be visible, as hyperref does not allow sections without parents...) - }} + \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}% + \raggedleft\hintfont{} &{\subsectionstyle{#1}}% + \end{tabular}% + \par\nobreak\vskip 0.5ex\@afterheading}% to avoid a pagebreak after the heading +% \phantomsection{}% reset the anchor for hyperrefs +% \addcontentsline{toc}{chapter}{#1}% does not work, the bookmark is placed at the same level as sections (placed themselves at part level to be visible, as hyperref does not allow sections without parents...) % usage: \cvline{margintext}{linetext} \newcommand*{\cvline}[3][.25em]{% diff --git a/moderncvcompatibility.sty b/moderncvcompatibility.sty index 28a4e5b..f0e7945 100644 --- a/moderncvcompatibility.sty +++ b/moderncvcompatibility.sty @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvcompatibility}[2010/07/20 v0.11 modern curriculum vitae compatibility patches] +\ProvidesPackage{moderncvcompatibility}[2010/08/03 v0.12 modern curriculum vitae compatibility patches] %------------------------------------------------------------------------------- diff --git a/moderncvthemecasual.sty b/moderncvthemecasual.sty index adb8556..588e5cc 100644 --- a/moderncvthemecasual.sty +++ b/moderncvthemecasual.sty @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvthemecasual}[2010/07/20 v0.11 modern curriculum vitae style: casual] +\ProvidesPackage{moderncvthemecasual}[2010/08/03 v0.12 modern curriculum vitae style: casual] %------------------------------------------------------------------------------- diff --git a/moderncvthemeclassic.sty b/moderncvthemeclassic.sty index 91a962f..772aae7 100644 --- a/moderncvthemeclassic.sty +++ b/moderncvthemeclassic.sty @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvthemeclassic}[2010/07/20 v0.11 modern curriculum vitae style: classic] +\ProvidesPackage{moderncvthemeclassic}[2010/08/03 v0.12 modern curriculum vitae style: classic] %------------------------------------------------------------------------------- diff --git a/moderncvthemeempty.sty b/moderncvthemeempty.sty index 4d1ad83..a76d6da 100644 --- a/moderncvthemeempty.sty +++ b/moderncvthemeempty.sty @@ -10,7 +10,7 @@ % identification %------------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{moderncvthemeempty}[2010/07/20 v0.11 modern curriculum vitae style: empty] +\ProvidesPackage{moderncvthemeempty}[2010/08/03 v0.12 modern curriculum vitae style: empty] %-------------------------------------------------------------------------------