summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpdf
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-02-16 03:01:36 +0000
committerNorbert Preining <norbert@preining.info>2023-02-16 03:01:36 +0000
commit024d47cb1c4e5ba541f3865b69168bef20f2bfce (patch)
tree4e55e91ce72e278a079000c9871135034111f910 /macros/latex/contrib/tagpdf
parenta7d99429152acee049db679dc26a92e01faf4992 (diff)
CTAN sync 202302160301
Diffstat (limited to 'macros/latex/contrib/tagpdf')
-rw-r--r--macros/latex/contrib/tagpdf/README.md4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx9
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1495476 -> 1514352 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx18
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-roles.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx144
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx82
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin854619 -> 858479 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex23
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty4
17 files changed, 213 insertions, 109 deletions
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index e6db86a9e4..fd324960da 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.98c
-Packagedate: 2023/01/30
+Packageversion: 0.98d
+Packagedate: 2023/02/15
Author: Ulrike Fischer
## License
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index 0a2c4f693f..012321bba5 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-01-30} {0.98c}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-02-15} {0.98d}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98c", --TAGVERSION
- date = "2023-01-30", --TAGDATE
+ version = "0.98d", --TAGVERSION
+ date = "2023-02-15", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -802,6 +802,7 @@ local function @@_space_chars_shipout (box)
end
end
end
+ box.head = head
end
end
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index a20017a77c..6219d00192 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -295,7 +295,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-02-15} {0.98d}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index c8c3c146cb..d3c692b9d0 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
index a62f6d3cdb..89b6d09d26 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \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-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-02-15} {0.98d}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -86,7 +86,7 @@ footnotelabel,Lbl, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-02-15} {0.98d}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -102,7 +102,7 @@ subparagraph, H6,pdf2,
% It is bound to change a lot!
% \begin{macrocode}
%<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-02-15} {0.98d}
%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
chapter, Span, pdf2,
section, Span, pdf2,
@@ -116,7 +116,7 @@ P, Span, pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-02-15} {0.98d}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -184,7 +184,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-02-15} {0.98d}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
Document,Document,pdf2,D,
Part,Part,pdf2,G,
@@ -240,7 +240,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-02-15} {0.98d}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,,,
and,,,
@@ -475,7 +475,7 @@ xor,,,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-02-15} {0.98d}
,,,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,∅,∅
@@ -530,7 +530,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-01-30} {0.98c}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-02-15} {0.98d}
,,,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/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index 1d04a19368..8061a5d18d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-02-15} {0.98d}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-02-15} {0.98d}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index 066d2e2243..1b03011ddf 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{implementation}
% The code is splitted into three parts: code shared by all engines,
@@ -86,7 +86,7 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-02-15} {0.98d}
{tagpdf - mc code only for the luamode }
%</luamode>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
index 88c5937f57..ba5516dc4c 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -174,7 +174,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-02-15} {0.98d}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
index 8948b89055..8557552f9a 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-02-15} {0.98d}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
@@ -913,7 +913,7 @@
{
\tl_set:Nx\l_@@_tmpa_tl { \use_ii:nn ##1 }
\exp_args:Nne
- \tl_if_in:nnF {-Part-Div-NonStruct-}{-\l_@@_tmpa_tl-}
+ \str_if_in:nnF {-Part-Div-NonStruct-}{-\l_@@_tmpa_tl-}
{
\tl_set:Nn\l_@@_role_real_parent_tl {##1}
\int_zero:N\l_@@_tmpa_int
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index 5e21bb0f6a..ffb891fdc5 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-space-code} {2023-02-15} {0.98d}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index 229989dad1..c488ad823d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -242,7 +242,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-02-15} {0.98d}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -1080,9 +1080,78 @@
% extension.
% AF is an array and can be used more than once, so we store it in a tl.
% which is expanded.
-% AFinline can be use only once (more quite probably doesn't make sense).
+% AFinline currently uses the fix extention txt.
+% texsource is a special variant which creates a tex-file, it expects a
+% tl-var as value (e.g. from math grabbing)
+%
+% \begin{variable}{\g_@@_struct_AFobj_int}
+% This variable is used to number the AF-object names
+% \begin{macrocode}
+\int_new:N\g_@@_struct_AFobj_int
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macrocode}
+\cs_if_free:NTF \pdffile_embed_stream:nnN
+ {
+ \cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2
+ % #1 content, #2 extension
+ {
+ \group_begin:
+ \int_gincr:N \g_@@_struct_AFobj_int
+ \pdf_object_if_exist:eF {@@/fileobj\int_use:N\g_@@_struct_AFobj_int}
+ {
+ \pdffile_embed_stream:nxx
+ {#1}
+ {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
+ {@@/fileobj\int_use:N\g_@@_struct_AFobj_int}
+ \@@_struct_add_AF:ee
+ { \int_eval:n {\c@g_@@_struct_abs_int} }
+ { \pdf_object_ref:e {@@/fileobj\int_use:N\g_@@_struct_AFobj_int} }
+ \@@_prop_gput:cnx
+ { g_@@_struct_\int_use:N\c@g_@@_struct_abs_int _prop }
+ { AF }
+ {
+ [
+ \tl_use:c
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
+ ]
+ }
+ }
+ \group_end:
+ }
+ }
+ {
+ \cs_generate_variant:Nn \pdffile_embed_stream:nnN {nxN}
+ \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:nxN
+ {#1}
+ {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
+ \l_@@_tmpa_tl
+ \@@_struct_add_AF:ee
+ { \int_eval:n {\c@g_@@_struct_abs_int} }
+ { \l_@@_tmpa_tl }
+ \@@_prop_gput:cnx
+ { g_@@_struct_\int_use:N\c@g_@@_struct_abs_int _prop }
+ { 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}
+% \end{macrocode}
+%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2 % #1 struct num #2 object name
+\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2 % #1 struct num #2 object reference
{
\tl_if_exist:cTF
{
@@ -1091,14 +1160,14 @@
{
\tl_gput_right:cx
{ g_@@_struct_#1_AF_tl }
- { ~ \pdf_object_ref:n {#2} }
+ { \c_space_tl #2 }
}
{
\tl_new:c
{ g_@@_struct_#1_AF_tl }
\tl_gset:cx
{ g_@@_struct_#1_AF_tl }
- { \pdf_object_ref:n {#2} }
+ { #2 }
}
}
\cs_generate_variant:Nn \@@_struct_add_AF:nn {en,ee}
@@ -1108,7 +1177,7 @@
{
\pdf_object_if_exist:nTF {#1}
{
- \@@_struct_add_AF:en { \int_eval:n {\c@g_@@_struct_abs_int} }{#1}
+ \@@_struct_add_AF:ee { \int_eval:n {\c@g_@@_struct_abs_int} }{\pdf_object_ref:n {#1}}
\@@_prop_gput:cnx
{ g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_prop }
{ AF }
@@ -1125,52 +1194,25 @@
},
,AFinline .code:n =
{
- \group_begin:
- \pdf_object_if_exist:eF {@@/fileobj\int_use:N\c@g_@@_struct_abs_int}
- {
- \pdffile_embed_stream:nxx
- {#1}
- {tag-AFfile\int_use:N\c@g_@@_struct_abs_int.txt}
- {@@/fileobj\int_use:N\c@g_@@_struct_abs_int}
- \@@_struct_add_AF:ee
- { \int_eval:n {\c@g_@@_struct_abs_int} }
- { @@/fileobj\int_use:N\c@g_@@_struct_abs_int }
- \@@_prop_gput:cnx
- { g_@@_struct_\int_use:N\c@g_@@_struct_abs_int _prop }
- { AF }
- {
- [
- \tl_use:c
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
- ]
- }
- }
- \group_end:
+ \@@_struct_add_inline_AF:nn {#1}{txt}
}
,AFinline-o .code:n =
{
- \group_begin:
- \pdf_object_if_exist:eF {@@/fileobj\int_use:N\c@g_@@_struct_abs_int}
- {
- \pdffile_embed_stream:oxx
- {#1}
- {tag-AFfile\int_use:N\c@g_@@_struct_abs_int.txt}
- {@@/fileobj\int_use:N\c@g_@@_struct_abs_int}
- \@@_struct_add_AF:ee
- { \int_eval:n {\c@g_@@_struct_abs_int} }
- { @@/fileobj\int_use:N\c@g_@@_struct_abs_int }
- \@@_prop_gput:cnx
- { g_@@_struct_\int_use:N\c@g_@@_struct_abs_int _prop }
- { AF }
- {
- [
- \tl_use:c
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
- ]
- }
- }
- \group_end:
+ \@@_struct_add_inline_AF:on {#1}{txt}
}
+ ,texsource .code:n =
+ {
+ \group_begin:
+ \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Source }
+% \end{macrocode}
+% we set the mime type as pdfresources uses currently text/plain
+% \begin{macrocode}
+ \pdfdict_put:nnx
+ { l_pdffile }{Subtype}
+ { \pdf_name_from_unicode_e:n{application/x-tex} }
+ \@@_struct_add_inline_AF:on {#1}{tex}
+ \group_end:
+ }
}
% \end{macrocode}
% \end{macro}
@@ -1184,7 +1226,7 @@
{
\pdf_object_if_exist:nTF {#1}
{
- \@@_struct_add_AF:en { 0 }{#1}
+ \@@_struct_add_AF:ee { 0 }{\pdf_object_ref:n {#1}}
\@@_prop_gput:cnx
{ g_@@_struct_0_prop }
{ AF }
@@ -1510,7 +1552,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-02-15} {0.98d}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index 507681afa6..c757e9e54d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-02-15} {0.98d}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index 980641b6b7..01de768a15 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.98c, released 2023-01-30}
+% \date{Version 0.98d, released 2023-02-15}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -64,10 +64,14 @@
% add a document structure.
% \end{function}
%
-%
-% \begin{function}{\tagpdfifluatexTF,\tagpdfifluatexT,\tagpdfifpdftexT}
-% small wrappers around engine tests. This functions should not be used and will be removed
-% in one of the next versions.
+% \begin{function}{\tag_tool:n,\tagtool}
+% \begin{syntax}
+% \cs{tag_tool:n}\Arg{key val}
+% \end{syntax}
+% The tagging of basic document elements will require a variaty of small commands
+% to configure and adapt the tagging. This command will collect them under a command
+% interface. The argument is \emph{one} key-value like string. This is work in progress
+% and both syntax, known arguments and implementation can change!
% \end{function}
%
% \section{Commands related to mc-chunks}
@@ -246,7 +250,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-user} {2023-02-15} {0.98d}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -263,6 +267,22 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\tag_tool:n,\tagtool}
+% This is a first definition of the tool command.
+% Currently it uses key-val, but this should be probably
+% be flattened to speed it up.
+% \begin{macrocode}
+%<base>\cs_new_protected:Npn\tag_tool:n #1 {}
+%<base>\cs_set_eq:NN\tagtool\tag_tool:n
+%<*package>
+\cs_set_protected:Npn\tag_tool:n #1
+ {
+ \tag_if_active:T { \keys_set:nn {tag / tool}{#1} }
+ }
+\cs_set_eq:NN\tagtool\tag_tool:n
+%</package>
+% \end{macrocode}
+% \end{macro}
% \section{Commands for the mc-chunks}
% \begin{macro}{\tagmcbegin,\tagmcend,\tagmcuse }
@@ -579,10 +599,13 @@
% {
% paratagging (setup-key),
% paratagging-show (setup-key),
+% paratag (setup-key),
+% paratag (tool-key),
% }
% 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.
+% 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|
% \begin{macrocode}
\keys_define:nn { @@ / setup }
{
@@ -590,22 +613,43 @@
paratagging-show .bool_set:N = \l_@@_para_show_bool,
paratag .tl_set:N = \l_@@_para_tag_tl
}
-
+\keys_define:nn { tag / tool}
+ {
+ paratag .tl_set:N = \l_@@_para_tag_tl
+ }
% \end{macrocode}
% \end{macro}
% This fills the para hooks with the needed code.
% \begin{macrocode}
+\cs_new_protected:Npn \@@_check_para_begin_show:nn #1 #2
+ %#1 color, #2 prefix
+ {
+ \bool_if:NT \l_@@_para_show_bool
+ {
+ \tag_mc_begin:n{artifact}
+ \llap{\color_select:n{#1}\tiny#2\int_use:N\g_@@_para_begin_int\ }
+ \tag_mc_end:
+ }
+ }
+
+\cs_new_protected:Npn \@@_check_para_end_show:nn #1 #2
+ %#1 color, #2 prefix
+ {
+ \bool_if:NT \l_@@_para_show_bool
+ {
+ \tag_mc_begin:n{artifact}
+ \rlap{\color_select:n{#1}\tiny\ #2\int_use:N\g_@@_para_end_int}
+ \tag_mc_end:
+ }
+ }
+
\AddToHook{para/begin}
{
\bool_if:NT \l_@@_para_bool
{
\int_gincr:N \g_@@_para_begin_int
\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:
- }
+ \@@_check_para_begin_show:nn {green}{}
\tag_mc_begin:n {}
}
}
@@ -615,11 +659,7 @@
{
\int_gincr:N \g_@@_para_end_int
\tag_mc_end:
- \bool_if:NT \l_@@_para_show_bool
- { \tag_mc_begin:n{artifact}
- \rlap{\color_select:n{red}\tiny\ \int_use:N\g_@@_para_end_int}
- \tag_mc_end:
- }
+ \@@_check_para_end_show:nn {red}{}
\tag_struct_end:
}
}
@@ -671,13 +711,17 @@
% \tagpdfparaOff
% }
% This two command switch para mode on and off. |\tagpdfsetup| could be used
-% too but is longer.
+% too but is longer. An alternative is |\tag_tool:n{para=false}|
% \begin{macrocode}
%<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}
+\keys_define:nn { tag / tool}
+ {
+ para .bool_set:N = \l_@@_para_bool
+ }
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index 61222d151a..67a3e411d4 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -92,7 +92,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf} {2023-02-15} {0.98d}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -118,7 +118,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-debug} {2023-02-15} {0.98d}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -159,7 +159,7 @@
% \end{macrocode}
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdf-base} {2023-02-15} {0.98d}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index 3edd2185eb..8266cfc1b3 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex
index 299763001c..364fcce88f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -15,8 +15,8 @@
}
\makeatletter
-\def\UlrikeFischer@package@version{0.98c}
-\def\UlrikeFischer@package@date{2023-01-30}
+\def\UlrikeFischer@package@version{0.98d}
+\def\UlrikeFischer@package@date{2023-02-15}
\makeatother
\documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
@@ -655,6 +655,21 @@ That's a debug option, it helps in lua mode to see where space glyph will be ins
\end{description}
+\begin{docCommand}[nosep]{tagtool}{\marg{key-val}}\end{docCommand}
+\begin{docCommand}{tag_tool:n}{\marg{key-val}}\end{docCommand}
+
+The tagging of document elements require a variety of small commands. This command
+will unify them under a common interface. This is work-in-progress and syntax and implementation
+can change! While the argument looks like a key-val \emph{list} (and currently is actually one),
+this should not be relied on. Instead only
+one argument should be used as the implementation will change to improve the speed. Currently the following
+arguments are supported
+
+\begin{description}
+\item[\PrintKeyName{para}] Boolean. It will replace the \cs{tagpdfparaOn} and \cs{tagpdfparaOff} command.
+\item[\PrintKeyName{paratag}] String. It allows to change the tag used in the following automatically tagged paragraphs.
+\end{description}
+
\section{Tagging}
@@ -1643,6 +1658,10 @@ The key-val list understands the following keys:
\item[\PrintKeyName{AFinline-o}]
This is like verb+AFinline+, but it expands the value once.
+\item[\PrintKeyName{texsource}] This is like verb+AFinline-o+, but it
+ creates a tex-file, with mime type \texttt{application/x-tex} and the
+ AFRelationship \texttt{Source}.
+
\item[\PrintKeyName{lang}]
This key allows to set the language for a structure element. The value should be a bcp-identifier,
e.g. |de-De|.
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index dc1c94b911..df9d084a39 100644
--- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
+++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
@@ -1,10 +1,8 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2023-01-30} {0.98c}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-02-15} {0.98d}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
-% latex-lab experiments
-\providecommand\tagtool[1]{}
%vLogos
\ExplSyntaxOn