[latex3-commits] [latex3/latex2e] newlabel: use new label hook in showkeys (9b6547f9)
github at latex-project.org
github at latex-project.org
Thu May 11 19:21:24 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : newlabel
Link : https://github.com/latex3/latex2e/commit/9b6547f940775852b514944bb2cb24783996352f
>---------------------------------------------------------------
commit 9b6547f940775852b514944bb2cb24783996352f
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu May 11 19:21:24 2023 +0200
use new label hook in showkeys
>---------------------------------------------------------------
9b6547f940775852b514944bb2cb24783996352f
required/tools/changes.txt | 3 +++
required/tools/showkeys.dtx | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/required/tools/changes.txt b/required/tools/changes.txt
index f41e929f..6e377ada 100644
--- a/required/tools/changes.txt
+++ b/required/tools/changes.txt
@@ -4,6 +4,9 @@ It is provided for convenience only. It therefore makes no claims to
completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2023-05-11 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+ * showkeys.dtx: Use label hook if format new enough.
2023-03-30 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
diff --git a/required/tools/showkeys.dtx b/required/tools/showkeys.dtx
index 3aed90d3..71eacc7b 100644
--- a/required/tools/showkeys.dtx
+++ b/required/tools/showkeys.dtx
@@ -39,7 +39,7 @@
%<driver> \ProvidesFile{showkeys.drv}
% \fi
% \ProvidesFile{showkeys.dtx}
- [2022/04/12 v3.18 Show cite and label keys (DPC, MH)]
+ [2023/05/11 v3.19 Show cite and label keys (DPC, MH)]
%
% \iffalse
%<*driver>
@@ -342,16 +342,20 @@
% \begin{macro}{\label}
% \changes{v3.09}{1996/08/30}
% {Add extra group so brace hack works. Donald Arseneau tools/2147}
+% \changes{v3.19}{2023/05/11}
+% {Use label hook if format is new enough.}
% The new definition, print the argument, and then do the old
% definition.
% \begin{macrocode}
-\def\label#1{%
+\@ifl at t@r\fmtversion{2023-06-01}
+ {\AddToHookWithArguments{cmd/label/before}{\SK@\SK@@label{#1}}}
+ {\def\label#1{%
\@bsphack
\SK@\SK@@label{#1}%
\begingroup
\SK at label{#1}%
\endgroup
- \@esphack}
+ \@esphack}}
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.