[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlink: storing (8038a87)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Mar 16 00:24:33 CET 2021


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

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

commit 8038a8794a8207e4dd5e1fa6d2be4b9182e4ddf3
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Mar 16 00:24:33 2021 +0100

    storing


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

8038a8794a8207e4dd5e1fa6d2be4b9182e4ddf3
 experiments/linkinput.tex | 14 +++++---------
 hyperref-generic.dtx      | 18 ++++++++++++++----
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/experiments/linkinput.tex b/experiments/linkinput.tex
index a5c3fa2..4547c82 100644
--- a/experiments/linkinput.tex
+++ b/experiments/linkinput.tex
@@ -79,17 +79,13 @@ The rules here are
 \item Everything else works only sometimes in some PDF viewer.
 \end{itemize}
 
-\href{pdfa-test.pdf}{test-ascii}
+So better stick to  asciinames.
 
-\ExplSyntaxOn
-\tl_set:Nn \l__hyp_text_enc_file_print_tl {utf8/URI}
-\ExplSyntaxOff
-\href[urlencode]{grüßpdf.pdf}{test utf8/URI}
+\hrefpdf[destination=blub]{pdfa-test.pdf}{test-ascii}
 
-\ExplSyntaxOn
-\tl_set:Nn \l__hyp_text_enc_file_print_tl {utf8/string}
-\ExplSyntaxOff
-\href[urlencode]{grüßpdf.pdf}{test utf8/string}
+\hrefpdf[format=utf8/URI]{grüßpdf.pdf}{test utf8/URI}
+
+\hrefpdf[format=utf8/string]{grüßpdf.pdf}{test utf8/string}
 
 
 \ExplSyntaxOn
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 36bdd5d..07b57e3 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -1087,7 +1087,7 @@
 \keys_define:nn { hyp / href }
   {
     ,urlencode  .bool_set:N =  \l_@@_href_url_encode_bool
-    ,fileencode .choices:nn =
+    ,format .choices:nn =
       {utf8/string,utf8/URI,utf16/string,utf16/hex}
       { \tl_set:Nn \l_@@_text_enc_file_print_tl {#1} }
     ,protocol  .tl_set:N   =  \l_@@_href_url_protocol_tl
@@ -1106,10 +1106,14 @@
     ,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
+       \tl_if_empty:nTF
+         {
+           \pdfdict_remove:nn{l_hyp/annot/A}{Next}
+         }
          {
            \pdfdict_put:nnn{l_hyp/annot/A}{Next}{#1}
            \tl_set:Nn \Hy at href@nextactionraw {/Next~#1}
+           \keys_set:nn {hyp / setup }{ pdfnewwindow = true}
          }
      }
   }
@@ -1982,11 +1986,17 @@
           { #3 }
           { \l_@@_text_enc_dest_print_tl }
           \l_@@_dest_name_tmpa_tl
-        \Hy at MakeRemoteAction
+        %\Hy at MakeRemoteAction
         \tl_if_blank:eTF {#3}
           {
             \pdfdict_put:nnx {l_hyp/annot/A/GoToR}{D}
-              {[\l_@@_href_pdf_page_tl /\l_@@_dest_pdfremotestartview_tl]}
+              {
+               [
+                 \int_eval:n
+                  { \int_max:nn {0}{ 0\l_@@_href_pdf_page_tl - 1 }}
+                 /\l_@@_dest_pdfremotestartview_tl
+               ]
+              }
           }
           {
             \pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl}





More information about the latex3-commits mailing list.