From fa2a29ef6564da92ff9b4caede3dd5456dd48eb6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 14 Jun 2010 22:31:12 +0000 Subject: moderncv 0.10 (13jun10) git-svn-id: svn://tug.org/texlive/trunk@18974 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/moderncv/moderncv.cls | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'Master/texmf-dist/tex/latex/moderncv/moderncv.cls') diff --git a/Master/texmf-dist/tex/latex/moderncv/moderncv.cls b/Master/texmf-dist/tex/latex/moderncv/moderncv.cls index 28101252ecd..816527c82e2 100644 --- a/Master/texmf-dist/tex/latex/moderncv/moderncv.cls +++ b/Master/texmf-dist/tex/latex/moderncv/moderncv.cls @@ -83,12 +83,12 @@ %------------------------------------------------------------------------------- % required packages %------------------------------------------------------------------------------- -% \AtEndPreamble hook (could load package etoolbox instead of defining it) -%\RequirePackage{etoolbox} -\let\@endpreamblehook\@empty -\def\AtEndPreamble{\g@addto@macro\@endpreamblehook} -\let\moderncv@document\document -\def\document{\endgroup\@endpreamblehook\begingroup\moderncv@document} +% \AtEndPreamble hook (loading tetoolbox instead of defining the macro, as to avoid incompatibilities with etoolbox (and packages relying on it) defining the macro too) +\RequirePackage{etoolbox} +%\let\@endpreamblehook\@empty +%\def\AtEndPreamble{\g@addto@macro\@endpreamblehook} +%\let\moderncv@document\document +%\def\document{\endgroup\@endpreamblehook\begingroup\moderncv@document} % if... then... else... constructs \RequirePackage{ifthen} @@ -165,7 +165,7 @@ \RequirePackage[dvips]{graphicx}\fi % headers and footers -\usepackage{fancyhdr} +\RequirePackage{fancyhdr} \fancypagestyle{plain}{ \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} @@ -329,6 +329,14 @@ \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 +% 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} + { + \RequirePackage{suffix} + \WithSuffix\newcommand\section*{\section} + }{} +} % usage: \subsection{title} \newcommand*{\subsection}[1]{% -- cgit v1.2.3