summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-19 22:45:20 +0000
committerKarl Berry <karl@freefriends.org>2024-01-19 22:45:20 +0000
commit56430237cac93a24f0a22e43ddb409615e2611e9 (patch)
tree2b0659e102c9d76bb1b8baf9a421b02b3fff0923 /Master/texmf-dist/source/latex
parent658373a9bbeff724374065a08da0268c19805a95 (diff)
tagpdf (19jan24)
git-svn-id: svn://tug.org/texlive/trunk@69496 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx17
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx26
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx21
-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.dtx6
-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.dtx70
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx117
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.ins4
13 files changed, 200 insertions, 103 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
index a257c70058b..8a6554e31bc 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-backend.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-12-18} {0.98r}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-01-19} {0.98s}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98r", --TAGVERSION
- date = "2023-12-18", --TAGDATE
+ version = "0.98s", --TAGVERSION
+ date = "2024-01-19", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -754,6 +754,7 @@ local function @@_mark_spaces (head)
local id = n.id
if id == GLYPH then
local glyph = n
+ default_currfontid = glyph.font
if glyph.next and (glyph.next.id == GLUE)
and not inside_math and (glyph.next.width >0)
then
@@ -790,8 +791,9 @@ local function @@_mark_spaces (head)
if glyph.next and (glyph.next.id == GLUE)
and not inside_math and (glyph.next.width >0) and n.subtype==0
then
- nodesetattribute(glyph.next,iwspaceattributeid,1)
- -- nodesetattribute(glyph.next,iwfontattributeid,glyph.font)
+ nodesetattribute(glyph.next,iwspaceattributeid,1)
+ -- changed 2024-01-18, issue #72
+ nodesetattribute(glyph.next,iwfontattributeid,default_currfontid)
-- for debugging
if ltx.@@.trace.showspaces then
@@_show_spacemark (head,glyph)
@@ -838,6 +840,7 @@ ltx.@@.func.markspaceoff=@@_deactivate_mark_space
% \begin{macrocode}
local default_space_char = nodenew(GLYPH)
local default_fontid = fontid("TU/lmr/m/n/10")
+local default_currfontid = fontid("TU/lmr/m/n/10")
default_space_char.char = 32
default_space_char.font = default_fontid
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
index 80d865405d5..7053050c3f2 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-checks.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -284,16 +284,30 @@
% mc-current}
% Various messages related to mc-chunks. TODO document their meaning.
% \end{function}
-% \begin{function}{struct-no-objnum,struct-faulty-nesting,
+% \begin{function}{struct-unknown,struct-no-objnum,struct-orphan,struct-faulty-nesting,
% struct-missing-tag,struct-used-twice,struct-label-unknown,struct-show-closing}
-% Various messages related to structure. TODO document their meaning.
+% Various messages related to structure. Check the definition in the code for their
+% meaning and the arguments they take.
% \end{function}
%
+% \begin{function}{tree-struct-still-open}
+% Message issued at the end of the compilation
+% if there are (beside Root) other open structures on the stack.
+% \end{function}
+%
+
+% \begin{function}{show-struct,show-kids}
+% These two messages are used in debug mode
+% to show the current structures in the log and terminal.
+% \end{function}
+%
+
% \begin{function}{attr-unknown}
% Message if an attribute i sunknown.
% \end{function}
%
-% \begin{function}{role-missing,role-unknown,role-unknown-tag,role-tag,new-tag}
+% \begin{function}{role-missing,role-unknown,role-unknown-tag,role-tag,new-tag,
+% role-parent-child,role-remapping}
% Messages related to role mapping.
% \end{function}
%
@@ -313,7 +327,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-checks-code} {2024-01-19} {0.98s}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
index 350b5d645ff..dd084f03eb1 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-data.dtx
%
-% Copyright (C) 2022-2023 Ulrike Fischer
+% Copyright (C) 2022-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \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-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-01-19} {0.98s}
%% {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-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-01-19} {0.98s}
%% {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-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2024-01-19} {0.98s}
%% {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-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-01-19} {0.98s}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -190,8 +190,9 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-01-19} {0.98s}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
+StructTreeRoot,StructTreeRoot,pdf2,D,
Document,Document,pdf2,D,
Part,Part,pdf2,G,
Sect,Sect,pdf2,G,
@@ -246,7 +247,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-01-19} {0.98s}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -481,7 +482,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-01-19} {0.98s}
,,,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 +537,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-12-18} {0.98r}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-01-19} {0.98s}
,,,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 510cd0efe5c..c27e33d6e7f 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-mc-generic.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-01-19} {0.98s}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-01-19} {0.98s}
{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 c387249c4c2..c10aca5b935 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-mc-luacode.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \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-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-01-19} {0.98s}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-01-19} {0.98s}
{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 7732ee2eea8..f08a0a8f4c6 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-mc-shared.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -181,7 +181,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-01-19} {0.98s}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
index 38d6840b8db..c700553f339 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-roles.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-roles-code} {2024-01-19} {0.98s}
{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 8421ceba695..4119753bfda 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-space.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-space-code} {2024-01-19} {0.98s}
{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 4808cccece5..73224158a7c 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-struct.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -63,9 +63,10 @@
% it will check if the \Arg{tag} (after expansion)
% is identical to the current structure on the stack. The tag is not role mapped!
% \end{function}
-% \begin{function}{\tag_struct_use:n}
+% \begin{function}{\tag_struct_use:n,\tag_struct_use_num:n}
% \begin{syntax}
-% \cs{tag_struct_use:n}\Arg{label}
+% \cs{tag_struct_use:n}\Arg{label}\\
+% \cs{tag_struct_use_num:n}\Arg{structure number}
% \end{syntax}
% These commands insert a structure previously stashed away as kid
% into the currently active structure.
@@ -105,6 +106,21 @@
% This gives back the next free /StructParent number (assuming that it is
% together with \cs{tag_struct_insert_annot:nn} which will increase the number.
% \end{function}
+%
+% \begin{function}{\tag_struct_gput:nnn}
+% \begin{syntax}
+% \cs{tag_struct_gput:nnn}\Arg{structure number}\Arg{keyword}\Arg{value}
+% \end{syntax}
+% This is a command that allows to update the data of a structure.
+% This often can't done simply by replacing the value, as we have to
+% preserve and extend existing content. We use therefore dedicated functions
+% adjusted to the key in question.
+% The first argument is the number of the structure,
+% the second a keyword referring to a function,
+% the third the value. Currently the only keyword is \texttt{ref} which updates
+% the Ref key (an array)
+% \end{function}
+%
% \section{Public keys}
% \subsection{Keys for the structure commands}
% \begin{function}{tag (struct-key)}
@@ -269,7 +285,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-struct-code} {2024-01-19} {0.98s}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -296,6 +312,12 @@
\@@_seq_new:N \g_@@_struct_objR_seq
% \end{macrocode}
% \end{variable}
+% \begin{variable}{\c_@@_struct_null_tl}
+% In lua mode we have to test if the kids a null
+% \begin{macrocode}
+\tl_const:Nn\c_@@_struct_null_tl {null}
+% \end{macrocode}
+% \end{variable}
% \begin{variable}{\g_@@_struct_cont_mc_prop}
% in generic mode it can happen after
@@ -817,20 +839,40 @@
{
% in this case we need a special command in
% luamode to get the array right. See issue #13
- \bool_if:NT\g_@@_mode_lua_bool
+ \bool_if:NTF\g_@@_mode_lua_bool
{
\@@_struct_exchange_kid_command:c
{g_@@_struct_kids_#1_seq}
+% \end{macrocode}
+% check if we get null
+% \begin{macrocode}
+ \tl_set:Ne\l_@@_tmpa_tl
+ {\use:e{\seq_item:cn {g__tag_struct_kids_#1_seq} {1}}}
+ \tl_if_eq:NNF\l__tag_tmpa_tl \c_@@_struct_null_tl
+ {
+ \@@_struct_prop_gput:nne
+ {#1}
+ {K}
+ {
+ \seq_item:cn
+ {
+ g_@@_struct_kids_#1_seq
+ }
+ {1}
+ }
+ }
}
- \@@_struct_prop_gput:nne
- {#1}
- {K}
{
- \seq_item:cn
+ \@@_struct_prop_gput:nne
+ {#1}
+ {K}
{
- g_@@_struct_kids_#1_seq
+ \seq_item:cn
+ {
+ g_@@_struct_kids_#1_seq
+ }
+ {1}
}
- {1}
}
} %
}
@@ -1007,7 +1049,7 @@
\pdf_object_ref:e { @@/struct/\l_@@_struct_stack_parent_tmpa_tl }
}
% increase the int:
- \stepcounter{ g_@@_parenttree_obj_int }
+ \int_gincr:N \c@g_@@_parenttree_obj_int
}
}
% \end{macrocode}
@@ -1863,7 +1905,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-attr-code} {2024-01-19} {0.98s}
{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 df1f50fdd4d..fd0a8bfc2fd 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-tree.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-tree-code} {2024-01-19} {0.98s}
{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 5f1a72a3e89..682708d4f9c 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf-user.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98r, released 2023-12-18}
+% \date{Version 0.98s, released 2024-01-19}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -120,7 +120,7 @@
% \cs{ShowTagging} \Arg{key-val}
% \end{syntax}
% This is a generic function to output various debugging helps. It not
-% necessarly stops the compilation. The keys and their function are described below.
+% necessarily stops the compilation. The keys and their function are described below.
% \end{function}
%
% \begin{function}{mc-data (show-key)}
@@ -158,6 +158,15 @@
% If no value is used, then the default is |show|.
% \end{function}
%
+% \begin{function}{debug/structures (show-key)}
+% \begin{syntax}
+% |debug/structures| = \meta{structure number}
+% \end{syntax}
+% This key is available only if the tagpdf-debug package is loaded
+% and shows all structures starting with the one with the number
+% given by the key.
+% \end{function}
+
% \section{Extension commands}
% The following commands and code parts are not core commands of tagpdf.
% They either provide work-arounds for missing functionality elsewhere,
@@ -243,6 +252,50 @@
% { Contents }
% { (ref) }
% \end{verbatim}
+%
+% \section{Socket support}
+%
+% \begin{function}{\tag_socket_use:n,\tag_socket_use:nn,\UseTaggingSocket}
+% \begin{syntax}
+% \cs{tag_socket_use:n} \Arg{socket name}\\
+% \cs{tag_socket_use:nn} \Arg{socket name} \Arg{socket argument}\\
+% \cs{UseTaggingSocket} \Arg{socket name} \\
+% \cs{UseTaggingSocket} \Arg{socket name} \Arg{socket argument}\\
+% \end{syntax}
+% \end{function}
+
+% 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.
% \end{documentation}
%
% \begin{implementation}
@@ -250,7 +303,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-user} {2024-01-19} {0.98s}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -347,39 +400,6 @@
% \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}
@@ -718,7 +738,10 @@
% \g_@@_para_main_end_int,
% \l_@@_para_tag_default_tl,
% \l_@@_para_tag_tl,
-% \l_@@_para_main_tag_tl}
+% \l_@@_para_main_tag_tl,
+% \l_@@_para_attr_class_tl,
+% \l_@@_para_main_attr_class_tl,
+% }
% At first some variables.
% \begin{macrocode}
%</package>
@@ -736,6 +759,12 @@
\tl_new:N \l_@@_para_main_tag_tl
\tl_set:Nn \l_@@_para_main_tag_tl {text-unit}
% \end{macrocode}
+% this is perhaps already defined by the block code
+% \begin{macrocode}
+\tl_if_exist:NF \l_@@_para_attr_class_tl
+ {\tl_new:N \l_@@_para_attr_class_tl }
+\tl_new:N \l_@@_para_main_attr_class_tl
+% \end{macrocode}
% \end{macro}
% \begin{macro}
@@ -827,6 +856,10 @@
% \begin{macrocode}
\AddToHook{package/latex-lab-testphase-block/after}
{
+ \tl_if_exist:NT \l_tag_para_attr_class_tl
+ {
+ \tl_set:Nn \l_@@_para_attr_class_tl { \l_tag_para_attr_class_tl }
+ }
\cs_set_protected:Npn \__block_start_para_structure:n #1 {
\__block_debug_typeout:n
{ @endpe = \legacy_if:nTF { @endpe }{true}{false}
@@ -836,7 +869,11 @@
\bool_if:NF \l__tag_para_flattened_bool
{
\@@_gincr_para_main_begin_int:
- \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl}
+ \tag_struct_begin:n
+ {
+ tag=\l_@@_para_main_tag_tl,
+ attribute-class=\l_@@_para_main_attr_class_tl,
+ }
}
}
\@@_gincr_para_begin_int:
@@ -844,7 +881,7 @@
\tag_struct_begin:n
{
tag=\l__tag_para_tag_tl
- ,attribute-class=\l_tag_para_attr_class_tl
+ ,attribute-class=\l_@@_para_attr_class_tl
}
\__tag_check_para_begin_show:nn {green}{#1}
\tag_mc_begin:n {}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
index 37de4d99272..4eb87d0faf0 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
@@ -2,7 +2,7 @@
%
%% File: tagpdf.dtx
%
-% Copyright (C) 2019-2023 Ulrike Fischer
+% Copyright (C) 2019-2024 Ulrike Fischer
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -84,7 +84,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf} {2024-01-19} {0.98s}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -110,7 +110,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-debug} {2024-01-19} {0.98s}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -133,7 +133,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-12-18} {0.98r}
+\ProvidesExplPackage {tagpdf-base} {2024-01-19} {0.98s}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins b/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins
index f0b7ac2284b..bc48d45842d 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.ins
@@ -2,7 +2,7 @@
File: tagpdf.ins
-Copyright (C) 2019-2023 Ulrike Fischer
+Copyright (C) 2019-2024 Ulrike Fischer
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -34,7 +34,7 @@ for those people who are interested.
\let\MetaPrefix\relax
\preamble
-Copyright (C) 2019-2023 Ulrike Fischer
+Copyright (C) 2019-2024 Ulrike Fischer
It may be distributed and/or modified under the conditions of
the LaTeX Project Public License (LPPL), either version 1.3c of