summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-14 20:30:18 +0000
committerKarl Berry <karl@freefriends.org>2021-06-14 20:30:18 +0000
commit6edc677a3c031d7dbf451d7abfb1016abe58e0c8 (patch)
treec3fc8df036be972928824e81643915bd9f2c9120 /Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
parentea584efe11866db25e596b86b3b7ae07e39e18f4 (diff)
tagpdf (14jun21)
git-svn-id: svn://tug.org/texlive/trunk@59592 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx')
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx30
1 files changed, 24 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
index ba473d7022f..959e7c0097b 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
@@ -27,7 +27,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2021/05/14} {0.81}
+\ProvidesExplPackage {tagpdf} {2021-06-14} {0.82}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -335,7 +335,7 @@
%
% \begin{macrocode}
%<*user>
-\ProvidesExplPackage {tagpdf-user} {2021/05/14} {0.81}
+\ProvidesExplPackage {tagpdf-user} {2021-06-14} {0.82}
{tagpdf - user commands}
% \end{macrocode}
@@ -351,6 +351,24 @@
\cs_set_eq:NN\tagpdfifpdftexT \sys_if_engine_pdftex:T
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\tag_if_active:}
+% This is a test it tagging is active. This allows packages
+% to add conditional code. We probably will need a better
+% test in the end, but for now it should be ok.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F }
+ {
+ \bool_if:NTF\g_@@_active_struct_bool
+ {
+ \prg_return_true:
+ }
+ {
+ \prg_return_false:
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% We need a command to stop tagging in some places.
%
% \begin{macro}{ \tag_stop_group_begin:, \tag_stop_group_end: }
@@ -590,7 +608,7 @@
\pdfannot_dict_put:nnx
{ link/URI }
{ StructParent }
- { \int_use:N\c@g_@@_parenttree_obj_int }
+ { \tag_struct_parent_int: }
}
}
@@ -600,7 +618,7 @@
{
\bool_if:NT \g_@@_active_struct_bool
{
- \@@_struct_finish_link:
+ \tag_struct_insert_annot:xx {\pdfannot_link_ref_last:}{\tag_struct_parent_int:}
\tag_mc_end:
\tag_struct_end:
\tag_mc_begin_pop:n{}
@@ -619,7 +637,7 @@
\pdfannot_dict_put:nnx
{ link/GoTo }
{ StructParent }
- { \int_use:N\c@g_@@_parenttree_obj_int }
+ { \tag_struct_parent_int: }
}
}
@@ -629,7 +647,7 @@
{
\bool_if:NT \g_@@_active_struct_bool
{
- \@@_struct_finish_link:
+ \tag_struct_insert_annot:xx {\pdfannot_link_ref_last:}{\tag_struct_parent_int:}
\tag_mc_end:
\tag_struct_end:
\tag_mc_begin_pop:n{}