[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: don't defined starred ref if it exist (325173f)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun May 1 00:39:37 CEST 2022


Repository : https://github.com/latex3/hyperref
On branch  : cleanup-patches
Link       : https://github.com/latex3/hyperref/commit/325173fc48e7dea1fc1655c5d2aaa7d289ed261f

>---------------------------------------------------------------

commit 325173fc48e7dea1fc1655c5d2aaa7d289ed261f
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun May 1 00:39:37 2022 +0200

    don't defined starred ref if it exist


>---------------------------------------------------------------

325173fc48e7dea1fc1655c5d2aaa7d289ed261f
 hyperref.dtx | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/hyperref.dtx b/hyperref.dtx
index 4dc735b..4b77b0c 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -9381,15 +9381,18 @@
 %    \end{macrocode}
 
 %    Ignore star from referencing macros:
+%    This is only needed if LaTeX doesn't define the starred
+%    variants itself.
 %    \begin{macrocode}
-\LetLtxMacro\NoHy at OrgRef\ref
-\DeclareRobustCommand*{\ref}{%
+\@ifundefined{@kernel at ref}
+ {\LetLtxMacro\NoHy at OrgRef\ref
+  \DeclareRobustCommand*{\ref}{%
   \@ifstar\NoHy at OrgRef\NoHy at OrgRef
-}
-\LetLtxMacro\NoHy at OrgPageRef\pageref
-\DeclareRobustCommand*{\pageref}{%
+  }
+  \LetLtxMacro\NoHy at OrgPageRef\pageref
+  \DeclareRobustCommand*{\pageref}{%
   \@ifstar\NoHy at OrgPageRef\NoHy at OrgPageRef
-}
+ }}{}
 %    \end{macrocode}
 %
 % \section{Localized nullifying of package}





More information about the latex3-commits mailing list.