diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-13 21:05:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-13 21:05:40 +0000 |
commit | d8a708abc1ed023e582f732ac87e906bba4d884c (patch) | |
tree | 3212c9992cf00ad728c8dceb83f414377b6fcebf /Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx | |
parent | 031d7dac6f41c0c635cb8e8fa08cf794a1cc80c1 (diff) |
tagpdf (13jan22)
git-svn-id: svn://tug.org/texlive/trunk@61600 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx | 138 |
1 files changed, 134 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx index 5cdbc60cf65..53f97383f88 100644 --- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx +++ b/Master/texmf-dist/source/latex/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 |