[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: switch to hooks for colors (4a391ba)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sun Jan 24 00:44:26 CET 2021
Repository : https://github.com/latex3/pdfresources
On branch : reworking-annot
Link : https://github.com/latex3/pdfresources/commit/4a391ba1e3f6dfc15be9e7aa9ba4d98a752178c2
>---------------------------------------------------------------
commit 4a391ba1e3f6dfc15be9e7aa9ba4d98a752178c2
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Jan 24 00:44:26 2021 +0100
switch to hooks for colors
>---------------------------------------------------------------
4a391ba1e3f6dfc15be9e7aa9ba4d98a752178c2
hyperref-generic.dtx | 87 ++++++++++++++++++++++++++--------------------------
1 file changed, 43 insertions(+), 44 deletions(-)
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 2b7f493..9e9f53f 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1203,12 +1203,10 @@
}
\exp_args:No
\pdfannot_link_goto_begin:nw { \l_@@_dest_name_tmpa_tl }
- \Hy at colorlink\@linkcolor
}
\cs_new_protected:Npn \@@_link_goto_end:
{
- \Hy at endcolorlink
\pdfannot_link_goto_end:
}
% \end{macrocode}
@@ -1223,7 +1221,6 @@
{ #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
@@ -1251,6 +1248,48 @@
}
\group_end:
}
+% \end{macrocode}
+% \subsection{GoToR Links {files}}
+% \begin{macrocode}
+\cs_new_protected:Npn \hyper at linkfile #1 #2 #3 % anchor text, filename, destname
+ {
+ \group_begin:
+ \tl_set:Nn \l_@@_filename_tmpa_tl { #2 }
+ \Hy at CleanupFile \l_@@_filename_tmpa_tl
+ \@@_text_pdfstring:ooN
+ { \l_@@_filename_tmpa_tl }
+ { \l_@@_text_enc_file_print_tl }
+ \l_@@_filename_tmpa_tl
+ \@@_text_pdfstring:nnN
+ { #3 }
+ { \l_@@_text_enc_dest_print_tl }
+ \l_@@_dest_name_tmpa_tl
+ \Hy at MakeRemoteAction
+ \mode_leave_vertical:
+ \pdfannot_link:nnn %expansion??
+ { GoToR }
+ {
+ /A<<
+ /F \l_@@_filename_tmpa_tl
+ /S/GoToR
+ \Hy at SetNewWindow
+ \ifx\\#3\\
+ /D[\Hy at href@page/\l_@@_dest_pdfremotestartview_tl]
+ \else
+ /D \l_@@_dest_name_tmpa_tl
+ \fi
+ \Hy at href@nextactionraw
+ >>
+ }
+ {
+% \Hy at colorlink\@filecolor
+ #1\Hy at xspace@end
+% \Hy at endcolorlink
+ \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.
@@ -1444,46 +1483,6 @@
\ExplSyntaxOn
%file links to pdfs. See test-filelinks.pdf for a few example.
-\cs_new_protected:Npn \hyper at linkfile #1 #2 #3 % anchor text, filename, destname
- {
- \group_begin:
- \tl_set:Nn \l_@@_filename_tmpa_tl { #2 }
- \Hy at CleanupFile \l_@@_filename_tmpa_tl
- %\__hyp_pstringdef:No \l_@@_filename_tmpa_tl { \l_@@_filename_tmpa_tl }
- \@@_text_pdfstring:ooN
- { \l_@@_filename_tmpa_tl }
- { \l_@@_text_enc_file_print_tl }
- \l_@@_filename_tmpa_tl
- %\__hyp_pstringdef:Nn \l_@@_dest_name_tmpa_tl { #3 }
- \@@_text_pdfstring:nnN
- { #3 }
- { \l_@@_text_enc_dest_print_tl }
- \l_@@_dest_name_tmpa_tl
- \Hy at MakeRemoteAction
- \mode_leave_vertical:
- \pdfannot_link:nnn %expansion??
- { GoToR }
- {
- /A<<
- /F \l_@@_filename_tmpa_tl
- /S/GoToR
- \Hy at SetNewWindow
- \ifx\\#3\\
- /D[\Hy at href@page/\l_@@_dest_pdfremotestartview_tl]
- \else
- /D \l_@@_dest_name_tmpa_tl
- \fi
- \Hy at href@nextactionraw
- >>
- }
- {
- \Hy at colorlink\@filecolor
- #1\Hy at xspace@end
- \Hy at endcolorlink
- \Hy at VerboseLinkStop %where is the start??
- }
- \group_end:
- }
% use by run links xxxxxxxxxxx
%define \hyper at linklaunch for naming consistency
@@ -2495,7 +2494,7 @@
{
%need to parse!
\group_begin:
- \@@_color_select:v { l_@@_annot_#1color_tl }vyyyyy
+ \@@_color_select:v { l_@@_annot_#1color_tl }
}
}
\hook_gput_code:nnn
More information about the latex3-commits
mailing list.