summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-12-24 03:01:20 +0000
committerNorbert Preining <norbert@preining.info>2022-12-24 03:01:20 +0000
commitda0bd16b0ba9d42d044af47137003788f0b7f773 (patch)
treec7681ad6dfc80d15e6439d6e981c48046acee3f8 /macros/latex/contrib/tagpdf/tagpdf-checks.dtx
parentb2b552bfe4933283e7d61d721bea40b0dd2bb9fb (diff)
CTAN sync 202212240301
Diffstat (limited to 'macros/latex/contrib/tagpdf/tagpdf-checks.dtx')
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx70
1 files changed, 62 insertions, 8 deletions
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index e5ba53195f..52113f348f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.97, released 2022-08-24}
+% \date{Version 0.98, released 2022-12-22}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -295,7 +295,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2022-08-24} {0.97}
+\ProvidesExplPackage {tagpdf-checks-code} {2022-12-22} {0.98}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -402,9 +402,22 @@
% Informational message shown if log-mode is high enough
% \begin{macrocode}
\msg_new:nnn { tag } {struct-show-closing}
- { closing~structure~#1~tagged~\prop_item:cn{g_@@_struct_#1_prop}{S} }
+ { closing~structure~#1~tagged~\use:e{\prop_item:cn{g_@@_struct_#1_prop}{S}} }
% \end{macrocode}
% \end{macro}
+% \begin{macro}{tree-struct-still-open}
+% Message issued at the end if there are beside Root other
+% open structures on the stack.
+% \begin{macrocode}
+\msg_new:nnn { tag } {tree-struct-still-open}
+ {
+ There~are~still~open~structures~on~the~stack!\\
+ The~stack~contains~\seq_use:Nn\g_@@_struct_tag_stack_seq{,}.\\
+ The~structures~are~automatically~closed,\\
+ but~their~nesting~can~be~wrong.
+ }
+% \end{macrocode}
+% \end{macro}
%
% \subsection{Attributes}
% Not much yet, as attributes aren't used so much.
@@ -423,11 +436,30 @@
\msg_new:nnn { tag } {role-unknown-tag} { tag~#1~is~not~known }
% \end{macrocode}
% \end{macro}
+% \begin{macro}{role-parent-child}
+% This is info and warning message about the containment rules between child and
+% parent tags.
+% \begin{macrocode}
+\msg_new:nnn { tag } {role-parent-child}
+ { The~rule~between~parent~'#1'~\\and~child~'#2'~is~#3}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{role-parent-child}
+% This is info and warning message about the containment rules between child and
+% parent tags.
+% \begin{macrocode}
+\msg_new:nnn { tag } {role-remapping}
+ { remapping~tag~to~#1 }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{role-tag,new-tag}
% Info messages.
% \begin{macrocode}
\msg_new:nnn { tag } {role-tag} { mapping~tag~#1~to~role~#2 }
\msg_new:nnn { tag } {new-tag} { adding~new~tag~#1 }
+\msg_new:nnn { tag } {read-namespace} { reading~namespace~definitions~tagpdf-ns-#1.def }
+\msg_new:nnn { tag } {namespace-missing}{ namespace~definitions~tagpdf-ns-#1.def~not~found }
+\msg_new:nnn { tag } {namespace-unknown}{ namespace~#1~is~not~declared }
% \end{macrocode}
% \end{macro}
%
@@ -562,7 +594,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_check_structure_tag:N #1
{
- \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}
}
@@ -618,10 +650,10 @@
{
\tl_if_empty:nTF {#2}
{
- \msg_warning:nnn { tag } {role-missing} {#1}
+ \msg_error:nnn { tag } {role-missing} {#1}
}
{
- \prop_get:NnNTF \g_@@_role_tags_prop {#2} \l_tmpa_tl
+ \prop_get:NnNTF \g_@@_role_tags_NS_prop {#2} \l_tmpa_tl
{
\int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
{
@@ -629,13 +661,35 @@
}
}
{
- \msg_warning:nnn { tag } {role-unknown} {#2}
+ \msg_error:nnn { tag } {role-unknown} {#2}
+ }
+ }
+ }
+% \end{macrocode}
+% Similar with a namespace
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_check_add_tag_role:nnn #1 #2 #3 %#1 tag/NS, #2 role #3 namespace
+ {
+ \tl_if_empty:nTF {#2}
+ {
+ \msg_error:nnn { tag } {role-missing} {#1}
+ }
+ {
+ \prop_get:cnNTF { g_@@_role_NS_#3_prop } {#2} \l_tmpa_tl
+ {
+ \int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
+ {
+ \msg_info:nnnn { tag } {role-tag} {#1} {#2/#3}
+ }
+ }
+ {
+ \msg_error:nnn { tag } {role-unknown} {#2/#3}
}
}
}
% \end{macrocode}
% \end{macro}
-%
+
% \subsection{Check related to mc-chunks}
%
% \begin{macro}{\@@_check_mc_if_nested:,\@@_check_mc_if_open:}