From 2fc2609488764102ce43194e9288b7bd8e25f17f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 16 May 2021 03:00:44 +0000 Subject: CTAN sync 202105160300 --- macros/latex/contrib/tagpdf/tagpdf-checks.dtx | 36 +++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 5 deletions(-) (limited to 'macros/latex/contrib/tagpdf/tagpdf-checks.dtx') diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx index ad3866ed76..eb0f41e89b 100644 --- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx +++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx @@ -2,7 +2,7 @@ % %% File: tagpdf-checks.dtx % -% Copyright (C) 2019-2020 Ulrike Fischer +% Copyright (C) 2019-2021 Ulrike Fischer % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -27,7 +27,7 @@ % \begin{macrocode} %<@@=tag> %<*checks> -\ProvidesExplPackage {tagpdf-checks-code} {2021/02/23} {0.80} +\ProvidesExplPackage {tagpdf-checks-code} {2021/05/14} {0.81} {part of tagpdf - code related to checks and messages} @@ -39,6 +39,8 @@ \msg_new:nnn { tag } {mc-label-unknown} { label~#1~unknown~-~rerun } \msg_new:nnn { tag } {mc-used-twice} { mc~#1~has~been~already~used } \msg_new:nnn { tag } {mc-not-open} { there~is~no~mc~to~end~at~#1 } +\msg_new:nnn { tag } {mc-pushed} { #1~has~been~pushed~to~the~mc~stack} +\msg_new:nnn { tag } {mc-popped} { #1~has~been~removed~from~the~mc~stack } % structures \msg_new:nnn { tag } {struct-no-objnum} { objnum~missing~for~structure~#1 } @@ -56,7 +58,8 @@ \msg_new:nnn { tag } {role-missing} { tag~#1~has~no~role~assigned } \msg_new:nnn { tag } {role-unknown} { role~#1~is~not~known } \msg_new:nnn { tag } {role-unknown-tag} { tag~#1~is~not~known } -\msg_new:nnn { tag } {role-new-tag} { adding~new~tag~#1~mapped~to~role~#2 } +\msg_new:nnn { tag } {role-tag} { mapping~tag~#1~to~role~#2 } +\msg_new:nnn { tag } {new-tag} { adding~new~tag~#1 } % trees @@ -88,6 +91,15 @@ } } +\cs_new:Nn \@@_check_structure_tag:NN %_protected? + { + \exp_args:NNx + \prop_if_in:NnF \g_@@_role_tags_prop {#1/#2} + { + \msg_warning:nnx { tag } {role-unknown-tag} {#1} + } + } + \cs_new_protected:Nn \@@_check_info_closing_struct:n %#1 struct num { \msg_info:nnn { tag } {struct-show-closing} {#1} @@ -122,7 +134,7 @@ { \prop_get:NnNTF \g_@@_role_tags_prop {#2} \l_tmpa_tl { - \msg_info:nnnn { tag } {role-new-tag} {#1} {#2} + \msg_info:nnnn { tag } {role-tag} {#1} {#2} } { \msg_warning:nnn { tag } {role-unknown} {#2} @@ -147,13 +159,27 @@ } } +\cs_new_protected:Nn \@@_check_mc_pushed_popped:nn + { + \int_compare:nNnT + { \l_@@_loglevel_int } ={ 2 } + { \msg_info:nnx {tag}{mc-#1}{#2} } + \int_compare:nNnT + { \l_@@_loglevel_int } > { 2 } + { + \msg_warning:nnx {tag}{mc-#1}{#2} + \seq_log:N \g_@@_mc_stack_seq + } + } + + \cs_new:Nn \@@_check_mc_tag:N %protected?? { \tl_if_empty:NT #1 { \msg_error:nnx { tag } {mc-tag-missing} { \@@_get_mc_abs_cnt: } } - \prop_if_in:NoF \g_@@_role_tags_prop {#1} + \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1} { \msg_warning:nnx { tag } {role-unknown-tag} {#1} } -- cgit v1.2.3