[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: small typos, update attribute command (3b4a626)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun Mar 10 23:59:20 CET 2019


Repository : https://github.com/latex3/pdfresources
On branch  : testlinkstuff
Link       : https://github.com/latex3/pdfresources/commit/3b4a62629eb4fb5d0d26deb6dcb5e67c844614c7

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

commit 3b4a62629eb4fb5d0d26deb6dcb5e67c844614c7
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun Mar 10 23:59:20 2019 +0100

    small typos, update attribute command


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

3b4a62629eb4fb5d0d26deb6dcb5e67c844614c7
 .gitignore               |    3 +++
 hluatex-experimental.def |   57 ++++++++++++++++------------------------------
 pdfresources.dtx         |    2 +-
 test-pdfresources.tex    |    1 +
 4 files changed, 24 insertions(+), 39 deletions(-)

diff --git a/.gitignore b/.gitignore
index ded9e15..50b7262 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,6 @@ build/*
 *.out
 *.synctex
 *.synctex.gz
+*.glo
+*.idx
+*.hd
diff --git a/hluatex-experimental.def b/hluatex-experimental.def
index ce47451..cd00164 100644
--- a/hluatex-experimental.def
+++ b/hluatex-experimental.def
@@ -11,6 +11,7 @@
 %%\Hy at VersionCheck{hluatex.def}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % variants of hyperref commands to get attributes in the prop
+\RequirePackage{xparse}
 \ExplSyntaxOn
 \def\Hy at EXPsetpdfborder
  {
@@ -68,6 +69,16 @@
       { [\@filebordercolor] }
    \fi
   }
+
+% for now we are updating the attribute manually after \hypersetup
+% some better method must be found
+\NewDocumentCommand\hypupdateattribute { }
+{
+ \Hy at EXPsetpdfborder
+ \Hy at EXPsetpdfhighlight
+ \Hy at EXPseturlbordercolor
+ \Hy at EXPsetfilebordercolor
+}
 \ExplSyntaxOff
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \protected\def\pdfcatalog        {\pdfextension catalog }
@@ -474,52 +485,22 @@
     \Hy at pstringdef\Hy at pstringURI{#2}%
     \hyper at chars
     \leavevmode
-    \Hy at EXPsetpdfborder
-    \Hy at EXPsetpdfhighlight
-    \Hy at EXPseturlbordercolor
     \pdf_startlink_user:nn { url }
     {
-     {%
-       /Subtype/Link%
-       \ifHy at pdfa /F 4\fi
-       /A<<%
-         /Type/Action%
-         /S/URI%
-         /URI(\Hy at pstringURI)%
+       /Subtype/Link
+       \ifHy at pdfa /F~4\fi
+       /A<<
+         /Type/Action~
+         /S/URI~
+         /URI(\Hy at pstringURI)~
          \ifHy at href@ismap
-           /IsMap true%
+           /IsMap~true~
          \fi
          \Hy at href@nextactionraw
-       >>%
-      }%
+       >>
     }
     \Hy at colorlink\@urlcolor#1\Hy at xspace@end
     \close at pdflink
-    \pdfstartlink
-      attr{%
-        \Hy at setpdfborder
-        \Hy at setpdfhighlight
-        \ifx\@urlbordercolor\relax
-        \else
-          /C[\@urlbordercolor]%
-        \fi
-      }%
-      user{%
-       /Subtype/Link%
-       \ifHy at pdfa /F 4\fi
-       /A<<%
-         /Type/Action%
-         /S/URI%
-         /URI(\Hy at pstringURI)%
-         \ifHy at href@ismap
-           /IsMap true%
-         \fi
-         \Hy at href@nextactionraw
-       >>%
-      }%
-      \relax
-    \Hy at colorlink\@urlcolor#1\Hy at xspace@end
-    \close at pdflink
   \endgroup
 }
 \ExplSyntaxOff
diff --git a/pdfresources.dtx b/pdfresources.dtx
index 2fb1c66..5f06aeb 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -135,7 +135,7 @@
 % So we need a generic command to start a pdflink which allows packages to add
 % their code to the \texttt{attr} argument through hooks.
 %    \begin{macrocode}
-\cs_new:Nn \pdf__get_key_value:nn { #1~#2 } %name?????
+\cs_new:Nn \pdf__get_key_value:nn { #1~#2~ } %name?????
 %    \end{macrocode}
 % Attributes are stored in a property list. Packages can add attributes through
 % dedicated command. We assume that there will be different link types (url, file, run, \ldots)
diff --git a/test-pdfresources.tex b/test-pdfresources.tex
index b1c0409..42cbdf2 100644
--- a/test-pdfresources.tex
+++ b/test-pdfresources.tex
@@ -20,6 +20,7 @@
 
 \usepackage[customdriver=hluatex-experimental]{hyperref}
 \hypersetup{urlcolor=red,pdfborder={1 1 1}}
+\hypupdateattribute
 \makeatletter
 \begin{document}
 %test driver link.





More information about the latex3-commits mailing list