[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: adapt color key of bookmark to l3color (6d629a6)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Aug 17 17:59:09 CEST 2021


Repository : https://github.com/latex3/pdfresources
On branch  : develop
Link       : https://github.com/latex3/pdfresources/commit/6d629a667eb621895dab5c021becb3380c7aaa5d

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

commit 6d629a667eb621895dab5c021becb3380c7aaa5d
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Aug 17 17:59:09 2021 +0200

    adapt color key of bookmark to l3color


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

6d629a667eb621895dab5c021becb3380c7aaa5d
 CHANGELOG.md         |  1 +
 hyperref-generic.dtx | 22 +++++++++++++++++++---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3dbeee6..f91154f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ this project uses date-based 'snapshot' version identifiers.
 ## [Unreleased]
 ### Changed
  - colorscheme 'original' has been renamed to 'primary-colors'
+ - color key is overwritten to use l3color
 
 ### Added
  - preliminary support for standard A-2a and A-3a 
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 63ac096..9f43bc8 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1489,11 +1489,27 @@
   { \msg_error:nn { hyp}{ missing-resource-management } }
 %    \end{macrocode}
 % Outlines/bookmarks require the bookmark package.
-% TODO check pdfpagemode if booksmarks are suppressed.
+% TODO check pdfpagemode if bookmarks are suppressed.
+% TODO We overwrite the color key here for now, but this should be moved to bookmark
+%
 %    \begin{macrocode}
+\AddToHook { package / after / bookmark}
+ {
+   \define at key{BKM}{color}
+     {
+       \__hyp_color_set:ne {__hyp/tmpa}{#1}
+       \color_export:nVN
+         {__hyp/tmpa}
+         \g__hyp_bordercolormodel_str
+         \BKM at color
+     }
+ }
 \legacy_if:nT { Hy at bookmarks }
   {
-    \AddToHook{begindocument/before}[hyperref/bookmark]{\RequirePackage{bookmark}}
+    \AddToHook{begindocument/before}[hyperref/bookmark]
+     {
+       \RequirePackage{bookmark}
+     }
   }
 \legacy_if:nT {Hy at draft}
   {
@@ -2415,7 +2431,7 @@
 %
 % \begin{function}{\@@_color_select:n}
 %   \begin{syntax}
-%    \cs{@@_color_select:nN} \Arg{color} \\
+%    \cs{@@_color_select:n} \Arg{color} \\
 %   \end{syntax}
 %  These commands select a (text) color.
 %  \Arg{color} should have either the format |[model]{value}| or be a color expression.





More information about the latex3-commits mailing list.