[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlink: adapting href, remote actions still missing (e3428db)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Mar 15 19:48:49 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : testlink
Link       : https://github.com/latex3/pdfresources/commit/e3428db727914d6245437f8449906b4323264d7c

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

commit e3428db727914d6245437f8449906b4323264d7c
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Mar 15 19:48:49 2021 +0100

    adapting href, remote actions still missing


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

e3428db727914d6245437f8449906b4323264d7c
 hyperref-generic.dtx                 | 36 +++++++++++++++---------------------
 testfiles-luatex/non-ascii-links.pvt |  4 ++--
 2 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 35eadb4..36bdd5d 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1079,6 +1079,7 @@
 \bool_new:N \l_@@_href_url_ismap_bool
 \tl_new:N   \l_@@_href_url_protocol_tl
 \tl_new:N   \l_@@_href_pdf_destination_tl
+\tl_new:N   \l_@@_href_pdf_page_tl
 \tl_new:N   \l_@@_href_run_parameter_tl
 
 
@@ -1096,8 +1097,21 @@
         \keys_set:nn { hyp / setup }
           { pdfremotestartview = #1 }
       }
+    ,page .code:n =
+      {
+       \tl_set:Nn \l_@@_href_pdf_page_tl {#1}
+       \tl_set:Nn \Hy at href@page {#1}
+      }
     ,ismap  .bool_set:N  = \l_@@_href_url_ismap_bool
     ,run-parameter .tl_set:N = \l_@@_href_run_parameter_tl
+    ,nextactionraw .code:n =
+     { %perhaps some safety match later, see hyperref code
+       \tl_if_empty:nF
+         {
+           \pdfdict_put:nnn{l_hyp/annot/A}{Next}{#1}
+           \tl_set:Nn \Hy at href@nextactionraw {/Next~#1}
+         }
+     }
   }
 
 \keys_define:nn { hyp / setup }
@@ -1922,11 +1936,6 @@
            {
             \pdfdict_put:nnn{l_hyp/annot/A/URI}{IsMap}{true}
            }
-         \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
@@ -1977,16 +1986,11 @@
         \tl_if_blank:eTF {#3}
           {
             \pdfdict_put:nnx {l_hyp/annot/A/GoToR}{D}
-              {[\Hy at href@page/\l_@@_dest_pdfremotestartview_tl]}
+              {[\l_@@_href_pdf_page_tl /\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_dict_put:nnx {link/GoToR}{A}{<<\pdfdict_use:n {l_hyp/annot/A/GoToR}>>}
         \pdfannot_link:nxn %expansion??
@@ -2042,11 +2046,6 @@
               \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_dict_put:nnx {link/Launch}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Launch}>>}
           \pdfannot_link:nxn
@@ -2096,11 +2095,6 @@
              \mode_leave_vertical:
              \pdfdict_put:nnx {l_hyp/annot/A/Named}{N}
                {\pdf_name_from_unicode_e:n{#1}}
-             \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}
-               }
              \pdfannot_dict_put:nnx {link/Named}{A}{<<\pdfdict_use:n {l_hyp/annot/A/Named}>>}
              \pdfannot_link:nxn { Named }
               {
diff --git a/testfiles-luatex/non-ascii-links.pvt b/testfiles-luatex/non-ascii-links.pvt
index 1afbe04..aab9ae6 100644
--- a/testfiles-luatex/non-ascii-links.pvt
+++ b/testfiles-luatex/non-ascii-links.pvt
@@ -9,6 +9,6 @@
 
 \begin{document}
 \START
-\href{http://ang.wikipedia.org/wiki/Elisabeþ_I_Engla_Cwēn}{old english}
-\href{http://ja.wikipedia.org/wiki/エリザベス1世_(イングランド女王}{japanese}
+\href[urlencode]{http://ang.wikipedia.org/wiki/Elisabeþ_I_Engla_Cwēn}{old english}
+\href[urlencode]{http://ja.wikipedia.org/wiki/エリザベス1世_(イングランド女王}{japanese}
 \end{document} 
\ No newline at end of file





More information about the latex3-commits mailing list.