texlive[73398] Master/texmf-dist: fancyhdr (11jan25)

commits+karl at tug.org commits+karl at tug.org
Sat Jan 11 00:03:43 CET 2025


Revision: 73398
          https://tug.org/svn/texlive?view=revision&revision=73398
Author:   karl
Date:     2025-01-11 00:03:42 +0100 (Sat, 11 Jan 2025)
Log Message:
-----------
fancyhdr (11jan25)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/fancyhdr/README
    trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf
    trunk/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx
    trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty
    trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty

Modified: trunk/Master/texmf-dist/doc/latex/fancyhdr/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/fancyhdr/README	2025-01-10 23:03:30 UTC (rev 73397)
+++ trunk/Master/texmf-dist/doc/latex/fancyhdr/README	2025-01-10 23:03:42 UTC (rev 73398)
@@ -5,7 +5,7 @@
 and footers, and for controlling their use (for example, at times when
 LaTeX would automatically change the heading style in use).
 
-This is version 5.1 of fancyhdr.sty and extramarks.sty.
+This is version 5.1.1 of fancyhdr.sty and extramarks.sty.
 
 The distribution package from CTAN (e.g. fancyhdr.zip)
 consists of the following files:
@@ -17,15 +17,15 @@
 
 After processing (by tex) of fancyhdr.ins, the following package files will be generated:
 
-fancyhdr.sty      v5.1 2025/01/06 the LaTeX package
-extramarks.sty    v5.1 2025/01/06 a package for additional marks
+fancyhdr.sty      v5.1.1 2025/01/07 the LaTeX package
+extramarks.sty    v5.1.1 2025/01/07 a package for additional marks
 extramarks-v4.sty v4.5 2024/11/30 a legacy version of extramarks.sty
 fancyheadings.sty v4.1 2022/11/09 this loads fancyhdr with a warning message
 
-If you have a user distribution package from github (fancyhdr-dist-5.1.zip),
+If you have a user distribution package from github (fancyhdr-dist-5.1.1.zip),
 then you don't have to do this processing.
 
-If you have a source distribution from github (fancyhdr-5.1.zip),
+If you have a source distribution from github (fancyhdr-5.1.1.zip),
 it will also contain the .sty files, but not the .pdf file.
 To create fancyhdr.pdf, either just run the 'make' command, or:
 latexmk fancyhdr.dtx

Modified: trunk/Master/texmf-dist/doc/latex/fancyhdr/fancyhdr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx	2025-01-10 23:03:30 UTC (rev 73397)
+++ trunk/Master/texmf-dist/source/latex/fancyhdr/fancyhdr.dtx	2025-01-10 23:03:42 UTC (rev 73398)
@@ -26,7 +26,7 @@
 %<fancyhdr>\ProvidesPackage{fancyhdr}%
 %<fancyheadings>\ProvidesPackage{fancyheadings}
 %<extramarks|extramarks-v4>\ProvidesPackage{extramarks}
-%<fancyhdr|extramarks>           [2025/01/06 v5.1
+%<fancyhdr|extramarks>           [2025/01/07 v5.1.1
 %<fancyhdr>                  Extensive control of page headers and footers]%
 %<fancyheadings>           [2022/11/09 v4.1
 %<fancyheadings>                  Legacy package to call fancyhdr]
@@ -959,21 +959,6 @@
 % We define each of the six ``fields'' and the two decorative lines
 % separately.
 %
-% \begin{fblock}
-%   \textbf{NOTE:} In \pkg{fancyhdr} version 4.3 and later, paragraph
-% hooks will not work inside \pkg{fancyhdr} headers and footers to
-% avoid unwanted interactions with the main text. However, in version
-% 5.1 and later, it is possible to use paragraph hooks locally in
-% headers and footers. But the hooks defined in the main text will still be
-% disabled in the headers and footers.
-% \end{fblock}
-% \NoExample{parahooks}
-% \begin{example}
-% \AddToHook{fancyhdr/before}{%
-%   \AddToHook{para/begin}{XXXX}%
-% }
-% \end{example}
-%
 % \section{A simple example}
 % \label{sec:simple}
 %
@@ -3661,6 +3646,23 @@
 % \pkg{fancyhdr} is not used in a document, the hooks don't do anything.
 % \end{itemize}
 %
+% \begin{fblock}
+%   \textbf{NOTE:} In \pkg{fancyhdr} version 4.3 and later, paragraph
+% hooks will not work inside \pkg{fancyhdr} headers and footers to
+% avoid unwanted interactions with the main text.
+% However, in version 5.1 and later, the hooks defined in the main text
+% will still be disabled in the headers and footers. But it is possible
+% to use paragraph hooks locally in headers and footers. Se the example below.
+%
+% \textbf{NOTE: This is experimental and may change in the future.}
+% \end{fblock}
+% \NoExample{parahooks}
+% \begin{example}
+% \AddToHook{fancyhdr/before}{%
+%   \AddToHook{para/begin}{XXXX}%
+% }
+% \end{example}
+%
 % \section{Headers and footers induced by the text}
 % \label{sec:xmarks}
 %
@@ -5148,11 +5150,15 @@
 %     \cs{fancyhfwidth} (section~\ref{sec:field-width}).
 %   \item Many documentation improvements.
 %   \end{itemize}
-% \item Version 5.1, Jan 4, 2025
+% \item Version 5.1, Jan 4-6, 2025
 %   \begin{itemize}
 %   \item Bug fix in \pkg{extramarks}.
 %   \item Better code to save, clear and restore paragraph hooks in headers/footers.
 %   \end{itemize}
+% \item Version 5.1.1, Jan 7, 2025
+%   \begin{itemize}
+%   \item Bugfix in save, clear and restore paragraph hooks in headers/footers.
+%   \end{itemize}
 % \end{itemize}
 %
 %
@@ -6679,6 +6685,9 @@
 % ones. We check the kernel version to see if it support paragraph hooks.}
 % \changes{fancyhdr v5.1}{2025/01/06}{A new way to disable the paragraph
 % hooks in headers and footers.}
+% \changes{fancyhdr v5.1.1}{2025/01/07}{Use low-level commands to reset
+% paragraph hooks to prevent LaTeX error when ruinning with latex3
+% debugging.}
 % The way we do this now: Every hook consists of 4 global `variables':
 % \begin{itemize}
 % \item \cs{__hook \meta{name}}
@@ -6696,19 +6705,20 @@
 % Save a (paragraph) hook locally and and clear it globally.
 % Restore it globally at the end of header/footer processing.
 %    \begin{macrocode}
+    \prop_new:N \f at nch@empty_code_prop
     \def\f at nch@saveclr at parhook #1{
       \expandafter\let\csname f at nch@__hook~#1\expandafter\endcsname
                       \csname __hook~#1\endcsname
-      \tl_gclear:c {__hook~#1}
+      \expandafter\gdef\csname __hook~#1\endcsname { }
       \expandafter\let\csname f at nch@__hook_toplevel~#1\expandafter\endcsname
                       \csname __hook_toplevel~#1\endcsname
-      \tl_gclear:c {__hook_toplevel~#1}
+      \expandafter\gdef\csname __hook_toplevel~#1\endcsname { }
       \expandafter\let\csname f at nch@__hook_next~#1\expandafter\endcsname
                       \csname __hook_next~#1\endcsname
-      \tl_gclear:c {__hook_next~#1}
+      \expandafter\gdef\csname __hook_next~#1\endcsname { }
       \expandafter\let\csname f at nch@g__hook_#1_code_prop\expandafter\endcsname
                       \csname g__hook_#1_code_prop\endcsname
-      \prop_gclear_new:c {g__hook_#1_code_prop}
+      \global\expandafter\let\csname g__hook_#1_code_prop\endcsname \f at nch@empty_code_prop
     }
     \def\f at nch@restore at parhook #1{
       \global\expandafter\let\csname __hook~#1\expandafter\endcsname
@@ -7090,6 +7100,8 @@
 % \changes{fancyhdr v4.5}{2024/12/05}{Hooks added}
 % \changes{fancyhdr v5.0}{2025/01/01}{Support for \cs{fancyheadwidth},
 % \cs{fancyfootwidth} and \cs{fancyhfwidth}.}
+% \changes{fancyhdr v5.1}{2025/01/06}{Add paragraph hook restore code
+% (\cs{f at nch@restorepar}).}
 %   Put together a header (\cs{f at nch@head}) or footer (\cs{f at nch@foot})
 %   given the left, center and right text and their widths,
 %   fillers at left and right and a rule. The \cs{xlap} commands put
@@ -7156,6 +7168,8 @@
 % \changes{fancyhdr v4.5}{2024/12/05}{Hooks added}
 % \changes{fancyhdr v5.0}{2025/01/01}{Support for \cs{fancyheadwidth},
 % \cs{fancyfootwidth} and \cs{fancyhfwidth}.}
+% \changes{fancyhdr v5.1}{2025/01/06}{Add paragraph hook restore code
+% (\cs{f at nch@restorepar}).}
 % We put the \cs{footrule} in a \cs{vbox} to accommodate for flexible
 % footrules (e.g., using \cs{hrulefill}), so that the \cs{headwidth} will
 % be used as the line width. But to preserve the vertical spacing we
@@ -8086,7 +8100,7 @@
 \providecommand\DeclareRelease[3]{}
 \providecommand\DeclareCurrentRelease[2]{}
 \DeclareRelease{v4}{2024/11/30}{extramarks-v4.sty}
-\DeclareCurrentRelease{}{2025/01/06}
+\DeclareCurrentRelease{}{2025/01/07}
 \@ifundefined{NewMarkClass}
              {\PackageWarningNoLine{extramarks}{%
 **************************************************\MessageBreak

Modified: trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty	2025-01-10 23:03:30 UTC (rev 73397)
+++ trunk/Master/texmf-dist/tex/latex/fancyhdr/extramarks.sty	2025-01-10 23:03:42 UTC (rev 73398)
@@ -21,7 +21,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{extramarks}
-           [2025/01/06 v5.1
+           [2025/01/07 v5.1.1
                   Extra marks for LaTeX]
 % Copyright (C) 1994-2025 by Pieter van Oostrum <pieter at vanoostrum.org>
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -28,7 +28,7 @@
 \providecommand\DeclareRelease[3]{}
 \providecommand\DeclareCurrentRelease[2]{}
 \DeclareRelease{v4}{2024/11/30}{extramarks-v4.sty}
-\DeclareCurrentRelease{}{2025/01/06}
+\DeclareCurrentRelease{}{2025/01/07}
 \@ifundefined{NewMarkClass}
              {\PackageWarningNoLine{extramarks}{%
 **************************************************\MessageBreak

Modified: trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty	2025-01-10 23:03:30 UTC (rev 73397)
+++ trunk/Master/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty	2025-01-10 23:03:42 UTC (rev 73398)
@@ -21,7 +21,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{fancyhdr}%
-           [2025/01/06 v5.1
+           [2025/01/07 v5.1.1
                   Extensive control of page headers and footers]%
 % Copyright (C) 1994-2025 by Pieter van Oostrum <pieter at vanoostrum.org>
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -269,19 +269,20 @@
   \ExplSyntaxOn
   \providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
   \IfFormatAtLeastTF{2021-06-01}{
+    \prop_new:N \f at nch@empty_code_prop
     \def\f at nch@saveclr at parhook #1{
       \expandafter\let\csname f at nch@__hook~#1\expandafter\endcsname
                       \csname __hook~#1\endcsname
-      \tl_gclear:c {__hook~#1}
+      \expandafter\gdef\csname __hook~#1\endcsname { }
       \expandafter\let\csname f at nch@__hook_toplevel~#1\expandafter\endcsname
                       \csname __hook_toplevel~#1\endcsname
-      \tl_gclear:c {__hook_toplevel~#1}
+      \expandafter\gdef\csname __hook_toplevel~#1\endcsname { }
       \expandafter\let\csname f at nch@__hook_next~#1\expandafter\endcsname
                       \csname __hook_next~#1\endcsname
-      \tl_gclear:c {__hook_next~#1}
+      \expandafter\gdef\csname __hook_next~#1\endcsname { }
       \expandafter\let\csname f at nch@g__hook_#1_code_prop\expandafter\endcsname
                       \csname g__hook_#1_code_prop\endcsname
-      \prop_gclear_new:c {g__hook_#1_code_prop}
+      \global\expandafter\let\csname g__hook_#1_code_prop\endcsname \f at nch@empty_code_prop
     }
     \def\f at nch@restore at parhook #1{
       \global\expandafter\let\csname __hook~#1\expandafter\endcsname



More information about the tex-live-commits mailing list.