diff options
Diffstat (limited to 'macros/latex/contrib/fancyhdr/fancyhdr.dtx')
-rw-r--r-- | macros/latex/contrib/fancyhdr/fancyhdr.dtx | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/macros/latex/contrib/fancyhdr/fancyhdr.dtx b/macros/latex/contrib/fancyhdr/fancyhdr.dtx index c20c966b8b..64810dd5cd 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|extramarks> [2024/07/23 v4.3.1 +%<fancyhdr|extramarks> [2024/11/20 v4.4 %<fancyhdr> Extensive control of page headers and footers]% %<fancyheadings> [2022/11/09 v4.1 %<fancyheadings> Legacy package to call fancyhdr] @@ -3075,13 +3075,19 @@ % Therefore paragraph hooks will not work inside \Package{fancyhdr} headers and % footers to avoid unwanted interactions with the main text. % \end{itemize} -% \item % Version 4.3.1, July 23, 2024 +% \item Version 4.3.1, July 23, 2024 % \begin{itemize} % \item Also reset \cs{everypar} to its original \TeX{} value % \cs{tex\_everypar:D} in \cs{f@nch@resetpar}, otherwise environments % based on \cs{trivlist} will not work properly in \Package{fancyhdr} % headers and footers. % \end{itemize} +% \item Version 4.4, Nov 20, 2024 +% \begin{itemize} +% \item Add setting the new style marks for \cs{leftmark} +% (\texttt{2e-left}) and \cs{rightmark} (\texttt{2e-right} and +% \texttt{2e-right-nonempty}) in \Package{extramarks.sty}. +% \end{itemize} % \end{itemize} % % @@ -4798,7 +4804,34 @@ % \begin{macro}{\markboth} % Our own definition of \cs{markboth}, mainly because \cs{@markboth} % gets more parameters. +% \changes{extramarks v4.4}{2024/11/20}{Add setting the new style marks +% for \cs{leftmark} (\texttt{2e-left}) and \cs{rightmark} +% (\texttt{2e-right} and \texttt{2e-right-nonempty}). We do this only if +% the new marks are defined in the \LaTeX{} kernel.} +% First the definition for modern \LaTeX{} distributions. % \begin{macrocode} +\ifdefined\ExplSyntaxOn +\ExplSyntaxOn +\DeclareRobustCommand*\markboth[2]{% + \begingroup + \let\label\relax \let\index\relax \let\glossary\relax + \expandafter\@markboth\@themark{#1}{#2}% + \@temptokena \expandafter{\@themark}% + \ifdefined\mark_insert:nn + % 3 new lines to set the new marks + \mark_insert:nn{2e-left}{#1} + \mark_insert:nn{2e-right}{#2} + \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} } + \fi + \mark{\the\@temptokena}% + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi} +\ExplSyntaxOff +% \end{macrocode} +% If we are with a pre-\LaTeX3 kernel, we use the definition from an +% older version of \Package{extramarks}. +% \begin{macrocode} +\else \def\markboth#1#2{% \begingroup \let\label\relax \let\index\relax \let\glossary\relax @@ -4807,6 +4840,7 @@ \mark{\the\@temptokena}% \endgroup \if@nobreak\ifvmode\nobreak\fi\fi} +\fi % \end{macrocode} % \end{macro} % \begin{macro}{\@mkboth} |