[latex3-commits] [latex3/latex2e] newlabel: revert hook name to label (1494dd40)
github at latex-project.org
github at latex-project.org
Fri May 12 12:03:45 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : newlabel
Link : https://github.com/latex3/latex2e/commit/1494dd4087fc7594ddaa673b45668f5718c661bc
>---------------------------------------------------------------
commit 1494dd4087fc7594ddaa673b45668f5718c661bc
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri May 12 12:03:45 2023 +0200
revert hook name to label
>---------------------------------------------------------------
1494dd4087fc7594ddaa673b45668f5718c661bc
base/doc/ltnews37.tex | 2 +-
base/ltxref.dtx | 8 ++++----
base/testfiles/tlb-label-001.lvt | 2 +-
required/tools/showkeys.dtx | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/base/doc/ltnews37.tex b/base/doc/ltnews37.tex
index 666a60eb..dcc2799d 100644
--- a/base/doc/ltnews37.tex
+++ b/base/doc/ltnews37.tex
@@ -384,7 +384,7 @@ Starting with this release, the number of values have been unified.
\cs{@currentlabel}, \cs{thepage}, \cs{@currentlabelname},
\cs{@currentHref}. The fifth value is reserved for the kernel.
-Additionally a hook with one argument with the name \texttt{cmd/label/before} has been
+Additionally a hook with one argument with the name \texttt{label} has been
added. It is executed before the label writes to the \texttt{.aux} file
but \emph{after} the \cs{@bsphack} command and \emph{inside} a group. Code
using the hook can refer to the label argument with \verb+#1+.
diff --git a/base/ltxref.dtx b/base/ltxref.dtx
index 5e1f85cd..bbdf15fc 100644
--- a/base/ltxref.dtx
+++ b/base/ltxref.dtx
@@ -390,14 +390,14 @@
\providecommand\@currentlabelname{}
\providecommand\@currentHref{}
\providecommand\@kernel at reserved@data{}
-\NewHookWithArguments{cmd/label/before}{1}
+\NewHookWithArguments{label}{1}
\def\label#1{\@bsphack
- \begingroup
- \UseHookWithArguments{cmd/label/before}{1}{#1}%
+ %\begingroup
+ \UseHookWithArguments{label}{1}{#1}%
\protected at write\@auxout{}%
{\string\newlabel{#1}{{\@currentlabel}{\thepage}%
{\@currentlabelname}{\@currentHref}{\@kernel at reserved@data}}}%
- \endgroup
+ %\endgroup
\@esphack}
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
diff --git a/base/testfiles/tlb-label-001.lvt b/base/testfiles/tlb-label-001.lvt
index b1577763..4ef94de6 100644
--- a/base/testfiles/tlb-label-001.lvt
+++ b/base/testfiles/tlb-label-001.lvt
@@ -13,7 +13,7 @@
\START \showoutput
\makeatletter
\AddToHookWithArguments
- {cmd/label/before}{\typeout{Setting label #1:
+ {label}{\typeout{Setting label #1:
\@currentlabel, \@currentlabelname, \@currentHref}}
\refstepcounter{section}
diff --git a/required/tools/showkeys.dtx b/required/tools/showkeys.dtx
index 71eacc7b..5407e4b6 100644
--- a/required/tools/showkeys.dtx
+++ b/required/tools/showkeys.dtx
@@ -348,7 +348,7 @@
% definition.
% \begin{macrocode}
\@ifl at t@r\fmtversion{2023-06-01}
- {\AddToHookWithArguments{cmd/label/before}{\SK@\SK@@label{#1}}}
+ {\AddToHookWithArguments{label}{\SK@\SK@@label{#1}}}
{\def\label#1{%
\@bsphack
\SK@\SK@@label{#1}%
More information about the latex3-commits
mailing list.