[latex3-commits] [git/LaTeX3-latex3-hyperref] testnewkeyval: colorlinks, pdfpagelabels, pdfescapeform (68f32cd)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Jul 7 11:41:10 CEST 2022


Repository : https://github.com/latex3/hyperref
On branch  : testnewkeyval
Link       : https://github.com/latex3/hyperref/commit/68f32cdc44050b7ad5cc91bebc144e22ce7ac677

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

commit 68f32cdc44050b7ad5cc91bebc144e22ce7ac677
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Jul 7 11:41:10 2022 +0200

    colorlinks, pdfpagelabels, pdfescapeform


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

68f32cdc44050b7ad5cc91bebc144e22ce7ac677
 hyperref.dtx | 32 +++++++++++++++++++++++++++-----
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/hyperref.dtx b/hyperref.dtx
index 8f39eba..f633a40 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -6391,21 +6391,27 @@
        ,colorlinks .choice:
        ,colorlinks / true .code:n =
         {
-          \AtEndOfPackage {\keys_set:nn { hyp / setup }{colorlinks=true}}
+          \AddToHook{package/hyperref/after} {\keys_set:nn { hyp / setup }{colorlinks=true}}
         }
        ,colorlinks / false .code:n =
         {
-          \AtEndOfPackage {\keys_set:nn { hyp / setup }{colorlinks=false}}
+          \AddToHook{package/hyperref/after} {\keys_set:nn { hyp / setup }{colorlinks=false}}
         }
        ,colorlinks .default:n = true
        ,hidelinks .code:n =
         {
-          \AtEndOfPackage {\keys_set:nn { hyp / setup }{hidelinks}}
+          \AddToHook{package/hyperref/after} {\keys_set:nn { hyp / setup }{hidelinks}}
         }
-       ,ocgcolorlinks .code:n =
+       ,ocgcolorlinks .choice:
+       ,ocgcolorlinks / true .code:n =
         {
-          \AtEndOfPackage {\keys_set:nn { hyp / setup }{ocgcolorlinks=#1}}
+          \AddToHook{package/hyperref/after} {\keys_set:nn { hyp / setup }{ocgcolorlinks=true}}
         }
+       ,ocgcolorlinks / false .code:n =
+        {
+          \AddToHook{package/hyperref/after} {\keys_set:nn { hyp / setup }{ocgcolorlinks=false}}
+        }
+       ,ocgcolorlinks .default:n = true
      }
  }
  {
@@ -7339,9 +7345,25 @@
 \define at key{Hyp}{pdfpagelabels}[true]{%
   \Hy at boolkey{pdfpagelabels}{#1}%
 }
+%    \end{macrocode}
+% pdfpagelabels is a load only option as the commands are defined in the drivers.
+%    \begin{macrocode}
+\DeclareKeys
+ {
+   ,pdfpagelabels .legacy_if_set:n = Hy at pdfpagelabels
+   ,pdfpagelabels .usage:n = load
+ }
+%    \end{macrocode}
+% pdfescapeform is used in the form code. It is probably useless but to
+% avoid compability problems we done change that.
+%    \begin{macrocode}
 \define at key{Hyp}{pdfescapeform}[true]{%
   \Hy at boolkey{pdfescapeform}{#1}%
 }
+\DeclareKeys
+ {
+   ,pdfescapeform .legacy_if_set:n = Hy at pdfescapeform   
+ }
 %    \end{macrocode}
 % Default values:
 %    \begin{macrocode}





More information about the latex3-commits mailing list.