summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tagpdf/tagpdf-struct.dtx')
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx51
1 files changed, 30 insertions, 21 deletions
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index 6f03c5ac0f..621ef672b8 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -22,11 +22,7 @@
%
% for those people who are interested.
%<*driver>
-\RequirePackage{pdfmanagement-testphase}
-\DeclareDocumentMetadata{}
-\makeatletter
-\declare@file@substitution{doc.sty}{doc-v3beta.sty}
-\makeatother
+\DocumentMetadata{}
\documentclass{l3doc}
\usepackage{array,booktabs,caption}
\hypersetup{pdfauthor=Ulrike Fischer,
@@ -50,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.93, released 2022-01-13}
+% \date{Version 0.94, released 2022-05-11}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -221,7 +217,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2022-01-13} {0.93}
+\ProvidesExplPackage {tagpdf-struct-code} {2022-05-11} {0.94}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -969,7 +965,6 @@
\group_end:
}
}
-%</package>
% \end{macrocode}
% \end{macro}
% \begin{macro}{root-AF (setup-key)}
@@ -998,14 +993,17 @@
}
},
}
+%</package>
% \end{macrocode}
% \end{macro}
% \section{User commands}
%
% \begin{macro}{\tag_struct_begin:n,\tag_struct_end:}
% \begin{macrocode}
+%<base>\cs_new_protected:Npn \tag_struct_begin:n #1 {}
+%<base>\cs_new_protected:Npn \tag_struct_end:{}
%<*package|debug>
-%<package>\cs_new_protected:Npn \tag_struct_begin:n #1 %#1 key-val
+%<package>\cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val
%<debug>\cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val
{
%<package>\@@_check_if_active_struct:T
@@ -1067,7 +1065,7 @@
}
%<debug>{ \@@_debug_struct_begin_ignore:n { #1 }}
}
-%<package>\cs_new_protected:Nn \tag_struct_end:
+%<package>\cs_set_protected:Nn \tag_struct_end:
%<debug>\cs_set_protected:Nn \tag_struct_end:
{ %take the current structure num from the stack:
%the objects are written later, lua mode hasn't all needed info yet
@@ -1104,8 +1102,9 @@
% This command allows to use a stashed structure in another place.
% TODO: decide how it should be guarded. Probably by the struct-check.
% \begin{macrocode}
+%<base>\cs_new_protected:Npn \tag_struct_use:n #1 {}
%<*package>
-\cs_new_protected:Nn \tag_struct_use:n %#1 is the label
+\cs_set_protected:Npn \tag_struct_use:n #1 %#1 is the label
{
\@@_check_if_active_struct:T
{
@@ -1171,7 +1170,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2022-01-13} {0.93}
+\ProvidesExplPackage {tagpdf-attr-code} {2022-05-11} {0.94}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
@@ -1217,8 +1216,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_attr_new_entry:nn #1 #2 %#1:name, #2: content
{
- \prop_gput:Nnn \g_@@_attr_entries_prop
- {#1}{#2}
+ \prop_gput:Nen \g_@@_attr_entries_prop
+ {\pdf_name_from_unicode_e:n{#1}}{#2}
}
\keys_define:nn { @@ / setup }
@@ -1239,7 +1238,14 @@
attribute-class .code:n =
{
\clist_set:No \l_@@_tmpa_clist { #1 }
- \seq_set_from_clist:NN \l_@@_tmpa_seq \l_@@_tmpa_clist
+ \seq_set_from_clist:NN \l_@@_tmpb_seq \l_@@_tmpa_clist
+% \end{macrocode}
+% we convert the names into pdf names with slash
+% \begin{macrocode}
+ \seq_set_map_x:NNn \l_@@_tmpa_seq \l_@@_tmpb_seq
+ {
+ \pdf_name_from_unicode_e:n {##1}
+ }
\seq_map_inline:Nn \l_@@_tmpa_seq
{
\prop_if_in:NnF \g_@@_attr_entries_prop {##1}
@@ -1248,14 +1254,10 @@
}
\seq_gput_left:Nn\g_@@_attr_class_used_seq { ##1}
}
- \seq_set_map:NNn \l_@@_tmpb_seq \l_@@_tmpa_seq
- {
- /##1
- }
\tl_set:Nx \l_@@_tmpa_tl
{
\int_compare:nT { \seq_count:N \l_@@_tmpa_seq > 1 }{[}
- \seq_use:Nn \l_@@_tmpb_seq { \c_space_tl }
+ \seq_use:Nn \l_@@_tmpa_seq { \c_space_tl }
\int_compare:nT { \seq_count:N \l_@@_tmpa_seq > 1 }{]}
}
\int_compare:nT { \seq_count:N \l_@@_tmpa_seq > 0 }
@@ -1277,7 +1279,14 @@
attribute .code:n = % A property (attribute, value currently a dictionary)
{
\clist_set:No \l_@@_tmpa_clist { #1 }
- \seq_set_from_clist:NN \l_@@_tmpa_seq \l_@@_tmpa_clist
+ \seq_set_from_clist:NN \l_@@_tmpb_seq \l_@@_tmpa_clist
+% \end{macrocode}
+% we convert the names into pdf names with slash
+% \begin{macrocode}
+ \seq_set_map_x:NNn \l_@@_tmpa_seq \l_@@_tmpb_seq
+ {
+ \pdf_name_from_unicode_e:n {##1}
+ }
\tl_set:Nx \l_@@_attr_value_tl
{
\int_compare:nT { \seq_count:N \l_@@_tmpa_seq > 1 }{[}%]