summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-12-18 20:58:08 +0000
committerKarl Berry <karl@freefriends.org>2023-12-18 20:58:08 +0000
commit32515191c8745216b5be5ae33f657f8e2bf90f0c (patch)
tree8a55ba33226f9cadb43fa461b7b9b6e1039e9cb3 /Master/texmf-dist/source
parentdff2779aa86f3417223c36113a99965790bb9512 (diff)
tagpdf (18dec23)
git-svn-id: svn://tug.org/texlive/trunk@69165 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx10
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx30
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx20
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx12
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx85
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx131
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx118
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.ins2
13 files changed, 281 insertions, 161 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
index d02333ad24f..a257c70058b 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-11-19} {0.98q}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-12-18} {0.98r}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98q", --TAGVERSION
- date = "2023-11-19", --TAGDATE
+ version = "0.98r", --TAGVERSION
+ date = "2023-12-18", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
index 9b4de607d48..80d865405d5 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -313,7 +313,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -1030,7 +1030,7 @@
% \begin{macrocode}
\msg_new:nnn { tag / debug } {struct-begin}
{
- Struct~\tag_get:n{struct_num}~begin~#1~with~options:~\tl_to_str:n{#2}~[\msg_line_context:]
+ Struct~\tag_get:n{struct_num}~begin~#1~with~options:~\tl_to_str:n{#2}~\\[\msg_line_context:]
}
\msg_new:nnn { tag / debug } {struct-end}
{
@@ -1088,7 +1088,27 @@
}
}
}
-
+% \end{macrocode}
+% This tracks tag stop and start.
+% The tag-stop message should go before the int is increased.
+% The tag-start message after the int is decreased.
+% \begin{macrocode}
+\msg_new:nnn { tag / debug } {tag-stop}
+ {
+ \int_if_zero:nTF
+ {#1}
+ {Tagging~stopped}
+ {Tagging~(not)~stopped~(already~inactive)}\\
+ level:~#1~==>~\int_eval:n{#1+1}\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
+ }
+\msg_new:nnn { tag / debug } {tag-start}
+ {
+ \int_if_zero:nTF
+ {#1}
+ {Tagging~restarted}
+ {Tagging~(not)~restarted}\\
+ level:~\int_eval:n{#1+1}~==>~#1\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
+ }
% \end{macrocode}
% \begin{macrocode}
%</debug>
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
index 6803d0c2801..350b5d645ff 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -60,7 +60,7 @@
% It lists the new tag, the rolemap and the namespace of the rolemap.
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-12-18} {0.98r}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -92,7 +92,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-12-18} {0.98r}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -108,7 +108,7 @@ subparagraph, H6,pdf2,
% loaded.
% \begin{macrocode}
%<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-12-18} {0.98r}
%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
chapter, Span, pdf2,
section, Span, pdf2,
@@ -122,7 +122,7 @@ P, Span, pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-12-18} {0.98r}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -190,7 +190,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-12-18} {0.98r}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
Document,Document,pdf2,D,
Part,Part,pdf2,G,
@@ -246,7 +246,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-12-18} {0.98r}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -481,7 +481,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-12-18} {0.98r}
,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
@@ -536,7 +536,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-12-18} {0.98r}
,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
index ff030a6c6e9..510cd0efe5c 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-12-18} {0.98r}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-12-18} {0.98r}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
index c3454bb45de..c387249c4c2 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{implementation}
% The code is splitted into three parts: code shared by all engines,
@@ -86,11 +86,11 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-12-18} {0.98r}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-debug-lua} {2023-12-18} {0.98r}
{part of tagpdf - debugging code related to marking chunks - lua mode}
%</debug>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
index 169b9f900c4..7732ee2eea8 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -181,7 +181,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-12-18} {0.98r}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
@@ -364,12 +364,14 @@
{
\tag_mc_end_push:
\tag_mc_begin:n {artifact=#1}
- \tag_stop_group_begin:
+ \group_begin:
+ \tag_stop:n{artifact-group}
}
\cs_set_protected:Npn \tag_mc_artifact_group_end:
{
- \tag_stop_group_end:
+ \tag_start:n{artifact-group}
+ \group_end:
\tag_mc_end:
\tag_mc_begin_pop:n{}
}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
index bd97e8d7d45..38d6840b8db 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
index f4bfab54181..8421ceba695 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-space-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
index 9f839f8bc07..4808cccece5 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -175,7 +175,7 @@
% (I couldn't think of a better name, so I sticked to E).
% \end{function}
% \begin{function}{AF (struct-key),AFref (struct-key),
-% AFinline (struct-key),AFinline-o (struct-key),texsource}
+% AFinline (struct-key),AFinline-o (struct-key),texsource,mathml}
% \begin{syntax}
% AF = \meta{object name}\\
% AFref = \meta{object reference}\\
@@ -194,7 +194,12 @@
% still a research task to find out what is really needed.
%
% |texsource| is a special variant of |AF-inline-o| which embeds the file
-% as |.tex| source with the |/AFrelationship| key set to |/Source|.
+% as |.tex| source with the |/AFrelationship| key set to |/Source|. It also sets the |/Desc| key
+% to a (currently) fix text.
+%
+% |mathml| is a special variant of |AF-inline-o| which embeds the file
+% as |.xml| file with the |/AFrelationship| key set to |/Supplement|.
+% It also sets the |/Desc| key to a (currently) fix text.
%
% The argument of |AF| is an object name referring an embedded file as declared for example with
% \cs{pdf_object_new:n} or with the l3pdffile module. |AF| expands its argument
@@ -264,7 +269,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -1225,25 +1230,28 @@
\cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2
% #1 content, #2 extension
{
- \group_begin:
- \int_gincr:N \g_@@_struct_AFobj_int
- \pdffile_embed_stream:neN
- {#1}
- {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
- \l_@@_tmpa_tl
- \@@_struct_add_AF:ee
- { \int_use:N \c@g_@@_struct_abs_int }
- { \l_@@_tmpa_tl }
- \@@_struct_prop_gput:nne
- { \int_use:N \c@g_@@_struct_abs_int }
- { AF }
- {
- [
- \tl_use:c
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
- ]
- }
- \group_end:
+ \tl_if_empty:nF{#1}
+ {
+ \group_begin:
+ \int_gincr:N \g_@@_struct_AFobj_int
+ \pdffile_embed_stream:neN
+ {#1}
+ {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
+ \l_@@_tmpa_tl
+ \@@_struct_add_AF:ee
+ { \int_use:N \c@g_@@_struct_abs_int }
+ { \l_@@_tmpa_tl }
+ \@@_struct_prop_gput:nne
+ { \int_use:N \c@g_@@_struct_abs_int }
+ { AF }
+ {
+ [
+ \tl_use:c
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
+ ]
+ }
+ \group_end:
+ }
}
\cs_generate_variant:Nn \@@_struct_add_inline_AF:nn {on}
@@ -1293,16 +1301,19 @@
},
AFref .code:n = % AF property
{
- \@@_struct_add_AF:ee { \int_use:N \c@g_@@_struct_abs_int }{#1}
- \@@_struct_prop_gput:nne
- { \int_use:N \c@g_@@_struct_abs_int }
- { AF }
- {
- [
- \tl_use:c
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
- ]
- }
+ \tl_if_empty:eF {#1}
+ {
+ \@@_struct_add_AF:ee { \int_use:N \c@g_@@_struct_abs_int }{#1}
+ \@@_struct_prop_gput:nne
+ { \int_use:N \c@g_@@_struct_abs_int }
+ { AF }
+ {
+ [
+ \tl_use:c
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
+ ]
+ }
+ }
},
,AFinline .code:n =
{
@@ -1315,6 +1326,7 @@
,texsource .code:n =
{
\group_begin:
+ \pdfdict_put:nnn { l_pdffile/Filespec } {Desc}{(TeX~source)}
\pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Source }
\@@_struct_add_inline_AF:on {#1}{tex}
\group_end:
@@ -1322,6 +1334,7 @@
,mathml .code:n =
{
\group_begin:
+ \pdfdict_put:nnn { l_pdffile/Filespec } {Desc}{(mathml~representation)}
\pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Supplement }
\@@_struct_add_inline_AF:on {#1}{xml}
\group_end:
@@ -1602,7 +1615,7 @@
\cs_set_protected:Npn \tag_struct_end:n #1
{
-%<debug>\@@_debug_struct_end_check:n{#1}
+%<debug> \@@_check_if_active_struct:T{\@@_debug_struct_end_check:n{#1}}
\tag_struct_end:
}
%</package|debug>
@@ -1850,7 +1863,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
index 37fc53b6447..df1f50fdd4d 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
index 704a2f769d3..5f1a72a3e89 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -159,7 +159,7 @@
% \end{function}
%
% \section{Extension commands}
-% The following commands and code parts are not core command of tagpdf.
+% The following commands and code parts are not core commands of tagpdf.
% They either provide work-arounds for missing functionality elsewhere,
% or do a first step to apply tagpdf commands to document commands.
%
@@ -250,7 +250,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-user} {2023-12-18} {0.98r}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -346,7 +346,91 @@
% \end{macrocode}
% \end{macro}
%
+% \section{Socket support}
+% The next \LaTeX{} will use special sockets for the tagging.
+%
+% These sockets will use names starting
+% with \texttt{tagsupport/}. Usually, these sockets have exactly two
+% plugs defined: \texttt{noop} (when no tagging is requested or
+% tagging is not wanted for some reason) and
+% a second plug that enables the tagging. There
+% may be more, e.g., tagging with special debugging, etc., but right
+% now it is usually just on or off.
+%
+% Given that we sometimes have to suspend tagging, it would be fairly
+% inefficient to put different plugs into these sockets whenever that
+% happens. We therefore offer \cs{UseTaggingSocket} which is like
+% \cs{UseSocket} except that the socket name is specified without
+% \texttt{tagsupport/}, i.e.,
+% \begin{quote}
+% \verb=\UseTaggingSocket{foo}= $\to$
+% \verb=\UseSocket{tagsupport/foo}=
+% \end{quote}
+% Beside being slightly shorter, the big advantage is that this way
+% we can change \cs{UseTaggingSocket} to do nothing by switching a boolean
+% instead of changing the plugs of the tagging support sockets back and forth.
+%
+% It is possible to use the tagging support sockets with
+% \cs{UseSocket} directly, but in this case the socket remains active
+% if e.g. \cs{SuspendTagging} is in force. There may be reasons for doing
+% that but in general we expect to always use \cs{UseTaggingSocket}.
+%
+% The L3 programming layer versions \cs{tag_socket_use:n} and
+% \cs{tag_socket_use:nn} are slightly more efficient than
+% \cs{UseTaggingSocket} because they do not have to determine how
+% many arguments the socket takes when disabling it.
+%
+% Until we can be sure that the kernel defines the commands we provide them before
+% redefining them:
+% \begin{macrocode}
+%<*base>
+\providecommand\tag_socket_use:n[1]{}
+\providecommand\tag_socket_use:nn[2]{}
+\providecommand\UseTaggingSocket[1]{}
+%</base>
+% \end{macrocode}
%
+% \begin{macro}{\tag_socket_use:n,\tag_socket_use:nn,\UseTaggingSocket}
+% \begin{macrocode}
+%<*package>
+\cs_set_protected:Npn \tag_socket_use:n #1
+ {
+ \bool_if:NT \l_@@_active_socket_bool
+ { \UseSocket {tagsupport/#1} }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_protected:Npn \tag_socket_use:nn #1#2
+ {
+ \bool_if:NT \l_@@_active_socket_bool
+ { \UseSocket {tagsupport/#1} {#2} }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_protected:Npn \UseTaggingSocket #1
+ {
+ \bool_if:NTF \l_@@_active_socket_bool
+ { \UseSocket{tagsupport/#1} }
+ {
+ \int_case:nnF
+ { \int_use:c { c__socket_tagsupport/#1_args_int } }
+ {
+ 0 \prg_do_nothing:
+ 1 \use_none:n
+ 2 \use_none:nn
+% \end{macrocode}
+% We do not expect tagging sockets with more than one or two
+% arguments, so for now we only provide those.
+% \begin{macrocode}
+ }
+ \ERRORusetaggingsocket
+ }
+ }
+%</package>
+% \end{macrocode}
+% \end{macro}
%
% \section{Debugging}
% \begin{macro}{\ShowTagging}
@@ -550,22 +634,17 @@
% \end{macro}
%
% \section{Commands to extend document commands}
-% The following commands and code parts are not core command of tagpdf.
+% The following commands and code parts are not core commands of tagpdf.
% They either provide work-arounds for missing functionality elsewhere,
% or do a first step to apply tagpdf commands to document commands.
% This part should be regularly revisited to check if the code should go to a
% better place or can be improved.
%
-% \subsection{new ref system}
-% Until l3ref is in the kernel, we provide a definition for \cs{newlabeldata} in
-% the aux-file to avoid errors if a document switches between tagging and non-tagging.
% \begin{macrocode}
-%<base>\AddToHook{begindocument}
-%<base> {\immediate\write\@mainaux{\string\providecommand\string\newlabeldata[2]{}}}
%<*package>
% \end{macrocode}
% \subsection{Document structure}
-% \begin{macro}{\g_@@_root_default_tl,activate (setup-key)}
+% \begin{macro}{\g_@@_root_default_tl,activate (setup-key),activate-socket (setup-key)}
% \begin{macrocode}
\tl_new:N\g_@@_root_default_tl
\tl_gset:Nn\g_@@_root_default_tl {Document}
@@ -574,11 +653,12 @@
\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf}{\tagstructend}
\keys_define:nn { @@ / setup}
- {
+ {
+ activate-socket .bool_set:N = \l_@@_active_socket_bool,
activate .code:n =
{
\keys_set:nn { @@ / setup }
- { activate-mc,activate-tree,activate-struct }
+ { activate-mc,activate-tree,activate-struct,activate-socket }
\tl_gset:Nn\g_@@_root_default_tl {#1}
},
activate .default:n = Document
@@ -586,24 +666,22 @@
% \end{macrocode}
% \end{macro}
+%
% \subsection{Structure destinations}
-% In TeXlive 2022 pdftex and luatex will offer support for structure destinations.
-% The pdfmanagement has already backend support. We activate them if the
-% prerequisites are there: structures should be activated,
-% the code in the pdfmanagement must be there.
+% Since TeXlive 2022 pdftex and luatex offer support for structure destinations
+% and the pdfmanagement has backend support for. We activate them if
+% structures are actually created.
% Structure destinations are actually PDF 2.0 only but they don't harm in
% older PDF and can improve html export.
% \begin{macrocode}
\AddToHook{begindocument/before}
{
- \bool_lazy_all:nT
- {
- { \g_@@_active_struct_dest_bool }
- { \g_@@_active_struct_bool }
- { \cs_if_exist_p:N \pdf_activate_structure_destination: }
- }
+ \bool_lazy_and:nnT
+ { \g_@@_active_struct_dest_bool }
+ { \g_@@_active_struct_bool }
{
- \tl_set:Nn \l_pdf_current_structure_destination_tl { _@@/struct/\g_@@_struct_stack_current_tl }
+ \tl_set:Nn \l_pdf_current_structure_destination_tl
+ { _@@/struct/\g_@@_struct_stack_current_tl }
\pdf_activate_structure_destination:
}
}
@@ -643,11 +721,10 @@
% \l_@@_para_main_tag_tl}
% At first some variables.
% \begin{macrocode}
-\bool_new:N \l_@@_para_bool
%</package>
%<base>\bool_new:N \l_@@_para_flattened_bool
+%<base>\bool_new:N \l_@@_para_bool
%<*package>
-\bool_new:N \l_@@_para_show_bool
\int_new:N \g_@@_para_begin_int
\int_new:N \g_@@_para_end_int
\int_new:N \g_@@_para_main_begin_int
@@ -721,7 +798,7 @@
% \end{macrocode}
% \end{macro}
%
-% TEMPORARLY FIX (2023-11-17). Until latex-lab is update we must adapt a sec command:
+% TEMPORARLY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command:
% \begin{macrocode}
\AddToHook{package/latex-lab-testphase-sec/after}
{
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
index 907f466a435..37de4d99272 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
@@ -18,27 +18,19 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
% \fi
% \begin{documentation}
-% \begin{function}{\ref_value:nnn}
-% This is a temporary definition which will be removed once properties have been
-% released. It allows to locally set a default value if the label or the attribute
-% doesn't exist.
-% \begin{syntax}
-% \cs{ref_value:nnn}\Arg{label}\Arg{attribute}\Arg{fallback default}
-% \end{syntax}
-% \end{function}
-%
-% \begin{function}{ \tag_stop_group_begin:, \tag_stop_group_end:,
+% \begin{function}{
% \tag_stop:, \tag_start:,
% \tagstop, \tagstart }
% We need commands to stop tagging in some places.
-% They simply switches the two local booleans. The grouping commands
-% can be used to group the effect.
+% They switches three local booleans and also stop the counting
+% of paragraphs. If they are nested an inner \cs{tag_start:} will not
+% restart tagging.
% \end{function}
%
% \begin{function}{\tag_stop:n, \tag_start:n }%
@@ -46,9 +38,8 @@
% \cs{tag_stop:n}\Arg{label}
% \cs{tag_start:n}\Arg{label}\\
% \end{syntax}
-% This commands are intended as a pair. The start command
-% will only restart tagging if the previous stop command
-% with the same label actually stopped tagging.
+% The commands with argument allow to give a label. This is only used
+% in debugging messages to allow to follow the nesting.
% \end{function}
%
% \begin{function}{activate-space (setup-key)}
@@ -93,7 +84,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf} {2023-12-18} {0.98r}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -119,7 +110,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-debug} {2023-12-18} {0.98r}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -142,7 +133,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-base} {2023-12-18} {0.98r}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -281,7 +272,7 @@
% }
% These booleans should help to control the global behaviour of tagpdf.
% Ideally it should more or less do nothing if all are false.
-% The space-boolean controles the interword space code,
+% The space-boolean controls the interword space code,
% the mc-boolean activates \cs{tag_mc_begin:n},
% the tree-boolean activates writing the finish code and the pdfmanagement related
% commands, the struct-boolean activates the storing of the structure data.
@@ -306,7 +297,8 @@
% \begin{variable}
% {
% \l_@@_active_mc_bool,
-% \l_@@_active_struct_bool
+% \l_@@_active_struct_bool,
+% \l_@@_active_socket_bool
% }
% These booleans should help to control the \emph{local} behaviour of tagpdf.
% In some cases it could e.g. be necessary to stop tagging completely.
@@ -317,6 +309,7 @@
\bool_set_true:N \l_@@_active_mc_bool
\bool_new:N \l_@@_active_struct_bool
\bool_set_true:N \l_@@_active_struct_bool
+\bool_new:N \l_@@_active_socket_bool
% \end{macrocode}
% \end{variable}
%
@@ -378,7 +371,7 @@
\cs_generate_variant:Nn \@@_property_record:nn {en,eV}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\@@_property_ref_lastpage:nn}
% A command to retrieve the lastpage label, this will be adapted when there
% is a proper, kernel lastpage label.
@@ -456,68 +449,83 @@
\cs_generate_variant:Nn \@@_seq_new:N { c }
\cs_generate_variant:Nn \@@_seq_show:N { c }
\cs_generate_variant:Nn \@@_prop_show:N { c }
+%</package>
% \end{macrocode}
% \end{macro}
%
% \section{General tagging commands}
%
-% \begin{macro}{\tag_stop_group_begin:,
-% \tag_stop_group_end:,
+% \begin{macro}{
% \tag_stop:,\tag_start:,
% \tag_stop:n,\tag_start:n}
% We need commands to stop tagging in some places.
-% This simply switches the two local booleans.
-% In some cases tagging should only restart, if
-% it actually was stopped before. For this it is possible
-% to label a stop.
+% They switch local booleans and also stop the counting of paragraphs.
+% The commands keep track of the nesting with a local
+% counter. Tagging only is only restarted at the outer level,
+% if the current level is 1.
+% The commands with argument allow to give a label. This is only used
+% in debugging messages to allow to follow the nesting.
+%
+% \begin{variable}{\l_@@_tag_stop_int}
+% When stop/start pairs are nested we do not want the inner
+% start command to restart tagging. To control this we use a
+% local int: The stop command will increase it. The starting
+% will decrease it and only restart tagging, if it is zero.
+% This will replace the label version.
+% \begin{macrocode}
+%<*package|debug>
+%<package>\int_new:N \l_@@_tag_stop_int
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macrocode}
-\cs_new_protected:Npn \tag_stop_group_begin:
- {
- \group_begin:
- \bool_set_false:N \l_@@_active_struct_bool
- \bool_set_false:N \l_@@_active_mc_bool
- \@@_stop_para_ints:
- }
-\cs_set_eq:NN \tag_stop_group_end: \group_end:
\cs_set_protected:Npn \tag_stop:
{
+%<debug> \msg_note:nnx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }
+ \int_incr:N \l_@@_tag_stop_int
\bool_set_false:N \l_@@_active_struct_bool
\bool_set_false:N \l_@@_active_mc_bool
+ \bool_set_false:N \l_@@_active_socket_bool
\@@_stop_para_ints:
}
\cs_set_protected:Npn \tag_start:
{
- \bool_set_true:N \l_@@_active_struct_bool
- \bool_set_true:N \l_@@_active_mc_bool
- \@@_start_para_ints:
+ \int_if_zero:nF { \l_@@_tag_stop_int } { \int_decr:N \l_@@_tag_stop_int }
+ \int_if_zero:nT { \l_@@_tag_stop_int }
+ {
+ \bool_set_true:N \l_@@_active_struct_bool
+ \bool_set_true:N \l_@@_active_mc_bool
+ \bool_set_true:N \l_@@_active_socket_bool
+ \@@_start_para_ints:
+ }
+%<debug> \msg_note:nnx {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }
}
\cs_set_eq:NN\tagstop\tag_stop:
\cs_set_eq:NN\tagstart\tag_start:
-\prop_new:N\g_@@_state_prop
+% \end{macrocode}
+% \begin{macrocode}
\cs_set_protected:Npn \tag_stop:n #1
{
- \tag_if_active:TF
- {
- \bool_set_false:N \l_@@_active_struct_bool
- \bool_set_false:N \l_@@_active_mc_bool
- \@@_stop_para_ints:
- \prop_gput:Nnn \g_@@_state_prop { #1 }{ 1 }
- }
- {
- \prop_gremove:Nn \g_@@_state_prop { #1 }
- }
+%<debug> \msg_note:nnxx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }{#1}
+ \int_incr:N \l_@@_tag_stop_int
+ \bool_set_false:N \l_@@_active_struct_bool
+ \bool_set_false:N \l_@@_active_mc_bool
+ \bool_set_false:N \l_@@_active_socket_bool
+ \@@_stop_para_ints:
}
\cs_set_protected:Npn \tag_start:n #1
{
- \prop_gpop:NnN \g_@@_state_prop {#1}\l_@@_tmpa_tl
- \quark_if_no_value:NF \l_@@_tmpa_tl
+ \int_if_zero:nF { \l_@@_tag_stop_int } { \int_decr:N \l_@@_tag_stop_int }
+ \int_if_zero:nT { \l_@@_tag_stop_int }
{
\bool_set_true:N \l_@@_active_struct_bool
\bool_set_true:N \l_@@_active_mc_bool
+ \bool_set_true:N \l_@@_active_socket_bool
\@@_start_para_ints:
- }
+ }
+%<debug> \msg_note:nnxx {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }{#1}
}
-%</package>
+%</package|debug>
%<*base>
\cs_new_protected:Npn \tag_stop:{}
\cs_new_protected:Npn \tag_start:{}
@@ -541,7 +549,7 @@
% activate-tree (setup-key),
% activate-struct (setup-key),
% activate-all (setup-key),
-% no-struct-dest (setup-key)
+% no-struct-dest (setup-key),
% }
% Keys to (globally) activate tagging.
% |activate-space| activates the additional parsing needed for
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins b/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins
index 64c3b40a23e..f0b7ac2284b 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins
@@ -20,7 +20,7 @@ The released version of this bundle is available from CTAN.
The development version of the bundle can be found at
- https://github.com/u-fischer/tagpdf
+ https://github.com/latex3/tagpdf
for those people who are interested.