summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/moderncv/moderncv.cls22
1 files changed, 15 insertions, 7 deletions
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]{%