diff options
author | Norbert Preining <norbert@preining.info> | 2022-01-14 03:01:14 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-01-14 03:01:14 +0000 |
commit | 45623da68203ac8d7aa04b779a6ed65c92c3f866 (patch) | |
tree | 151ca3ede3ee826360d4b32c0029cfc106346ec9 /macros/latex/contrib/tagpdf/tagpdf-checks.dtx | |
parent | ee3f9ca89b21a2174f7e427d9d48247b1912e130 (diff) |
CTAN sync 202201140301
Diffstat (limited to 'macros/latex/contrib/tagpdf/tagpdf-checks.dtx')
-rw-r--r-- | macros/latex/contrib/tagpdf/tagpdf-checks.dtx | 138 |
1 files changed, 134 insertions, 4 deletions
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx index 5cdbc60cf6..53f97383f8 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-2021 Ulrike Fischer +% Copyright (C) 2019-2022 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 @@ -52,7 +52,7 @@ % }^^A % } % -% \date{Version 0.92, released 2021-08-27} +% \date{Version 0.93, released 2022-01-13} % \maketitle % \begin{documentation} % \section{Commands} @@ -245,13 +245,60 @@ % INFO PARENTTREE-NUMENTRY & 3 \\ % INFO PARENTTREE-STRUCT-OBJREF & 4 % \end{longtable} - +% +% \subsection{Debug mode messages and code} +% If the package tagpdf-debug is loaded a number of commands are redefined and +% enhanced with additional commands which can be used to output debug messages or +% collect statistics. The commands are present but do nothing if the log-level is zero. +% \begin{tabular}{llll} +% command & name & action & remark\\\hline +% |\tag_mc_begin:n| & mc-begin-insert & msg \\ +% & mc-begin-ignore & msg & if inactive \\ +% \end{tabular} +% +% \subsection{Messages} +% \begin{function}{ +% mc-nested, +% mc-tag-missing, +% mc-label-unknown, +% mc-used-twice, +% mc-used-twice, +% mc-not-open, +% mc-pushed, +% mc-popped, +% mc-current} +% Various messages related to mc-chunks. TODO document their meaning. +% \end{function} +% \begin{function}{struct-no-objnum,struct-faulty-nesting, +% struct-missing-tag,struct-used-twice,struct-label-unknown,struct-show-closing} +% Various messages related to structure. TODO document their meaning. +% \end{function} +% +% \begin{function}{attr-unknown} +% Message if an attribute i sunknown. +% \end{function} +% +% \begin{function}{role-missing,role-unknown,role-unknown-tag,role-tag,new-tag} +% Messages related to role mapping. +% \end{function} +% +% \begin{function}{tree-mcid-index-wrong} +% Used in the tree code, typically indicates the document must be rerun. +% \end{function} +% +% \begin{function}{sys-no-interwordspace} +% Message if an engine doesn't support inter word spaces +% \end{function} +% +% \begin{function}{para-hook-count-wrong} +% Message if the number of begin paragraph and end paragraph differ. This normally means faulty structure. +% \end{function} % \end{documentation} % \begin{implementation} % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-checks-code} {2021-08-27} {0.92} +\ProvidesExplPackage {tagpdf-checks-code} {2022-01-13} {0.93} {part of tagpdf - code related to checks, conditionals, debugging and messages} %</header> % \end{macrocode} @@ -791,5 +838,88 @@ % \begin{macrocode} %</package> % \end{macrocode} +% \begin{macrocode} +%<*debug> +% \end{macrocode} +% Code for tagpdf-debug. This will probably change over time. +% At first something for the mc commands. +% \begin{macrocode} +\msg_new:nnn { tag / debug } {mc-begin} { MC~begin~#1~with~options:~\tl_to_str:n{#2}~[\msg_line_context:] } +\msg_new:nnn { tag / debug } {mc-end} { MC~end~#1~[\msg_line_context:] } + +\cs_new_protected:Npn \@@_debug_mc_begin_insert:n #1 + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnnn { tag / debug } {mc-begin} {inserted} { #1 } + } + } +\cs_new_protected:Npn \@@_debug_mc_begin_ignore:n #1 + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnnn { tag / debug } {mc-begin } {ignored} { #1 } + } + } +\cs_new_protected:Npn \@@_debug_mc_end_insert: + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnn { tag / debug } {mc-end} {inserted} + } + } +\cs_new_protected:Npn \@@_debug_mc_end_ignore: + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnn { tag / debug } {mc-end } {ignored} + } + } +% \end{macrocode} +% And now something for the structures +% \begin{macrocode} +\msg_new:nnn { tag / debug } {struct-begin} + { + Struct~begin~#1~with~options:~\tl_to_str:n{#2}~[\msg_line_context:] + } +\msg_new:nnn { tag / debug } {struct-end} + { + Struct~end~#1~[\msg_line_context:] + } + +\cs_new_protected:Npn \@@_debug_struct_begin_insert:n #1 + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnnn { tag / debug } {struct-begin} {inserted} { #1 } + \seq_log:N \g_@@_struct_tag_stack_seq + } + } +\cs_new_protected:Npn \@@_debug_struct_begin_ignore:n #1 + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnnn { tag / debug } {struct-begin } {ignored} { #1 } + } + } +\cs_new_protected:Npn \@@_debug_struct_end_insert: + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnn { tag / debug } {struct-end} {inserted} + \seq_log:N \g_@@_struct_tag_stack_seq + } + } +\cs_new_protected:Npn \@@_debug_struct_end_ignore: + { + \int_compare:nNnT { \l_@@_loglevel_int } > {0} + { + \msg_note:nnn { tag / debug } {struct-end } {ignored} + } + } +% \end{macrocode} +% \begin{macrocode} +%</debug> +% \end{macrocode} % \end{implementation} % \PrintIndex |