summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx')
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx48
1 files changed, 29 insertions, 19 deletions
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index e2973a593b..a7b129f2d3 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98e, released 2023-03-07}
+% \date{Version 0.98f, released 2023-04-24}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-04-24} {0.98f}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-03-07} {0.98e}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-04-24} {0.98f}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -708,22 +708,29 @@
}
\bool_if:NF \l_@@_mc_key_stash_bool
{
- \exp_args:NV\@@_struct_get_tag_info:nNN
+ \exp_args:NV\@@_struct_get_parentrole:nNN
\g_@@_struct_stack_current_tl
- \l_@@_tmpa_tl
- \l_@@_tmpb_tl
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
\@@_check_parent_child:VVnnN
- \l_@@_tmpa_tl \l_@@_tmpb_tl
- {MC}{}
- \l_@@_parent_child_check_tl
+ \l_@@_get_parent_tmpa_tl
+ \l_@@_get_parent_tmpb_tl
+ {MC}{}
+ \l_@@_parent_child_check_tl
\int_compare:nNnT {\l_@@_parent_child_check_tl}<{0}
{
+ \prop_get:cnN
+ { g_@@_struct_ \g_@@_struct_stack_current_tl _prop}
+ {S}
+ \l_@@_tmpa_tl
\msg_warning:nnxxx
{ tag }
{role-parent-child}
- { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl }
- { MC~(=~real content) }
- { 'not~allowed'. }
+ { \l_@@_get_parent_tmpa_tl/\l_@@_get_parent_tmpb_tl }
+ { MC~(real content) }
+ { not~allowed~
+ (struct~\g_@@_struct_stack_current_tl,~\l_@@_tmpa_tl)
+ }
}
\@@_mc_handle_stash:x { \int_use:N \c@g_@@_MCID_abs_int }
}
@@ -805,13 +812,16 @@
alttext .meta:n = {alt=#1},
actualtext .code:n = % ActualText property
{
- \str_set_convert:Noon
- \l_@@_tmpa_str
- { #1 }
- { default }
- { utf16/hex }
- \tl_put_right:Nn \l_@@_mc_key_properties_tl { /ActualText~< }
- \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l_@@_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \tl_put_right:Nn \l_@@_mc_key_properties_tl { /ActualText~< }
+ \tl_put_right:No \l_@@_mc_key_properties_tl { \l_@@_tmpa_str>~ }
+ }
},
label .tl_set:N = \l_@@_mc_key_label_tl,
artifact .code:n =