summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fancyhdr/fancyhdr.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/fancyhdr/fancyhdr.dtx')
-rw-r--r--macros/latex/contrib/fancyhdr/fancyhdr.dtx30
1 files changed, 25 insertions, 5 deletions
diff --git a/macros/latex/contrib/fancyhdr/fancyhdr.dtx b/macros/latex/contrib/fancyhdr/fancyhdr.dtx
index 41e7ebb598..9c7a90992e 100644
--- a/macros/latex/contrib/fancyhdr/fancyhdr.dtx
+++ b/macros/latex/contrib/fancyhdr/fancyhdr.dtx
@@ -26,7 +26,7 @@
%<fancyhdr>\ProvidesPackage{fancyhdr}%
%<fancyheadings>\ProvidesPackage{fancyheadings}
%<extramarks>\ProvidesPackage{extramarks}
-%<fancyhdr|fancyheadings|extramarks> [2022/05/10 v4.0.2
+%<fancyhdr|fancyheadings|extramarks> [2022/05/18 v4.0.3
%<fancyhdr> Extensive control of page headers and footers]%
%<fancyheadings> Legacy package to call fancyhdr]
%<extramarks> Extra marks for LaTeX]
@@ -2993,6 +2993,11 @@
% \item Miscellaneous small documentation changes.
% \item Make \cs{fancyhead} etc. \cs{long}.
% \end{itemize}
+% \item Version 4.0.3, May 18, 2022
+% \begin{itemize}
+% \item Initialize \cs{@mkboth} in \texttt{extramarks.sty} so that
+% it will pick up changes to \cs{markboth}.
+% \end{itemize}
% \end{itemize}
%
%
@@ -3490,6 +3495,10 @@
% The redefinition of the \texttt{headings} style also differs for
% book-like and article-like classes. It also differs for
% one-side and two-side modes.
+% \changes{fancyhdr v4.0.3}{2022/05/18}{Changed definition of
+% \cs{@mkboth} from \cs{let}\cs{@mkboth}\cs{markboth} to
+% \cs{def}\Cmd{@mkboth\{\cs{protect}\cs{markboth}\}} so that it will pick up changes
+% to \cs{markboth}}
% \begin{macrocode}
\DeclareOption{headings}{%
\f@nch@ifundefined{chapter}{%
@@ -3497,7 +3506,7 @@
% \end{macrocode}
% An article in two-side mode:
% \begin{macrocode}
- \def\ps@headings{\ps@f@nch@fancyproto \let\@mkboth\markboth
+ \def\ps@headings{\ps@f@nch@fancyproto \def\@mkboth{\protect\markboth}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}%
\fancyhead[RE]{\slshape\leftmark}%
@@ -3513,7 +3522,7 @@
% \end{macrocode}
% An article in one-side mode:
% \begin{macrocode}
- \def\ps@headings{\ps@f@nch@fancyproto \let\@mkboth\markboth
+ \def\ps@headings{\ps@f@nch@fancyproto \def\@mkboth{\protect\markboth}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}%
\fancyhead[RE]{\slshape\leftmark}%
@@ -3528,7 +3537,7 @@
% \end{macrocode}
% A book in two-side mode:
% \begin{macrocode}
- \def\ps@headings{\ps@f@nch@fancyproto \let\@mkboth\markboth
+ \def\ps@headings{\ps@f@nch@fancyproto \def\@mkboth{\protect\markboth}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}%
\fancyhead[RE]{\slshape\leftmark}%
@@ -3545,7 +3554,7 @@
% \end{macrocode}
% A book in one-side mode:
% \begin{macrocode}
- \def\ps@headings{\ps@f@nch@fancyproto \let\@mkboth\markboth
+ \def\ps@headings{\ps@f@nch@fancyproto \def\@mkboth{\protect\markboth}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}%
\fancyhead[RE]{\slshape\leftmark}%
@@ -4606,6 +4615,17 @@
\if@nobreak\ifvmode\nobreak\fi\fi}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\@mkboth}
+% Initialization of \cs{@mkboth}, so that it will pick up changes to
+% \cs{markboth}
+% \changes{extramarks v4.0.3}{2022/05/18}{Initialize definition of
+% \cs{@mkboth} to \cs{def}\Cmd{@mkboth\{\cs{protect}\cs{markboth}\}}
+% if it wasn't equal to \cs{@gobbletwo} so that it will pick up
+% changes to \cs{markboth}}
+% \begin{macrocode}
+\ifx\@mkboth\@gobbletwo\else\def\@mkboth{\protect\markboth}\fi
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\markright}
% We use the standard definition of \cs{markright}. No use to duplicate here.
% \end{macro}