[latex3-commits] [latex3/latex2e] UF-latex-lab-refadaption: simplify Ref code after tagpdf update (6017037a)

github at latex-project.org github at latex-project.org
Thu Sep 19 16:05:13 CEST 2024


Repository : https://github.com/latex3/latex2e
On branch  : UF-latex-lab-refadaption
Link       : https://github.com/latex3/latex2e/commit/6017037a36cb95e8f5cf628dc1a2a1d8d985f570

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

commit 6017037a36cb95e8f5cf628dc1a2a1d8d985f570
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Sep 19 16:05:13 2024 +0200

    simplify Ref code after tagpdf update


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

6017037a36cb95e8f5cf628dc1a2a1d8d985f570
 required/latex-lab/latex-lab-toc.dtx | 34 +++++-----------------------------
 1 file changed, 5 insertions(+), 29 deletions(-)

diff --git a/required/latex-lab/latex-lab-toc.dtx b/required/latex-lab/latex-lab-toc.dtx
index 0aa17879..37fde1e1 100644
--- a/required/latex-lab/latex-lab-toc.dtx
+++ b/required/latex-lab/latex-lab-toc.dtx
@@ -136,30 +136,6 @@
     }
  }
 %    \end{macrocode}
-% \begin{variable}{\g_@@_struct_ref_by_dest_prop}
-% This variable contains structures whose Ref key should be updated
-% at the end to point to structured related with this destination.
-% As this is probably need in other places too, it is not only a toc-variable.
-% Moved into tagpdf!
-% \end{variable}
-%
-% \begin{macro}{\@@_struct_ref_by_dest:}
-%  This command is executed and update the Ref keys
-%  of the structures listed in |\g_@@_struct_ref_by_dest_prop|.
-%  It is currently only relevant for the |TOCI|. But other structures
-%  could need that later too.
-%  The command is executed in the |tagpdf/finish/before| hook.
-%    \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_ref_by_dest:
-  {
-    \prop_map_inline:Nn\g_@@_struct_ref_by_dest_prop
-      {
-        \tag_struct_gput:nnn {##1}{ref_dest}{##2}
-      }
-  }
-\hook_gput_code:nnn {tagpdf/finish/before}{tagpdf/struct/Ref}{\@@_struct_ref_by_dest:}
-%    \end{macrocode}
-% \end{macro}
 %
 % \section{Toc code}
 % \begin{variable}{\g_@@_toc_level_int,\g_@@_toc_stack_seq}
@@ -294,17 +270,17 @@
 %    \begin{macrocode}
           \group_begin:
            \text_declare_expand_equivalent:Nn \numberline \use_none:n
-           \exp_args:Ne \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}
+           \exp_args:Ne 
+           \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}           
 %    \end{macrocode}
-% The TOCI structure should get a /Ref, so we put a request with its destination
-% name into the prop.
+% The TOCI structure should get a /Ref, we use a destination
+% to retrieve it.
 % \begin{NOTE}{UF}
 % This only works with hyperref currently. Without hyperref we
 % need to store fake names.
 % \end{NOTE}
 %    \begin{macrocode}
-           \prop_gput:Nee \g_@@_struct_ref_by_dest_prop
-             { \tag_get:n {struct_num} }{#4}
+           \tag_struct_gput:nnn { \tag_get:n {struct_num} }{ref_dest}{#4}
            \seq_gpush:Ne \g_@@_toc_stack_seq {{TOCI}\use:c{toclevel@#1}}
           \group_end:
        }





More information about the latex3-commits mailing list.