[latex3-commits] [git/LaTeX3-latex3-pdfresources] testmetadata: structure destinations test, some clean up (38e69c1)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun Jan 2 23:51:54 CET 2022


Repository : https://github.com/latex3/pdfresources
On branch  : testmetadata
Link       : https://github.com/latex3/pdfresources/commit/38e69c158d4f7eae615eb74f155f2aed8ed18d0a

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

commit 38e69c158d4f7eae615eb74f155f2aed8ed18d0a
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun Jan 2 23:51:54 2022 +0100

    structure destinations test, some clean up


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

38e69c158d4f7eae615eb74f155f2aed8ed18d0a
 experiments/structure-destination-code.tex | 60 +++++++++++-------------------
 1 file changed, 21 insertions(+), 39 deletions(-)

diff --git a/experiments/structure-destination-code.tex b/experiments/structure-destination-code.tex
index e10ca67..b938ac1 100644
--- a/experiments/structure-destination-code.tex
+++ b/experiments/structure-destination-code.tex
@@ -3,48 +3,16 @@
 \DeclareDocumentMetadata{
    uncompress,
    testphase={tagpdf},
-   activate=tagging,pdfversion=2.0,
+   activate=tagging,
+   pdfversion=2.0,
    %backend=dvipdfmx
   }
 
 
 \documentclass{article}
-\usepackage{graphicx,iftex,hyperref,lipsum}
+\usepackage{graphicx,iftex,lipsum}
+\usepackage{hyperref}
 \ExplSyntaxOn
-%backend code
-% dvips: probably no-op
-% pdftex
-%\sys_if_engine_pdftex:T
-% {
-%   \cs_new_protected:Npn \@@_backend_struct_destination:nnn #1#2#3 %#1 structure ref
-%  {
-%%<*luatex>
-%    \tex_pdfextension:D dest ~
-%%</luatex>
-%%<*pdftex>
-%    \tex_pdfdest:D
-%%</pdftex>
-%        name {#1}
-%        \str_case:nnF {#2}
-%          {
-%            { xyz }   { xyz }
-%            { fit }   { fit }
-%            { fitb }  { fitb }
-%            { fitbh } { fitbh }
-%            { fitbv } { fitbv }
-%            { fith }  { fith }
-%            { fitv }  { fitv }
-%            { fitr }  { fitr }
-%          }
-%          { xyz ~ zoom \fp_eval:n { #2 * 10 } }
-%        \scan_stop:
-%  }
-%
-%
-% }
-
-
-
 \bool_new:N \l_pdf_struct_destination_bool
 \tl_new:N   \l_pdf_struct_destination_tl
 
@@ -169,7 +137,7 @@
     { \int_compare_p:nNn {\tex_pdftexrevision:D } > {23} }
   }
   {
-   %redefine here
+   %redefinitions
    \cs_set_protected:Npn \__pdf_backend_destination:nn #1#2
      {
        \tex_pdfdest:D
@@ -250,7 +218,7 @@
     { \int_compare_p:nNn {\directlua{tex.print(status.list()["development_id"])} } > {7468} }
   }
   {
-   %redefine here
+   %redefinitions
    \cs_set_protected:Npn \__pdf_backend_destination:nn #1#2
      {
        \tex_pdfextension:D dest ~
@@ -328,11 +296,25 @@
 \bool_set_true:N \l_pdf_struct_destination_bool
 \tl_set:Nn \l_pdf_struct_destination_tl { __tag/struct/\g__tag_struct_stack_current_tl }
 
+%avoid that page destinations count as structure ...
+\makeatletter
+\tl_put_left:Nn\Hy at EveryPageBoxHook{\bool_set_false:N \l_pdf_struct_destination_bool}
+\makeatletter
 \ExplSyntaxOff
+%\tagpdfsetup{exclude-header-footer=pagination}
 \begin{document}
 
+\lipsum*{1-4}DEST\phantomsection\label{blub}
+\newpage
+\pageref{blub}
+\end{document}
+
+abc\tagmcend\tagstructbegin{tag=Artifact}\tagmcbegin{tag=Artifact}xxx\tagmcend\tagstructend\tagmcbegin{tag=P}blub
 \ExplSyntaxOn
-xx\pdf_destination:nn{blub}{fit}
+%xx\pdf_destination:nn{blub}{fit}
+\ExplSyntaxOff
+\end{document}
+
 %abc\pdf_destination:nnnn{xx}{1cm}{1cm}{1cm}
 %
 %\par x\__pdf_backend_link_begin:n





More information about the latex3-commits mailing list.