[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: disable url (ac52b7c)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Jan 28 22:42:15 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : reworking-annot
Link       : https://github.com/latex3/pdfresources/commit/ac52b7c701f81afab13de4dd8aaa9e57eee1e405

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

commit ac52b7c701f81afab13de4dd8aaa9e57eee1e405
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Jan 28 22:42:15 2021 +0100

    disable url


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

ac52b7c701f81afab13de4dd8aaa9e57eee1e405
 hyperref-generic.dtx | 66 +++++++++++++++++++++++++++-------------------------
 1 file changed, 34 insertions(+), 32 deletions(-)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 191071b..e2d7471 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1499,41 +1499,43 @@
 
 \cs_new_protected:Npn \hyper at linkurl #1 #2  %#1:link text #2: URI,
   {
-    \group_begin:
-%    \end{macrocode}
-% Convert the uri and store it in the dict
-%    \begin{macrocode}
-    \@@_text_pdfstring:xoN
-      { #2}
-      { \l_@@_text_enc_uri_print_tl }
-      \l_@@_uri_tmpa_tl
-    \pdfdict_put:nno{l_hyp/annot/A/URI}{URI}{\l_@@_uri_tmpa_tl}
-    \ifHy at href@ismap
-       \pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true}
-    \fi
-    \tl_if_empty:NF \Hy at href@nextactionraw
-      {
-        \str_remove_once:Nn \Hy at href@nextactionraw {/Next}
-        \pdfdict_put:nno{l_hyp/annot/A/Next}{\Hy at href@nextactionraw}
-      }
-    \cs_set_eq:NN \# \c_hash_str
-    \cs_set_eq:NN \% \c_percent_str
-    \Hy at safe@activestrue
-    \mode_leave_vertical:
-    \pdfannot_link:nxn { URI }
-      {
-        /A
-          <<
-            \pdfdict_use:n {l_hyp/annot/A/URI}
-          >>
-      }
+    \bool_if:NTF \l_@@_annot_URI_bool
       {
-        #1
-        \Hy at xspace@end
-        \Hy at VerboseLinkStop %where is the start??
+        \group_begin:
+         \@@_text_pdfstring:xoN
+           { #2}
+           { \l_@@_text_enc_uri_print_tl }
+           \l_@@_uri_tmpa_tl
+         \pdfdict_put:nno{l_hyp/annot/A/URI}{URI}{\l_@@_uri_tmpa_tl}
+         \ifHy at href@ismap
+            \pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true}
+         \fi
+         \tl_if_empty:NF \Hy at href@nextactionraw
+           {
+             \str_remove_once:Nn \Hy at href@nextactionraw {/Next}
+             \pdfdict_put:nno{l_hyp/annot/A/Next}{\Hy at href@nextactionraw}
+           }
+         \cs_set_eq:NN \# \c_hash_str
+         \cs_set_eq:NN \% \c_percent_str
+         \Hy at safe@activestrue
+         \mode_leave_vertical:
+         \pdfannot_link:nxn { URI }
+           {
+             /A
+               <<
+                 \pdfdict_use:n {l_hyp/annot/A/URI}
+               >>
+           }
+           {
+             #1
+             \Hy at xspace@end
+             \Hy at VerboseLinkStop %where is the start??
+           }
+         \group_end:
       }
-    \group_end:
+      {#1}
   }
+
 %    \end{macrocode}
 % \subsection{GoToR Links {files}}
 %    \begin{macrocode}





More information about the latex3-commits mailing list.