[latex3-commits] [latex3/tagpdf] firstkid: switch to suspend/resume (fc72182)
github at latex-project.org
github at latex-project.org
Mon Sep 16 19:33:29 CEST 2024
Repository : https://github.com/latex3/tagpdf
On branch : firstkid
Link : https://github.com/latex3/tagpdf/commit/fc7218297e0f428634d728d72749f936ee47fd17
>---------------------------------------------------------------
commit fc7218297e0f428634d728d72749f936ee47fd17
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Sep 16 19:33:29 2024 +0200
switch to suspend/resume
>---------------------------------------------------------------
fc7218297e0f428634d728d72749f936ee47fd17
doc/tagpdf.tex | 8 ++++++--
tagpdf-mc-shared.dtx | 4 ++--
tagpdf-user.dtx | 12 ++++++------
testfiles/test-start-stop-notag.lvt | 16 ++++++++--------
testfiles/test-start-stop.lvt | 24 ++++++++++++------------
5 files changed, 34 insertions(+), 30 deletions(-)
diff --git a/doc/tagpdf.tex b/doc/tagpdf.tex
index a9d63a3..4843d67 100644
--- a/doc/tagpdf.tex
+++ b/doc/tagpdf.tex
@@ -2074,7 +2074,7 @@ These commands suspend and resume tagging in the current group by switching
keep track of paragraphs if the correct wrapper commands are used.
Restarting tagging is normally only needed if groups can't be used and then
-must be done with care: |\tagstart| should normally only restart tagging if
+must be done with care: |\tag_resume:n| should normally only restart tagging if
the corresponding stop command actually stopped tagging. This is implement
through a local counter which keeps track of the level.
@@ -3068,7 +3068,11 @@ cases building the structure should now need only two or three
compilations. The new code requires a current pdfmanagement-testphase and
is then used automatically if the new engines are detected.
-\subsection{}
+\subsection{Changes in version 0.99f}
+
+Deprecated |\tag_start:|, |\tag_stop:|, |\tag_stop:n| and
+|\tag_start:n| in favor of |\tag_suspend:n| and |\tag_resume:n|.
+
\printbibliography[heading=bibintoc]
diff --git a/tagpdf-mc-shared.dtx b/tagpdf-mc-shared.dtx
index 4ac73c0..a098004 100644
--- a/tagpdf-mc-shared.dtx
+++ b/tagpdf-mc-shared.dtx
@@ -365,12 +365,12 @@
\tag_mc_end_push:
\tag_mc_begin:n {artifact=#1}
\group_begin:
- \tag_stop:n{artifact-group}
+ \tag_suspend:n{artifact-group}
}
\cs_set_protected:Npn \tag_mc_artifact_group_end:
{
- \tag_start:n{artifact-group}
+ \tag_resume:n{artifact-group}
\group_end:
\tag_mc_end:
\tag_mc_begin_pop:n{}
diff --git a/tagpdf-user.dtx b/tagpdf-user.dtx
index d29c0de..9d27d0a 100644
--- a/tagpdf-user.dtx
+++ b/tagpdf-user.dtx
@@ -866,9 +866,9 @@
{\tagmcbegin{tag=Lbl}}
{#1}
}
- \tag_stop:n{hangfrom}
+ \tag_suspend:n{hangfrom}
\hangindent \wd\@tempboxa\noindent
- \tag_start:n{hangfrom}
+ \tag_resume:n{hangfrom}
\tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}
}
}
@@ -1246,11 +1246,11 @@
\bool_gset_false:N \g_@@_in_mc_bool
}
\tag_mc_begin:n {artifact}
- \tag_stop:n{headfoot}
+ \tag_suspend:n{headfoot}
}
\cs_new_protected:Npn \@@_exclude_headfoot_end:
{
- \tag_start:n{headfoot}
+ \tag_resume:n{headfoot}
\tag_mc_end:
\bool_if:NTF \g_@@_mode_lua_bool
{
@@ -1277,12 +1277,12 @@
}
\tag_struct_begin:n{tag=Artifact,attribute-class=@@/attr/#1}
\tag_mc_begin:n {artifact=#1}
- \tag_stop:n{headfoot}
+ \tag_suspend:n{headfoot}
}
\cs_new_protected:Npn \@@_exclude_struct_headfoot_end:
{
- \tag_start:n{headfoot}
+ \tag_resume:n{headfoot}
\tag_mc_end:
\tag_struct_end:
\bool_if:NTF \g_@@_mode_lua_bool
diff --git a/testfiles/test-start-stop-notag.lvt b/testfiles/test-start-stop-notag.lvt
index b5f8e1c..65b50e0 100644
--- a/testfiles/test-start-stop-notag.lvt
+++ b/testfiles/test-start-stop-notag.lvt
@@ -21,7 +21,7 @@
\TEST{tag-stop}
{
- \tag_stop:
+ \tag_suspend:n{A}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
\tag_start:
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
@@ -30,29 +30,29 @@
\TEST{tag-stop-label1}
{
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_stop:n{L1}
+ \tag_suspend:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{L1}
+ \tag_resume:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
}
\TEST{tag-stop-label2}
{
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_stop:n{L1}
+ \tag_suspend:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{LXX}
+ \tag_resume:n{LXX}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
}
-\tag_stop:
+\tag_suspend:n{A}
\TEST{tag-stop-label2}
{
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_stop:n{L1}
+ \tag_suspend:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{L1}
+ \tag_resume:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
}
\ExplSyntaxOff
diff --git a/testfiles/test-start-stop.lvt b/testfiles/test-start-stop.lvt
index 4af29c6..7ef54f3 100644
--- a/testfiles/test-start-stop.lvt
+++ b/testfiles/test-start-stop.lvt
@@ -21,40 +21,40 @@
\TEST{tag-stop}
{
- \tag_stop:
+ \tag_suspend:n{A}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:
+ \tag_resume:n{A}
\ASSERTSTR{\tag_status:}{ACTIVE}
}
\TEST{tag-stop-label1}
{
\ASSERTSTR{\tag_status:}{ACTIVE}
- \tag_stop:n{L1}
+ \tag_suspend:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{L1}
+ \tag_resume:n{L1}
\ASSERTSTR{\tag_status:}{ACTIVE}
}
\TEST{tag-stop-label1}
{
\ASSERTSTR{\tag_status:}{ACTIVE}
- \tag_stop:n{L1}
+ \tag_suspend:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{L1}
+ \tag_resume:n{L1}
\ASSERTSTR{\tag_status:}{ACTIVE}
}
\TEST{tag-stop-label-nested}
{
\ASSERTSTR{\tag_status:}{ACTIVE}
- \tag_stop:n{L1}
+ \tag_suspend:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_stop:n{L2}
+ \tag_suspend:n{L2}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{L2}
+ \tag_resume:n{L2}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{L1}
+ \tag_resume:n{L1}
\ASSERTSTR{\tag_status:}{ACTIVE}
}
@@ -64,9 +64,9 @@
\TEST{tag-stop-label2}
{
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_stop:n{L1}
+ \tag_suspend:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
- \tag_start:n{L1}
+ \tag_resume:n{L1}
\ASSERTSTR{\tag_status:}{NOT~ACTIVE}
}
\ExplSyntaxOff
More information about the latex3-commits
mailing list.