[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: add hook for manual destination name (88c5f55)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Aug 3 17:21:12 CEST 2021
Repository : https://github.com/latex3/hyperref
On branch : cleanup-patches
Link : https://github.com/latex3/hyperref/commit/88c5f559614dd08debbc2d3c7b33900750fc042b
>---------------------------------------------------------------
commit 88c5f559614dd08debbc2d3c7b33900750fc042b
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Aug 3 17:21:12 2021 +0200
add hook for manual destination name
>---------------------------------------------------------------
88c5f559614dd08debbc2d3c7b33900750fc042b
hyperref.dtx | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/hyperref.dtx b/hyperref.dtx
index d7c3c63..c313431 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -10625,11 +10625,23 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\Hy at MakeCurrentHrefAuto}
-% \begin{macrocode}
-\def\Hy at MakeCurrentHrefAuto#1{%
- \Hy at GlobalStepCount\Hy at linkcounter
- \Hy at MakeCurrentHref{#1.\the\Hy at linkcounter}%
-}
+% This command is e.g. used to create destinations for unnumbered sections and
+% chapters. For new formats we add a (currently private) hook which allows
+% to change the name of the next destination.
+% \begin{macrocode}
+\@ifl at t@r\fmtversion{2020-10-01}
+ {
+ \NewHook{__hyp/dest/makeauto}
+ \def\Hy at MakeCurrentHrefAuto#1{%
+ \Hy at GlobalStepCount\Hy at linkcounter
+ \Hy at MakeCurrentHref{#1.\the\Hy at linkcounter}%
+ \UseHook{__hyp/dest/makeauto}}
+ }
+ {
+ \def\Hy at MakeCurrentHrefAuto#1{%
+ \Hy at GlobalStepCount\Hy at linkcounter
+ \Hy at MakeCurrentHref{#1.\the\Hy at linkcounter}}
+ }
% \end{macrocode}
% \end{macro}
%
More information about the latex3-commits
mailing list.