diff options
Diffstat (limited to 'macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx')
-rw-r--r-- | macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx index 42017f4836..ea460e0104 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.97, released 2022-08-24} +% \date{Version 0.98, released 2022-12-22} % \maketitle % \begin{documentation} % \end{documentation} @@ -55,11 +55,11 @@ % \begin{macrocode} %<@@=tag> %<*generic> -\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-08-24} {0.97} +\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-12-22} {0.98} {part of tagpdf - code related to marking chunks - generic mode} %</generic> %<*debug> -\ProvidesExplPackage {tagpdf-debug-generic} {2022-08-24} {0.97} +\ProvidesExplPackage {tagpdf-debug-generic} {2022-12-22} {0.98} {part of tagpdf - debugging code related to marking chunks - generic mode} %</debug> % \end{macrocode} @@ -683,6 +683,11 @@ \group_begin: %hm \@@_check_mc_if_nested: \bool_gset_true:N \g_@@_in_mc_bool +% \end{macrocode} +% set default MC tags to structure: +% \begin{macrocode} + \tl_set_eq:NN \l_@@_mc_key_tag_tl \g_@@_struct_tag_tl + \tl_gset_eq:NN\g_@@_mc_key_tag_tl \g_@@_struct_tag_tl \keys_set:nn { @@ / mc } {#1} \bool_if:NTF \l_@@_mc_artifact_bool { %handle artifact @@ -703,6 +708,23 @@ } \bool_if:NF \l_@@_mc_key_stash_bool { + \exp_args:NV\@@_struct_get_tag_info:nNN + \g_@@_struct_stack_current_tl + \l_@@_tmpa_tl + \l_@@_tmpb_tl + \@@_check_parent_child:VVnnN + \l_@@_tmpa_tl \l_@@_tmpb_tl + {MC}{} + \l_@@_parent_child_check_tl + \int_compare:nNnT {\l_@@_parent_child_check_tl}<{0} + { + \msg_warning:nnxxx + { tag } + {role-parent-child} + { \g_@@_struct_tag_tl/\g_@@_struct_tag_NS_tl } + { MC~(=~real content) } + { 'not~allowed'. } + } \@@_mc_handle_stash:x { \int_use:N \c@g_@@_MCID_abs_int } } } |