summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpdf/tagpdf-user.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tagpdf/tagpdf-user.dtx')
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx34
1 files changed, 24 insertions, 10 deletions
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index 30f5abc3b4..607e949eed 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.95, released 2022-05-29}
+% \date{Version 0.96, released 2022-08-06}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -246,18 +246,20 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2022-05-29} {0.95}
+\ProvidesExplPackage {tagpdf-user} {2022-08-06} {0.96}
{tagpdf - user commands}
%</header>
% \end{macrocode}
% \section{Setup and preamble commands}
% \begin{macro}{\tagpdfsetup}
% \begin{macrocode}
+%<base>\NewDocumentCommand \tagpdfsetup { m }{}
%<*package>
-\NewDocumentCommand \tagpdfsetup { m }
+\RenewDocumentCommand \tagpdfsetup { m }
{
\keys_set:nn { @@ / setup } { #1 }
}
+%</package>
% \end{macrocode}
% \end{macro}
%
@@ -265,15 +267,15 @@
% \section{Commands for the mc-chunks}
% \begin{macro}{\tagmcbegin,\tagmcend,\tagmcuse }
% \begin{macrocode}
+%<*base>
\NewDocumentCommand \tagmcbegin { m }
{
- \tag_mc_begin:n {#1}%\ignorespaces
+ \tag_mc_begin:n {#1}
}
\NewDocumentCommand \tagmcend { }
{
- %\if_mode_horizontal: \unskip \fi: %
\tag_mc_end:
}
@@ -281,7 +283,7 @@
{
\tag_mc_use:n {#1}
}
-
+%</base>
% \end{macrocode}
% \end{macro}
@@ -290,10 +292,12 @@
% importance for pdflatex as lualatex doesn't mind much if a mc tag is not
% correctly closed. Unlike the expl3 command it is not expandable.
% \begin{macrocode}
+%<*package>
\NewDocumentCommand \tagmcifinTF { m m }
{
\tag_mc_if_in:TF { #1 } { #2 }
}
+%</package>
% \end{macrocode}
% \end{macro}
%
@@ -303,6 +307,7 @@
% These are structure related user commands. There are direct wrapper around the
% expl3 variants.
% \begin{macrocode}
+%<*base>
\NewDocumentCommand \tagstructbegin { m }
{
\tag_struct_begin:n {#1}
@@ -317,6 +322,7 @@
{
\tag_struct_use:n {#1}
}
+%</base>
% \end{macrocode}
% \end{macro}
%
@@ -327,6 +333,7 @@
% This is a generic command for various show commands.
% It takes a keyval list, the various keys are implemented below.
% \begin{macrocode}
+%<*package>
\NewDocumentCommand\ShowTagging { m }
{
\keys_set:nn { @@ / show }{ #1}
@@ -559,6 +566,8 @@
\bool_new:N \l_@@_para_show_bool
\int_new:N \g_@@_para_begin_int
\int_new:N \g_@@_para_end_int
+\tl_new:N \l_@@_para_tag_tl
+\tl_set:Nn \l_@@_para_tag_tl { P }
% \end{macrocode}
% \end{macro}
%
@@ -576,6 +585,7 @@
{
paratagging .bool_set:N = \l_@@_para_bool,
paratagging-show .bool_set:N = \l_@@_para_show_bool,
+ paratag .tl_set:N = \l_@@_para_tag_tl
}
% \end{macrocode}
@@ -587,13 +597,13 @@
\bool_if:NT \l_@@_para_bool
{
\int_gincr:N \g_@@_para_begin_int
- \tag_struct_begin:n {tag=P}
+ \tag_struct_begin:n {tag=\l_@@_para_tag_tl}
\bool_if:NT \l_@@_para_show_bool
{ \tag_mc_begin:n{artifact}
\llap{\color_select:n{red}\tiny\int_use:N\g_@@_para_begin_int\ }
\tag_mc_end:
}
- \tag_mc_begin:n {tag=P}
+ \tag_mc_begin:n {tag=\l_@@_para_tag_tl}
}
}
\AddToHook{para/end}
@@ -649,6 +659,7 @@
}
}
}
+%</package>
% \end{macrocode}
% \begin{macro}
% {
@@ -658,8 +669,11 @@
% This two command switch para mode on and off. |\tagpdfsetup| could be used
% too but is longer.
% \begin{macrocode}
-\newcommand\tagpdfparaOn {\bool_set_true:N \l_@@_para_bool}
-\newcommand\tagpdfparaOff{\bool_set_false:N \l_@@_para_bool}
+%<base>\newcommand\tagpdfparaOn {}
+%<base>\newcommand\tagpdfparaOff{}
+%<*package>
+\renewcommand\tagpdfparaOn {\bool_set_true:N \l_@@_para_bool}
+\renewcommand\tagpdfparaOff{\bool_set_false:N \l_@@_para_bool}
% \end{macrocode}
% \end{macro}
%