summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-02-15 20:38:40 +0000
committerKarl Berry <karl@freefriends.org>2023-02-15 20:38:40 +0000
commit2a46633ee1bf1e1de007d6cf4abd85784ab976f3 (patch)
tree74e6736dd3da6f1746584186b92453367d27eeb8 /Master/texmf-dist/source
parent85ed762b2da317d0247535940e44d23c7cfa7bcb (diff)
tagpdf (15feb23)
git-svn-id: svn://tug.org/texlive/trunk@65845 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx9
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx18
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx144
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx82
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx6
12 files changed, 189 insertions, 102 deletions
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
index 0a2c4f693fe..012321bba50 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
index a20017a77c2..6219d00192e 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
index a62f6d3cdb3..89b6d09d261 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
index 1d04a193680..8061a5d18d0 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
index 066d2e22436..1b03011ddf2 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
index 88c5937f575..ba5516dc4c9 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
index 8948b890550..8557552f9a6 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
index 5e21bb0f6a5..ffb891fdc5b 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
index 229989dad1c..c488ad823d7 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
index 507681afa62..c757e9e54d4 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
index 980641b6b70..01de768a15c 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
+++ b/Master/texmf-dist/source/latex/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/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
index 61222d151ab..67a3e411d46 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
+++ b/Master/texmf-dist/source/latex/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}