[latex3-commits] [latex3/tagpdf] renamekeys: rename keys (efb73f7)
github at latex-project.org
github at latex-project.org
Sat Feb 17 01:08:09 CET 2024
Repository : https://github.com/latex3/tagpdf
On branch : renamekeys
Link : https://github.com/latex3/tagpdf/commit/efb73f70257e83f727f600f3ecb28d8d4a378957
>---------------------------------------------------------------
commit efb73f70257e83f727f600f3ecb28d8d4a378957
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sat Feb 17 01:08:09 2024 +0100
rename keys
>---------------------------------------------------------------
efb73f70257e83f727f600f3ecb28d8d4a378957
doc/tagpdf.tex | 2 +-
doc/tagpdfsetup-keys.md | 2 +-
tagpdf-roles.dtx | 2 +-
tagpdf-space.dtx | 1 +
tagpdf-struct.dtx | 6 ++--
tagpdf-user.dtx | 92 +++++++++++++++++++++++++++++++++----------------
tagpdf.dtx | 2 +-
7 files changed, 71 insertions(+), 36 deletions(-)
diff --git a/doc/tagpdf.tex b/doc/tagpdf.tex
index d6d78bc..2a4bde8 100644
--- a/doc/tagpdf.tex
+++ b/doc/tagpdf.tex
@@ -10,7 +10,7 @@
\DocumentMetadata
{
% comment the following line to compile an untagged documentation:
- testphase=phase-III,
+ testphase={phase-III,title,table},
pdfversion=2.0,lang=en-UK,pdfstandard=a-4,pdfstandard=ua-2
%uncompress
}
diff --git a/doc/tagpdfsetup-keys.md b/doc/tagpdfsetup-keys.md
index b60c91c..673138b 100644
--- a/doc/tagpdfsetup-keys.md
+++ b/doc/tagpdfsetup-keys.md
@@ -69,7 +69,7 @@ Currently we have setup keys for four document elements: `page`, `para`, `math`,
```
page/tabsorder (old tabsorder)
-page/header-footer (old exclude header-footer)
+page/exclude-header-footer (old exclude-header-footer)
```
### para key path
diff --git a/tagpdf-roles.dtx b/tagpdf-roles.dtx
index cc681a2..090dc6f 100644
--- a/tagpdf-roles.dtx
+++ b/tagpdf-roles.dtx
@@ -1299,7 +1299,7 @@
\l_@@_role_role_namespace_tmpa_tl
}
}
- ,tagset .choice:n
+ ,tagset .choice:
,tagset/latex .code:n = { \socket_assign_plug:nn { tag/struct/tag } {latex-tags} }
,tagset/pdf .code:n = { \socket_assign_plug:nn { tag/struct/tag } {pdf-tags} }
% \end{macrocode}
diff --git a/tagpdf-space.dtx b/tagpdf-space.dtx
index 8190de2..a09f1a1 100644
--- a/tagpdf-space.dtx
+++ b/tagpdf-space.dtx
@@ -95,6 +95,7 @@
show-spaces .choice:,
show-spaces/true .meta:n = {debug/show=spaces},
show-spaces/false .meta:n = {debug/show=spacesOff},
+ show-spaces .default:n = true
}
\sys_if_engine_pdftex:T
{
diff --git a/tagpdf-struct.dtx b/tagpdf-struct.dtx
index 2e7d5ce..8a16974 100644
--- a/tagpdf-struct.dtx
+++ b/tagpdf-struct.dtx
@@ -1117,7 +1117,8 @@
% This socket is used by the tag key. It allows to switch between
% the latex-tabs and the standard tags.
% \begin{macrocode}
-\socket_new:nn { tag/struct/tag }{0}
+%<*package>
+\socket_new:nn { tag/struct/tag }{1}
\socket_new_plug:nnn { tag/struct/tag }{ latex-tags }
{
\seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
@@ -1154,7 +1155,6 @@
% E (struct-key)
% }
% \begin{macrocode}
-%<*package>
\keys_define:nn { @@ / struct }
{
label .tl_set:N = \l_@@_struct_key_label_tl,
@@ -1178,7 +1178,7 @@
parent .default:n = {-1},
tag .code:n = % S property
{
- \socket_use:n { tag/struct/tag }
+ \socket_use:nn { tag/struct/tag }{#1}
},
title .code:n = % T property
{
diff --git a/tagpdf-user.dtx b/tagpdf-user.dtx
index 0a53886..feaf19e 100644
--- a/tagpdf-user.dtx
+++ b/tagpdf-user.dtx
@@ -225,17 +225,21 @@
% \end{function}
%
% \subsection{Header and footer}
-% Header and footer are automatically excluded from tagging. This can
-% be disabled with the following key.
+% Header and footer are automatically tagged as artifact:
+% They are surrounded by an artifact-mc and inside tagging is stopped.
% If some real content is in the header and
% footer, tagging must be restarted there explicitly.
-% The key accepts the values |true| which surrounds the header with an artifact
-% mc-chunk, |false| which disables the automatic tagging, and |pagination| which
+% The behaviour can be changed with the following key.
+% The key accepts the values |true| (the default),
+% |false| which disables the header tagging code. This can be useful
+% if the page style is empty (it then avoids empty mc-chunks) or
+% if the head and foot should be tagged in some special way.
+% The last value, |pagination|, is like |true| but
% additionally adds an artifact structure with an pagination attribute.
%
-% \begin{function}{exclude-header-footer (setup-key)}
+% \begin{function}{page/exclude-header-footer (setup-key)}
% \begin{syntax}
-% |exclude-header-footer| = |true|\verb+|+|false|\verb+|+pagination
+% |page/exclude-header-footer| = |true|\verb+|+|false|\verb+|+pagination
% \end{syntax}%
% \end{function}
@@ -266,7 +270,7 @@
% \end{syntax}
% \end{function}
-% The next \LaTeX{} will use special sockets for the tagging.
+% The next \LaTeX{} (2024-06-01) will use special sockets for the tagging.
%
% These sockets will use names starting
% with \texttt{tagsupport/}. Usually, these sockets have exactly two
@@ -881,17 +885,47 @@
% \end{macrocode}
%\begin{macro}
% {
-% paratagging (setup-key),
-% paratagging-show (setup-key),
-% paratag (setup-key),
-% paratag (tool-key),
-% unittag (tool-key),
-% para-flattened (tool-key),
+% para/tagging (setup-key),
+% para/tag (setup-key),
+% para/maintag (setup-key),
+% para/tag (tool-key),
+% para/maintag (tool-key),
+% para/flattened (tool-key),
+% unittag (deprecated),
+% para-flattened (deprecated),
+% paratagging (deprecated),
+% paratagging-show (deprecated),
+% paratag (deprecated),
% }
-% These keys enable/disable locally paratagging, and the debug modus.
-% It can affect the typesetting if |paratagging-show| is used. The small numbers
-% are boxes and they have a (small) height. The |paratag| key sets the tag used by
-% the next automatic paratagging, it can also be changed with |\tag_tool:n|
+% These keys enable/disable locally paratagging.
+% Paragraphs are typically tagged with two structure: A main structure
+% around the whole paragraph, and inner structures around the various chunks.
+% Debugging can be
+% activated locally with |debug/show=para|, this can affect the typesetting
+% as the small numbers
+% are boxes and they have a (small) height. Debugging can be deactivated
+% with |debug/show=paraOff|
+% The |para/tag| key sets the tag used by
+% the inner structure, |para/maintag| the tag of the outer structure,
+% both can also be changed with |\tag_tool:n|
+% \begin{macrocode}
+\keys_define:nn { @@ / setup }
+ {
+ para/tagging .bool_set:N = \l_@@_para_bool,
+ debug/show/para .code:n = {\bool_set_true:N \l_@@_para_show_bool},
+ debug/show/paraOff .code:n = {\bool_set_false:N \l_@@_para_show_bool},
+ para/tag .tl_set:N = \l_@@_para_tag_tl,
+ para/tag .tl_set:N = \l_@@_para_main_tag_tl
+ }
+\keys_define:nn { tag / tool}
+ {
+ para/tagging .bool_set:N = \l_@@_para_bool,
+ para/tag .tl_set:N = \l_@@_para_tag_tl,
+ para/maintag .tl_set:N = \l_@@_para_main_tag_tl,
+ para/flattened .bool_set:N = \l_@@_para_flattened_bool
+ }
+% \end{macrocode}
+% the deprecated names
% \begin{macrocode}
\keys_define:nn { @@ / setup }
{
@@ -901,6 +935,7 @@
}
\keys_define:nn { tag / tool}
{
+ para .bool_set:N = \l_@@_para_bool,
paratag .tl_set:N = \l_@@_para_tag_tl,
unittag .tl_set:N = \l_@@_para_main_tag_tl,
para-flattened .bool_set:N = \l_@@_para_flattened_bool
@@ -1135,11 +1170,6 @@
%<*package>
\renewcommand\tagpdfparaOn {\bool_set_true:N \l_@@_para_bool}
\renewcommand\tagpdfparaOff{\bool_set_false:N \l_@@_para_bool}
-\keys_define:nn { tag / tool}
- {
- para .bool_set:N = \l_@@_para_bool,
- para-flattened .bool_set:N = \l_@@_para_flattened_bool,
- }
% \end{macrocode}
% \end{macro}
%
@@ -1250,34 +1280,38 @@
}
% \end{macrocode}
% And now the keys
-% \begin{macro}{exclude-header-footer (setup-key)}
+% \begin{macro}{page/exclude-header-footer (setup-key),exclude-header-footer (deprecated)}
% \begin{macrocode}
\keys_define:nn { @@ / setup }
{
- exclude-header-footer .choice:,
- exclude-header-footer / true .code:n =
+ page/exclude-header-footer .choice:,
+ page/exclude-header-footer / true .code:n =
{
\cs_set_eq:NN \@@_hook_kernel_before_head: \@@_exclude_headfoot_begin:
\cs_set_eq:NN \@@_hook_kernel_before_foot: \@@_exclude_headfoot_begin:
\cs_set_eq:NN \@@_hook_kernel_after_head: \@@_exclude_headfoot_end:
\cs_set_eq:NN \@@_hook_kernel_after_foot: \@@_exclude_headfoot_end:
},
- exclude-header-footer / pagination .code:n =
+ page/exclude-header-footer / pagination .code:n =
{
\cs_set:Nn \@@_hook_kernel_before_head: { \@@_exclude_struct_headfoot_begin:n {pagination} }
\cs_set:Nn \@@_hook_kernel_before_foot: { \@@_exclude_struct_headfoot_begin:n {pagination} }
\cs_set_eq:NN \@@_hook_kernel_after_head: \@@_exclude_struct_headfoot_end:
\cs_set_eq:NN \@@_hook_kernel_after_foot: \@@_exclude_struct_headfoot_end:
},
- exclude-header-footer / false .code:n =
+ page/exclude-header-footer / false .code:n =
{
\cs_set_eq:NN \@@_hook_kernel_before_head: \prg_do_nothing:
\cs_set_eq:NN \@@_hook_kernel_before_foot: \prg_do_nothing:
\cs_set_eq:NN \@@_hook_kernel_after_head: \prg_do_nothing:
\cs_set_eq:NN \@@_hook_kernel_after_foot: \prg_do_nothing:
},
- exclude-header-footer .default:n = true,
- exclude-header-footer .initial:n = true
+ page/exclude-header-footer .default:n = true,
+ page/exclude-header-footer .initial:n = true,
+% \end{macrocode}
+% deprecated name
+% \begin{macrocode}
+ exclude-header-footer .meta:n = { page/exclude-header-footer = {#1} }
}
% \end{macrocode}
% \end{macro}
diff --git a/tagpdf.dtx b/tagpdf.dtx
index 419ca6f..19a0335 100644
--- a/tagpdf.dtx
+++ b/tagpdf.dtx
@@ -618,7 +618,7 @@
% \end{macrocode}
% deprecated name
% \begin{macrocode}
- tagunmarked .bool_gset:N = \g_@@_tagunmarked_bool
+ tagunmarked .bool_gset:N = \g_@@_tagunmarked_bool,
% \end{macrocode}
% \end{macro}
% \begin{macro}{page/tabsorder (setup-key),tabsorder (deprecated)}
More information about the latex3-commits
mailing list.