[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: start color conversion (88997a9)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Jan 14 00:51:56 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : reworking-annot
Link       : https://github.com/latex3/pdfresources/commit/88997a9a33d1b77ee4142137fba3868b9a9e5350

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

commit 88997a9a33d1b77ee4142137fba3868b9a9e5350
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Jan 14 00:51:56 2021 +0100

    start color conversion


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

88997a9a33d1b77ee4142137fba3868b9a9e5350
 hyperref-generic.dtx | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index e425b70..ce0e622 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -2114,6 +2114,33 @@
       }
     ,pdfborder .initial:n = {0~0~1},
   }
+%    \end{macrocode}
+% Color keys need to parse color expressions. Two types are supported:
+%  |color=[rgb]{1,0,.5}| and
+%  |color=red!50!blue|
+%    \begin{macrocode}
+\prop_map_inline:Nn \c_@@_map_hyp_annot_prop
+  {
+    \keys_define:nn { hyp / setup }
+      {
+        #1bordercolor .code:n =
+          {
+             \tl_if_empty:nTF { ##1 }
+               {
+                 \pdfannot_dict_remove:nn
+                  {link/#2}
+                  { C }
+               }
+               {
+                 \pdfannot_dict_put:nnn
+                   {link/#2}
+                   { C }
+                   { [##1] }
+               }
+          }
+      }
+  }
+
 
 \prop_map_inline:Nn \c_@@_map_hyp_annot_prop
   {





More information about the latex3-commits mailing list.