[latex3-commits] [git/LaTeX3-latex3-hyperref] cleanup-patches: move ref, one still missing (7e43a08)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Apr 11 00:28:41 CEST 2022


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

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

commit 7e43a08c306f4d08fa95b4ff0ca827e844ac0e20
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Apr 11 00:28:41 2022 +0200

    move ref, one still missing


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

7e43a08c306f4d08fa95b4ff0ca827e844ac0e20
 hyperref.dtx | 10 +++++++++-
 nameref.dtx  | 12 ++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/hyperref.dtx b/hyperref.dtx
index ca87b85..2550a00 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -7344,6 +7344,8 @@
    \let \@pagerefstar\T at pageref
    \let \@refstar\T at ref
    \let \@namerefstar\T at nameref
+   \let \@Refstar\T at Ref
+   \let \HyRef at Ref\T at Ref
  \fi
 }
 \Hy at AtBeginDocument{%
@@ -12551,8 +12553,13 @@
 \Hy at AtBeginDocument{%
   \@ifpackageloaded{varioref}{%
 %    \end{macrocode}
-%    This requires a new varioref (after 2019-09)!
+%    This are the patches for a varioref newer after 2019-09
+%    Older versions are no longer supported.
+%    If |\Hy at nopatch@varioref| is defined we don't patch but assume
+%    that varioref handles the hyperlinks.
 %    \begin{macrocode}
+  \@ifundefined{Hy at nopatch@varioref}
+   {
    \renewcommand\Vref at star[2][]{%
      \begingroup
        \let\T at pageref\@pagerefstar
@@ -12585,6 +12592,7 @@
         \vpageref[#1]{#2}%
        \endgroup
     }%
+   }{}%
   }{}%
 }
 %    \end{macrocode}
diff --git a/nameref.dtx b/nameref.dtx
index a084aab..795aa34 100644
--- a/nameref.dtx
+++ b/nameref.dtx
@@ -646,6 +646,12 @@
 %    \xpackage{hyperref} or after
 %    \xpackage{hyperref}'s definitions in |\AtBeginDocument|.
 %    \begin{macrocode}
+\def\T at Ref#1{%
+    \NR at setref{#1}\NR at MakeUppercaseFirstOfFive{#1}%
+  }%
+\def\NR at MakeUppercaseFirstOfFive#1#2#3#4#5{%
+    \MakeUppercase#1%
+  }%
 \@ifpackageloaded{hyperref}{%
 }{%
 %    \end{macrocode}
@@ -661,12 +667,6 @@
 %    \end{macro}
 %    \begin{macro}{\Ref}
 %    \begin{macrocode}
-   \def\T at Ref#1{%
-       \NR at setref{#1}\NR at MakeUppercaseFirstOfFive{#1}%
-     }%
-   \def\NR at MakeUppercaseFirstOfFive#1#2#3#4#5{%
-       \MakeUppercase#1%
-     }%
    \DeclareRobustCommand*{\Ref}{%
      \@ifstar\T at Ref\T at Ref}%
 }





More information about the latex3-commits mailing list.