[latex3-commits] [git/LaTeX3-latex3-pdfresources] master: url command (58184b4)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sat Mar 21 19:44:52 CET 2020
Repository : https://github.com/latex3/pdfresources
On branch : master
Link : https://github.com/latex3/pdfresources/commit/58184b4f8616164c57d8b6fffd231c51284f93ba
>---------------------------------------------------------------
commit 58184b4f8616164c57d8b6fffd231c51284f93ba
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sat Mar 21 19:44:52 2020 +0100
url command
>---------------------------------------------------------------
58184b4f8616164c57d8b6fffd231c51284f93ba
hgeneric-experimental.def | 52 +++++++++++++++++++++++++++--------------------
1 file changed, 30 insertions(+), 22 deletions(-)
diff --git a/hgeneric-experimental.def b/hgeneric-experimental.def
index 7f90a4f..1d61644 100644
--- a/hgeneric-experimental.def
+++ b/hgeneric-experimental.def
@@ -604,30 +604,38 @@
\cs_new_protected:Npn \hyper at linkurl #1 #2 %#1:link text #2: URI,
{
\group_begin:
- \__hyp_pstringdef:Nn \l__hyp_uri_tmpa_tl { #2 }
- \hyper at chars
+ \__hyp_pstringdef:Nx \l__hyp_uri_tmpa_tl { #2 }
+ %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.
\pdf_link_user:nnn { url }
- {
- /Subtype /Link
- /A<<
- /Type/Action~
- /S/URI~
- /URI(\Hy at pstringURI)~
- \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
- }
- \group_end:
-}
+ {
+ /Subtype /Link
+ /A
+ <<
+ % the action dictionary has no hook!
+ /Type/Action~
+ /S/URI~
+ /URI(\l__hyp_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.