[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: disable launch, file (1ddd1d4)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Jan 28 23:05:59 CET 2021


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

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

commit 1ddd1d427d329966ff83da2eca51ca651e639fce
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Jan 28 23:05:59 2021 +0100

    disable launch, file


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

1ddd1d427d329966ff83da2eca51ca651e639fce
 hyperref-generic.dtx | 172 +++++++++++++++++++++++++++------------------------
 1 file changed, 90 insertions(+), 82 deletions(-)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index e2d7471..ff57e19 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1545,45 +1545,49 @@
 
 \cs_new_protected:Npn \hyper at linkfile #1 #2 #3 % link 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
-    \pdfdict_put:nno {l_hyp/annot/A/GoToR}{F}{\l_@@_filename_tmpa_tl}
-    \@@_text_pdfstring:nnN
-      { #3 }
-      { \l_@@_text_enc_dest_print_tl }
-      \l_@@_dest_name_tmpa_tl
-    \Hy at MakeRemoteAction
-    \tl_if_blank:eTF {#3}
-      {
-        \pdfdict_put:nnx {l_hyp/annot/A/GoToR}{D}
-          {[\Hy at href@page/\l_@@_dest_pdfremotestartview_tl]}
-      }
-      {
-        \pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl}
-      }
-    \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}{Next}{\Hy at href@nextactionraw}
-      }
-    \mode_leave_vertical:
-    \pdfannot_link:nxn %expansion??
-      { GoToR }
-      {
-        /A<<
-          \pdfdict_use:n {l_hyp/annot/A/GoToR}
-        >>
-      }
-      {
-        #1\Hy at xspace@end
-        \Hy at VerboseLinkStop %where is the start??
-      }
-    \group_end:
+   \bool_if:NTF \l_@@_annot_GoToR_bool
+     {
+        \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
+        \pdfdict_put:nno {l_hyp/annot/A/GoToR}{F}{\l_@@_filename_tmpa_tl}
+        \@@_text_pdfstring:nnN
+          { #3 }
+          { \l_@@_text_enc_dest_print_tl }
+          \l_@@_dest_name_tmpa_tl
+        \Hy at MakeRemoteAction
+        \tl_if_blank:eTF {#3}
+          {
+            \pdfdict_put:nnx {l_hyp/annot/A/GoToR}{D}
+              {[\Hy at href@page/\l_@@_dest_pdfremotestartview_tl]}
+          }
+          {
+            \pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl}
+          }
+        \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}{Next}{\Hy at href@nextactionraw}
+          }
+        \mode_leave_vertical:
+        \pdfannot_link:nxn %expansion??
+          { GoToR }
+          {
+            /A<<
+              \pdfdict_use:n {l_hyp/annot/A/GoToR}
+            >>
+          }
+          {
+            #1\Hy at xspace@end
+            \Hy at VerboseLinkStop %where is the start??
+          }
+        \group_end:
+     }
+     {#1}
   }
 %    \end{macrocode}
 %
@@ -1595,50 +1599,54 @@
 \pdfdict_put:nnn {l_hyp/annot/A/Launch}{Type}{/Action}
 \pdfdict_put:nnn {l_hyp/annot/A/Launch}{S}{/Launch}
 
-\cs_new_protected:Npn \hyper at linklaunch #1 #2 #3 % link text, filename,  Parameters
+\cs_new_protected:Npn \hyper at linklaunch #1 #2 #3 % filename, link text, Parameters
   {
-    \group_begin:
-      \@@_text_pdfstring:nnN
-        { #1 }
-        { \l_@@_text_enc_file_print_tl }
-        \l_@@_filename_tmpa_tl
-      \pdfdict_put:nno {l_hyp/annot/A/Launch}{F}{\l_@@_filename_tmpa_tl}
-      \@@_text_pdfstring:noN
-        { #3 }
-        { \l_@@_text_enc_para_print_tl }
-        \l_@@_para_tmpa_tl
-      \bool_if:nTF
-        {
-          \str_if_eq_p:Vn \l_@@_para_tmpa_tl {()}
-          ||
-          \pdf_version_compare_p:Nn > {1.9}
-        }
-        {
-          \pdfdict_remove:nn {l_hyp/annot/A/Launch}{Win}
-        }
-        {
-          \pdfdict_put:nnx {l_hyp/annot/A/Launch}{Win}
-            {<</P \l_@@_para_tmpa_tl /F \l_@@_filename_tmpa_tl >>}
-        }
-      \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}{Next}{\Hy at href@nextactionraw}
-        }
-      \mode_leave_vertical:
-      \pdfannot_link:nxn
-        { Launch }
-        {
-          /A
-          <<
-            \pdfdict_use:n {l_hyp/annot/A/Launch}
-          >>
-        }
-        {
-          #2\Hy at xspace@end
-          \Hy at VerboseLinkStop %where is the start??
-        }
-    \group_end:
+   \bool_if:NTF \l_@@_annot_Launch_bool
+     {
+        \group_begin:
+          \@@_text_pdfstring:nnN
+            { #1 }
+            { \l_@@_text_enc_file_print_tl }
+            \l_@@_filename_tmpa_tl
+          \pdfdict_put:nno {l_hyp/annot/A/Launch}{F}{\l_@@_filename_tmpa_tl}
+          \@@_text_pdfstring:noN
+            { #3 }
+            { \l_@@_text_enc_para_print_tl }
+            \l_@@_para_tmpa_tl
+          \bool_if:nTF
+            {
+              \str_if_eq_p:Vn \l_@@_para_tmpa_tl {()}
+              ||
+              \pdf_version_compare_p:Nn > {1.9}
+            }
+            {
+              \pdfdict_remove:nn {l_hyp/annot/A/Launch}{Win}
+            }
+            {
+              \pdfdict_put:nnx {l_hyp/annot/A/Launch}{Win}
+                {<</P \l_@@_para_tmpa_tl /F \l_@@_filename_tmpa_tl >>}
+            }
+          \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}{Next}{\Hy at href@nextactionraw}
+            }
+          \mode_leave_vertical:
+          \pdfannot_link:nxn
+            { Launch }
+            {
+              /A
+              <<
+                \pdfdict_use:n {l_hyp/annot/A/Launch}
+              >>
+            }
+            {
+              #2\Hy at xspace@end
+              \Hy at VerboseLinkStop %where is the start??
+            }
+        \group_end:
+      }
+      {#2}
   }
 %    \end{macrocode}
 % The actually command used by hyperref is \s{@hyper at launch} which uses a delimited





More information about the latex3-commits mailing list.