[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: url seems to work (9118d8b)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sat Apr 13 01:14:43 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : testlinkstuff
Link : https://github.com/latex3/pdfresources/commit/9118d8b3624d2b2478e11d8e5612a67b421e84d1
>---------------------------------------------------------------
commit 9118d8b3624d2b2478e11d8e5612a67b421e84d1
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sat Apr 13 01:14:43 2019 +0200
url seems to work
>---------------------------------------------------------------
9118d8b3624d2b2478e11d8e5612a67b421e84d1
hluatex-experimental.def | 32 ++++++++++++++++++++++----------
test-pdfresources.tex | 4 ++--
2 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/hluatex-experimental.def b/hluatex-experimental.def
index 9585018..863344e 100644
--- a/hluatex-experimental.def
+++ b/hluatex-experimental.def
@@ -28,6 +28,16 @@
{\msg_error:nn {hyp}{missing-bookmark-package}}
}}
+%this need sorting out later.
+\AtBeginDocument
+{
+ \ifHy at pdfa
+ \hook_put:nnnn
+ { pdf }
+ { startlink_url_attr }
+ { /F }{ 4 } %
+ \fi
+}
%these are commands to fill various attributes (color, border style) in
% the hooks for links.
\def\Hy at EXPsetpdfborder
@@ -571,15 +581,13 @@
\let\CurrentBorderColor\@linkbordercolor
\ExplSyntaxOn
-\def\hyper at linkurl#1#2{%
- \begingroup
+\def\hyper at linkurl#1#2{%#1:link text #2: URI,
+ \group_begin:
\Hy at pstringdef\Hy at pstringURI{#2}%
\hyper at chars
- \leavevmode
- \pdf_startlink_user:nn { url }
- {
- /Subtype/Link
- \ifHy at pdfa /F~4\fi
+ \mode_leave_vertical:
+ \pdf_link_user:nnn { url }
+ {
/A<<
/Type/Action~
/S/URI~
@@ -590,9 +598,13 @@
\Hy at href@nextactionraw
>>
}
- \Hy at colorlink\@urlcolor#1\Hy at xspace@end
- \close at EXPpdflink { url }
- \endgroup
+ {
+ \Hy at colorlink
+ \@urlcolor#1\Hy at xspace@end
+ \Hy at endcolorlink
+ \Hy at VerboseLinkStop
+ }
+ \group_end:
}
\ExplSyntaxOff
diff --git a/test-pdfresources.tex b/test-pdfresources.tex
index 1390cfe..e969bfc 100644
--- a/test-pdfresources.tex
+++ b/test-pdfresources.tex
@@ -13,7 +13,7 @@
\driver_pdf_objects_disable:
\ExplSyntaxOff
\usepackage{xcolor}
-\usepackage[customdriver=hluatex-experimental,ocgcolorlinks]{hyperref}
+\usepackage[customdriver=hluatex-experimental,ocgcolorlinks,pdfa]{hyperref}
%%\tracingmacros=1
\hypersetup{urlcolor=blue,linkbordercolor=blue,pdfborder={1 1 1},pdfprintpagerange=0}
@@ -45,7 +45,7 @@ xxx
{/A<</Type/Action/S/URI/URI(www.blub.de)>>}
{long~text~text~text~text~text~text~text~text}
-
+\url{www.blubblubblub.de}
\section{a}\label{a}
\ref{a}
\ExplSyntaxOff
More information about the latex3-commits
mailing list