summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx')
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx48
1 files changed, 35 insertions, 13 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
index 621ef672b88..103e337e9d5 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -217,7 +217,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-struct-code} {2022-05-29} {0.95}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -228,9 +228,8 @@
% to have a chance to avoid double structures in align etc.
%
% \begin{macrocode}
-%<*package>
-\newcounter { g_@@_struct_abs_int }
-\int_gzero:N \c@g_@@_struct_abs_int
+%<base>\newcounter { g_@@_struct_abs_int }
+%<base>\int_gzero:N \c@g_@@_struct_abs_int
% \end{macrocode}
% \end{variable}
%
@@ -241,6 +240,7 @@
% consecutively and so the index of the seq can be used.
% A seq allows easy mapping over the structures.
% \begin{macrocode}
+%<*package>
\@@_seq_new:N \g_@@_struct_objR_seq
% \end{macrocode}
% \end{variable}
@@ -503,18 +503,21 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}
-% {\@@_struct_kid_OBJR_gput_right:nn,\@@_struct_kid_OBJR_gput_right:xx}
+% {\@@_struct_kid_OBJR_gput_right:nnn,\@@_struct_kid_OBJR_gput_right:xxx}
% At last the command to add an OBJR object. This has to write an object first.
% The first argument is the number of the parent structure, the second the
-% (expanded) object reference of the annotation.
+% (expanded) object reference of the annotation. The last argument is the page
+% object reference
+%
% \begin{macrocode}
-\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nn #1 #2 %#1 num of parent struct,
+\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct,
%#2 obj reference
+ %#3 page object reference
{
\pdf_object_unnamed_write:nn
{ dict }
{
- /Type/OBJR/Obj~#2
+ /Type/OBJR/Obj~#2/Pg~#3
}
\@@_seq_gput_right:cx
{ g_@@_struct_kids_#1_seq }
@@ -523,7 +526,7 @@
}
}
-\cs_generate_variant:Nn\@@_struct_kid_OBJR_gput_right:nn { xx }
+\cs_generate_variant:Nn\@@_struct_kid_OBJR_gput_right:nnn { xxx }
% \end{macrocode}
% \end{macro}
@@ -705,13 +708,17 @@
}
%put the obj number of the annot in the kid entry, this also creates
%the OBJR object
- \@@_struct_kid_OBJR_gput_right:xx
+ \ref_label:nn {__tag_objr_page_#2 }{ tagabspage }
+ \@@_struct_kid_OBJR_gput_right:xxx
{
\l_@@_struct_stack_parent_tmpa_tl
}
{
#1 %
}
+ {
+ \pdf_pageobject_ref:n { \@@_ref_value:nnn {__tag_objr_page_#2 }{ tagabspage }{1} }
+ }
% add the parent obj number to the parent tree:
\exp_args:Nnx
\@@_parenttree_add_objr:nn
@@ -740,6 +747,20 @@
\prop_item:cn {g_@@_struct_\g__tag_struct_stack_current_tl _prop}{S}
}
}
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_get_data_struct_num:}
+% this command allows \cs{tag_get:n} to get the current
+% structure number with the keyword |struct_num|. We will need to handle nesting
+% \begin{macrocode}
+%<*base>
+\cs_new:Npn \@@_get_data_struct_num:
+ {
+ \int_use:N\c@g_@@_struct_abs_int
+ }
+%</base>
% \end{macrocode}
% \end{macro}
%
@@ -761,6 +782,7 @@
% E (struct-key)
% }
% \begin{macrocode}
+%<*package>
\keys_define:nn { @@ / struct }
{
label .tl_set:N = \l_@@_struct_key_label_tl,
@@ -1000,7 +1022,7 @@
%
% \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_begin:n #1 {\int_gincr:N \c@g_@@_struct_abs_int}
%<base>\cs_new_protected:Npn \tag_struct_end:{}
%<*package|debug>
%<package>\cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val
@@ -1170,7 +1192,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-attr-code} {2022-05-29} {0.95}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}