diff options
author | Norbert Preining <norbert@preining.info> | 2023-06-15 03:03:06 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-06-15 03:03:06 +0000 |
commit | 9eb6f85105699320d8cbdbb33bcdc88c41ea709a (patch) | |
tree | 6e85740b17273391cbcf76437e1241588db70329 /macros/latex/contrib/tagpdf/tagpdf-checks.dtx | |
parent | 68da45b74eea591538f6378878a0dca04e541bb9 (diff) |
CTAN sync 202306150303
Diffstat (limited to 'macros/latex/contrib/tagpdf/tagpdf-checks.dtx')
-rw-r--r-- | macros/latex/contrib/tagpdf/tagpdf-checks.dtx | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx index 39b786ee41..81fd2c8d95 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.98h, released 2023-06-06} +% \date{Version 0.98i, released 2023-06-14} % \maketitle % \begin{documentation} % \section{Commands} @@ -66,6 +66,18 @@ % are |mc_tag|, |struct_tag|, |struct_id| and |struct_num|. % \end{function} % +% \begin{function}[pTF,EXP]{\tag_if_box_tagged:N} +% \begin{syntax} +% \cs{tag_if_box_tagged:N}\Arg{box} +% \end{syntax} +% This tests if a box contains tagging commands. +% It relies currently on that the code that saved the box correctly set +% the command \verb+\l_tag_box_\int_use:N #1_tl+ to a positive value. +% The LaTeX commands will do that automatically +% at some time but it is in the responsability of the user to +% ensure that when using low-level code. +% If the internal command doesn't exist the box is assumed to be tagged. +% \end{function} % \section{Description of log messages} % \subsection{\cs{ShowTagging} command} % \begin{tabular}{lll} @@ -300,7 +312,7 @@ % \begin{macrocode} %<@@=tag> %<*header> -\ProvidesExplPackage {tagpdf-checks-code} {2023-06-06} {0.98h} +\ProvidesExplPackage {tagpdf-checks-code} {2023-06-14} {0.98i} {part of tagpdf - code related to checks, conditionals, debugging and messages} %</header> % \end{macrocode} @@ -529,7 +541,7 @@ % % \section{User conditionals} % \begin{macro}[pTF]{\tag_if_active:} -% This is a test it tagging is active. This allows packages +% This tests if tagging is active. This allows packages % to add conditional code. % The test is true if all booleans, the global and the two local one are true. % @@ -556,6 +568,34 @@ \prg_return_false: } } +%</package> +% \end{macrocode} +% \end{macro} +% +% \begin{macro}[pTF]{\tag_if_box_tagged:N} +% This tests if a box contains tagging commands. +% It relies on that the code that saved the box correctly set +% \verb+\l_tag_box_<box number>_tl+ to a positive value. +% The LaTeX commands will do that automatically +% at some time but it is in the responsability of the user to +% ensure that when using low-level code. +% If the internal command doesn't exist the box is assumed to be tagged. +% \begin{macrocode} +%<*base> +\prg_new_conditional:Npnn \tag_if_box_tagged:N #1 {p,T,F,TF} + { + \tl_if_exist:cTF {l_tag_box_\int_use:N #1_tl} + { + \int_compare:nNnTF {\tl_use:c{l_tag_box_\int_use:N #1_tl}}>{0} + { \prg_return_true: } + { \prg_return_false: } + } + { + \prg_return_true: + % warning?? + } + } +%</base> % \end{macrocode} % \end{macro} % @@ -566,6 +606,7 @@ % \begin{macro}[TF]{\@@_check_if_active_mc:,\@@_check_if_active_struct:} % This checks if mc are active. % \begin{macrocode} +%<*package> \prg_new_conditional:Npnn \@@_check_if_active_mc: {T,F,TF} { \bool_lazy_and:nnTF { \g_@@_active_mc_bool } { \l_@@_active_mc_bool } |