[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: new color scheme uri links (665ce5b)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sun Jan 24 00:23:31 CET 2021
Repository : https://github.com/latex3/pdfresources
On branch : reworking-annot
Link : https://github.com/latex3/pdfresources/commit/665ce5bc3a88438e3bb8d5fb5467fa955c86126b
>---------------------------------------------------------------
commit 665ce5bc3a88438e3bb8d5fb5467fa955c86126b
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Jan 24 00:23:31 2021 +0100
new color scheme uri links
>---------------------------------------------------------------
665ce5bc3a88438e3bb8d5fb5467fa955c86126b
hyperref-generic.dtx | 77 ++++++++++++++++++++++++++--------------------------
1 file changed, 39 insertions(+), 38 deletions(-)
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index b8c3bc7..2b7f493 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1213,6 +1213,44 @@
}
% \end{macrocode}
%
+% \subsection{URI links}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \hyper at linkurl #1 #2 %#1:link text #2: URI,
+ {
+ \group_begin:
+ \@@_text_pdfstring:xoN
+ { #2}
+ { \l_@@_text_enc_uri_print_tl }
+ \l_@@_uri_tmpa_tl
+ %hyper at chars, unneeded as used only once
+ \cs_set_eq:NN \# \c_hash_str
+ \cs_set_eq:NN \% \c_percent_str
+ \Hy at safe@activestrue
+ \mode_leave_vertical:
+ %Subtype and A could probably also be handled with hooks if needed
+ %but checks for all drivers should be done then.
+ \pdfannot_link:nnn { URI }
+ {
+ /A
+ <<
+ % the action dictionary has no hook!
+ /Type/Action~
+ /S/URI~
+ /URI\l_@@_uri_tmpa_tl~
+ \ifHy at href@ismap
+ /IsMap~true%
+ \fi
+ \Hy at href@nextactionraw
+ >>
+ }
+ {
+ #1
+ \Hy at xspace@end
+ \Hy at VerboseLinkStop %where is the start??
+ }
+ \group_end:
+ }
% variants of hyperref commands to get attributes in the prop
% these are (temporary) commands to fill various attributes (color, border style) in
% the hooks for links from the hyperref keys.
@@ -1401,44 +1439,7 @@
}
%% this command is used for \url
-\cs_new_protected:Npn \hyper at linkurl #1 #2 %#1:link text #2: URI,
- {
- \group_begin:
- %\__hyp_pstringdef:Nx \l_@@_uri_tmpa_tl { #2 }
- \@@_text_pdfstring:xoN
- { #2}
- { \l_@@_text_enc_uri_print_tl }
- \l_@@_uri_tmpa_tl
- %hyper at chars, unneeded as used only once
- \cs_set_eq:NN \# \c_hash_str
- \cs_set_eq:NN \% \c_percent_str
- \Hy at safe@activestrue
- \mode_leave_vertical:
- %Subtype and A could probably also be handled with hooks if needed
- %but checks for all drivers should be done then.
- \pdfannot_link:nnn { URI }
- {
- /A
- <<
- % the action dictionary has no hook!
- /Type/Action~
- /S/URI~
- /URI\l_@@_uri_tmpa_tl~
- \ifHy at href@ismap
- /IsMap~true%
- \fi
- \Hy at href@nextactionraw
- >>
- }
- {
- \Hy at colorlink\@urlcolor
- #1
- \Hy at xspace@end
- \Hy at endcolorlink
- \Hy at VerboseLinkStop %where is the start??
- }
- \group_end:
- }
+
\ExplSyntaxOff
\ExplSyntaxOn
More information about the latex3-commits
mailing list.