summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-05-30 20:07:45 +0000
committerKarl Berry <karl@freefriends.org>2022-05-30 20:07:45 +0000
commitda9bc017d4130a58cac734e8cc9ef615cc1a2961 (patch)
tree89a7a42a9bd820e2867abd4e1bf2b3c7f9ff0cef
parentfff67648afed7073ee306f42c470d95b978d2de5 (diff)
tagpdf (30may22)
git-svn-id: svn://tug.org/texlive/trunk@63448 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/README.md4
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/global-ex.pngbin5 -> 8281 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/pac3.PNGbin5 -> 141163 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdfbin1206588 -> 1209028 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdfbin488517 -> 488903 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx11
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx10
-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.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx26
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx48
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx7
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx23
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty28
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua4
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty41
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty2
26 files changed, 150 insertions, 96 deletions
diff --git a/Master/texmf-dist/doc/latex/tagpdf/README.md b/Master/texmf-dist/doc/latex/tagpdf/README.md
index 5f0f5ceccf3..600220cc5c7 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/README.md
+++ b/Master/texmf-dist/doc/latex/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.94
-Packagedate: 2022/05/11
+Packageversion: 0.95
+Packagedate: 2022/05/29
Author: Ulrike Fischer
## License
diff --git a/Master/texmf-dist/doc/latex/tagpdf/global-ex.png b/Master/texmf-dist/doc/latex/tagpdf/global-ex.png
index f1ad7558e49..90bb73d157a 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/global-ex.png
+++ b/Master/texmf-dist/doc/latex/tagpdf/global-ex.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/pac3.PNG b/Master/texmf-dist/doc/latex/tagpdf/pac3.PNG
index f1ad7558e49..a3955577a9c 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/pac3.PNG
+++ b/Master/texmf-dist/doc/latex/tagpdf/pac3.PNG
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
index 6ecb01b35de..5b8d4180796 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
index d031e46f2d8..d679c209136 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
index 8b1cf9f9b08..70a771de2b7 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
@@ -4,8 +4,8 @@
\DocumentMetadata{pdfversion=2.0,lang=en-UK,testphase=phase-II}
\makeatletter
-\def\UlrikeFischer@package@version{0.94}
-\def\UlrikeFischer@package@date{2022-05-11}
+\def\UlrikeFischer@package@version{0.95}
+\def\UlrikeFischer@package@date{2022-05-29}
\makeatother
\documentclass[DIV=12,parskip=half-,bibliography=totoc]{scrartcl}
@@ -936,7 +936,7 @@ In \emph{lua mode} it tests if the mc-attribute is currently unset. You can't te
\begin{docCommand}{tag_get:n}{\marg{key word}}\end{docCommand}
-This command give back some variables. Currently the only working key words are \verb+mc\_tag+ and \verb+struct\_tag+.
+This command give back some variables. Currently the only working key words are \verb+mc\_tag+, \verb+struct\_tag+ and \verb+struct\_num+. The last returns a number works also if only \pkg{tagpdf-base} has been loaded.
\subsubsection{Luamode: global or not global -- that is the question}\label{sec:global-local}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
index 17fd4407921..8e119517802 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2022-05-11} {0.94}
+\ProvidesExplFile {tagpdf-luatex.def} {2022-05-29} {0.95}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -157,8 +157,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.94", --TAGVERSION
- date = "2022-05-11", --TAGDATE
+ version = "0.95", --TAGVERSION
+ date = "2022-05-29", --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 add77ce81f7..120de5eb0f2 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -294,7 +294,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-checks-code} {2022-05-29} {0.95}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -455,16 +455,17 @@
\msg_new:nnnn { tag } {para-hook-count-wrong}
{The~number~of~automatic~begin~(#1)~and~end~(#2)~para~hooks~differ!}
{This~quite~probably~a~coding~error~and~the~structure~will~be~wrong!}
+%</package>
% \end{macrocode}
% \end{macro}
% \section{Retrieving data}
% \begin{macro}[EXP]{\tag_get:n}
% This retrieves some data.
% This is a generic command to retrieve data. Currently
-% the only sensible values for the argument are |mc_tag| and |struct_tag|.
+% the only sensible values for the argument are |mc_tag|, |struct_tag|
+% and |struct-num|.
% \begin{macrocode}
-\cs_new:Npn \tag_get:n #1 { \use:c {@@_get_data_#1: } }
-%</package>
+%<base>\cs_new:Npn \tag_get:n #1 { \use:c {@@_get_data_#1: } }
% \end{macrocode}
% \end{macro}
%
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 e0713b61d63..003c2a2748c 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-29} {0.95}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-29} {0.95}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -664,8 +664,8 @@
% the state is passed to the end command through a global var and
% a global boolean.
% \begin{macrocode}
-%<base>\cs_new_protected:Npn \tag_mc_begin:n #1 {}
-%<base>\cs_new_protected:Nn \tag_mc_end:{}
+%<base>\cs_new_protected:Npn \tag_mc_begin:n #1 { \@@_whatsits: }
+%<base>\cs_new_protected:Nn \tag_mc_end:{ \@@_whatsits: }
%<*generic|debug>
%<*generic>
\cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
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 af6dbd1b395..6d5e568e96b 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \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} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-05-29} {0.95}
{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 bbf8b3f7205..3ac4696ad02 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -174,7 +174,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-05-29} {0.95}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
@@ -308,7 +308,7 @@
%
% TODO: is testing for struct the right test?
% \begin{macrocode}
-%<base>\cs_new_protected:Npn \tag_mc_use:n #1 {}
+%<base>\cs_new_protected:Npn \tag_mc_use:n #1 { \@@_whatsits: }
%<*shared>
\cs_set_protected:Npn \tag_mc_use:n #1 %#1: label name
{
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
index 5fa36ce06e7..40122ccfb89 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -87,7 +87,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-roles-code} {2022-05-29} {0.95}
{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 21a41f959fa..7b6a75d8ead 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-space-code} {2022-05-29} {0.95}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
@@ -76,6 +76,15 @@
% \begin{macro}{interwordspace (setup-key),show-spaces (setup-key)}
% \begin{macrocode}
%<*package>
+\keys_define:nn { @@ / setup }
+ {
+ interwordspace .choices:nn = { true, on }
+ { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str} },
+ interwordspace .choices:nn = { false, off }
+ { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str} },
+ interwordspace .default:n = true,
+ show-spaces .bool_set:N = \l_@@_showspaces_bool
+ }
\sys_if_engine_pdftex:T
{
\sys_if_output_pdf:TF
@@ -126,19 +135,6 @@
show-spaces .default:n = true
}
}
-
-\sys_if_engine_xetex:T
- {
- \keys_define:nn { @@ / setup }
- {
- interwordspace .choices:nn = { true, on }
- { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex} },
- interwordspace .choices:nn = { false, off }
- { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex} },
- interwordspace .default:n = true,
- show-spaces .bool_set:N = \l_@@_showspaces_bool
- }
- }
% \end{macrocode}
% \end{macro}
%
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
index 621ef672b88..103e337e9d5 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -217,7 +217,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-struct-code} {2022-05-29} {0.95}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -228,9 +228,8 @@
% to have a chance to avoid double structures in align etc.
%
% \begin{macrocode}
-%<*package>
-\newcounter { g_@@_struct_abs_int }
-\int_gzero:N \c@g_@@_struct_abs_int
+%<base>\newcounter { g_@@_struct_abs_int }
+%<base>\int_gzero:N \c@g_@@_struct_abs_int
% \end{macrocode}
% \end{variable}
%
@@ -241,6 +240,7 @@
% consecutively and so the index of the seq can be used.
% A seq allows easy mapping over the structures.
% \begin{macrocode}
+%<*package>
\@@_seq_new:N \g_@@_struct_objR_seq
% \end{macrocode}
% \end{variable}
@@ -503,18 +503,21 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}
-% {\@@_struct_kid_OBJR_gput_right:nn,\@@_struct_kid_OBJR_gput_right:xx}
+% {\@@_struct_kid_OBJR_gput_right:nnn,\@@_struct_kid_OBJR_gput_right:xxx}
% At last the command to add an OBJR object. This has to write an object first.
% The first argument is the number of the parent structure, the second the
-% (expanded) object reference of the annotation.
+% (expanded) object reference of the annotation. The last argument is the page
+% object reference
+%
% \begin{macrocode}
-\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nn #1 #2 %#1 num of parent struct,
+\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct,
%#2 obj reference
+ %#3 page object reference
{
\pdf_object_unnamed_write:nn
{ dict }
{
- /Type/OBJR/Obj~#2
+ /Type/OBJR/Obj~#2/Pg~#3
}
\@@_seq_gput_right:cx
{ g_@@_struct_kids_#1_seq }
@@ -523,7 +526,7 @@
}
}
-\cs_generate_variant:Nn\@@_struct_kid_OBJR_gput_right:nn { xx }
+\cs_generate_variant:Nn\@@_struct_kid_OBJR_gput_right:nnn { xxx }
% \end{macrocode}
% \end{macro}
@@ -705,13 +708,17 @@
}
%put the obj number of the annot in the kid entry, this also creates
%the OBJR object
- \@@_struct_kid_OBJR_gput_right:xx
+ \ref_label:nn {__tag_objr_page_#2 }{ tagabspage }
+ \@@_struct_kid_OBJR_gput_right:xxx
{
\l_@@_struct_stack_parent_tmpa_tl
}
{
#1 %
}
+ {
+ \pdf_pageobject_ref:n { \@@_ref_value:nnn {__tag_objr_page_#2 }{ tagabspage }{1} }
+ }
% add the parent obj number to the parent tree:
\exp_args:Nnx
\@@_parenttree_add_objr:nn
@@ -740,6 +747,20 @@
\prop_item:cn {g_@@_struct_\g__tag_struct_stack_current_tl _prop}{S}
}
}
+%</package>
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_get_data_struct_num:}
+% this command allows \cs{tag_get:n} to get the current
+% structure number with the keyword |struct_num|. We will need to handle nesting
+% \begin{macrocode}
+%<*base>
+\cs_new:Npn \@@_get_data_struct_num:
+ {
+ \int_use:N\c@g_@@_struct_abs_int
+ }
+%</base>
% \end{macrocode}
% \end{macro}
%
@@ -761,6 +782,7 @@
% E (struct-key)
% }
% \begin{macrocode}
+%<*package>
\keys_define:nn { @@ / struct }
{
label .tl_set:N = \l_@@_struct_key_label_tl,
@@ -1000,7 +1022,7 @@
%
% \begin{macro}{\tag_struct_begin:n,\tag_struct_end:}
% \begin{macrocode}
-%<base>\cs_new_protected:Npn \tag_struct_begin:n #1 {}
+%<base>\cs_new_protected:Npn \tag_struct_begin:n #1 {\int_gincr:N \c@g_@@_struct_abs_int}
%<base>\cs_new_protected:Npn \tag_struct_end:{}
%<*package|debug>
%<package>\cs_set_protected:Npn \tag_struct_begin:n #1 %#1 key-val
@@ -1170,7 +1192,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-attr-code} {2022-05-29} {0.95}
{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 a63dce4687d..a8ea5b9b001 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-tree-code} {2022-05-29} {0.95}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
@@ -125,7 +125,7 @@
% \end{macro}
%
% \begin{macro}{\@@_tree_write_structelements:}
-% This writes out the other struct elems, the absolute number is in the counter
+% This writes out the other struct elems, the absolute number is in the counter.
% \begin{macrocode}
\cs_new_protected:Npn \@@_tree_write_structelements:
{
@@ -397,6 +397,7 @@
% TODO (when tabular are done or if someone requests it): IDTree
% \begin{macro}{ \@@_finish_structure: }
% \begin{macrocode}
+\hook_new:n {tagpdf/finish/before}
\cs_new_protected:Npn \@@_finish_structure:
{
\bool_if:NT\g_@@_active_tree_bool
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
index 5b7cf4bb408..30f5abc3b4d 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.94, released 2022-05-11}
+% \date{Version 0.95, released 2022-05-29}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -246,7 +246,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-user} {2022-05-29} {0.95}
{tagpdf - user commands}
%</header>
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
index 95154859ee5..32b41001635 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
@@ -81,7 +81,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf} {2022-05-29} {0.95}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -107,7 +107,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug} {2022-05-29} {0.95}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
\end{macrocode}
@@ -148,10 +148,27 @@
% \end{macrocode}
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-base} {2022-05-29} {0.95}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
+% The no-op version should behave a near enough to the real code as
+% possible, so we define a command which a special in the relevant backends:
+% \begin{macrocode}
+%<*base>
+\AddToHook{begindocument}
+ {
+ \str_case:VnF \c_sys_backend_str
+ {
+ { luatex } { \cs_new_protected:Npn \@@_whatsits: {} }
+ { dvisvgm } { \cs_new_protected:Npn \@@_whatsits: {} }
+ }
+ {
+ \cs_new_protected:Npn \@@_whatsits: {\tex_special:D {} }
+ }
+ }
+%</base>
+% \end{macrocode}
% \section{Temporary code}
% This is code which will be removed when proper support exists in LaTeX
% \subsection{a LastPage label}
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
index 9c5c3aa6d2e..47c86e8af40 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
@@ -23,25 +23,43 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-base} {2022-05-29} {0.95}
{part of tagpdf - provide base, no-op versions of the user commands }
+\AddToHook{begindocument}
+ {
+ \str_case:VnF \c_sys_backend_str
+ {
+ { luatex } { \cs_new_protected:Npn \__tag_whatsits: {} }
+ { dvisvgm } { \cs_new_protected:Npn \__tag_whatsits: {} }
+ }
+ {
+ \cs_new_protected:Npn \__tag_whatsits: {\tex_special:D {} }
+ }
+ }
%% File: tagpdf-mc-generic.dtx
-\cs_new_protected:Npn \tag_mc_begin:n #1 {}
-\cs_new_protected:Nn \tag_mc_end:{}
+\cs_new_protected:Npn \tag_mc_begin:n #1 { \__tag_whatsits: }
+\cs_new_protected:Nn \tag_mc_end:{ \__tag_whatsits: }
%% File: tagpdf-mc-shared.dtx
-\cs_new_protected:Npn \tag_mc_use:n #1 {}
+\cs_new_protected:Npn \tag_mc_use:n #1 { \__tag_whatsits: }
\cs_new_protected:Npn \tag_mc_artifact_group_begin:n #1 {}
\cs_new_protected:Npn \tag_mc_artifact_group_end:{}
\cs_new_protected:Npn \tag_mc_end_push: {}
\cs_new_protected:Npn \tag_mc_begin_pop:n #1 {}
%% File: tagpdf-struct.dtx
-\cs_new_protected:Npn \tag_struct_begin:n #1 {}
+\newcounter { g__tag_struct_abs_int }
+\int_gzero:N \c@g__tag_struct_abs_int
+\cs_new:Npn \__tag_get_data_struct_num:
+ {
+ \int_use:N\c@g__tag_struct_abs_int
+ }
+\cs_new_protected:Npn \tag_struct_begin:n #1 {\int_gincr:N \c@g__tag_struct_abs_int}
\cs_new_protected:Npn \tag_struct_end:{}
\cs_new_protected:Npn \tag_struct_use:n #1 {}
%% File: tagpdf-checks.dtx
+\cs_new:Npn \tag_get:n #1 { \use:c {__tag_get_data_#1: } }
\prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F }
{ \prg_return_false: }
%%
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
index 5d96af0615c..83ddd4026e9 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug-generic} {2022-05-29} {0.95}
{part of tagpdf - debugging code related to marking chunks - generic mode}
\cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
{
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
index b277f6dcb37..d45ca7df58d 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
@@ -26,7 +26,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-debug} {2022-05-29} {0.95}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
\end{macrocode}
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
index 333948f2327..74400ea9da6 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2022-05-11} {0.94}
+\ProvidesExplFile {tagpdf-luatex.def} {2022-05-29} {0.95}
{tagpdf~driver~for~luatex}
{
\fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
index b140f5c4c1d..1cf381628a1 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-05-29} {0.95}
{part of tagpdf - code related to marking chunks - generic mode}
\__tag_prop_new:N \g__tag_MCID_byabspage_prop
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
index 6e773562533..ae5f3c12d27 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2022-05-29} {0.95}
{tagpdf - mc code only for the luamode }
\hook_gput_code:nnn{begindocument}{tagpdf/mc}
{
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
index 5cbf03a8b13..c46b157b214 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
@@ -24,8 +24,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.94", --TAGVERSION
- date = "2022-05-11", --TAGDATE
+ version = "0.95", --TAGVERSION
+ date = "2022-05-29", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
index 91dcf65368e..c336ce49631 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
@@ -27,7 +27,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdf} {2022-05-29} {0.95}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -268,7 +268,6 @@
\msg_new:nnnn { tag } {para-hook-count-wrong}
{The~number~of~automatic~begin~(#1)~and~end~(#2)~para~hooks~differ!}
{This~quite~probably~a~coding~error~and~the~structure~will~be~wrong!}
-\cs_new:Npn \tag_get:n #1 { \use:c {__tag_get_data_#1: } }
\prg_set_conditional:Npnn \tag_if_active: { p , T , TF, F }
{
\bool_lazy_all:nTF
@@ -842,6 +841,7 @@
\prop_map_tokens:Nn \g__tag_role_NS_prop{\use_ii:nn}
}
}
+\hook_new:n {tagpdf/finish/before}
\cs_new_protected:Npn \__tag_finish_structure:
{
\bool_if:NT\g__tag_active_tree_bool
@@ -1365,8 +1365,6 @@
}
}
%% File: tagpdf-struct.dtx
-\newcounter { g__tag_struct_abs_int }
-\int_gzero:N \c@g__tag_struct_abs_int
\__tag_seq_new:N \g__tag_struct_objR_seq
\__tag_prop_new:N \g__tag_struct_cont_mc_prop
@@ -1485,13 +1483,14 @@
}
\cs_generate_variant:Nn \__tag_struct_kid_struct_gput_right:nn {xx}
-\cs_new_protected:Npn\__tag_struct_kid_OBJR_gput_right:nn #1 #2 %#1 num of parent struct,
+\cs_new_protected:Npn\__tag_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct,
%#2 obj reference
+ %#3 page object reference
{
\pdf_object_unnamed_write:nn
{ dict }
{
- /Type/OBJR/Obj~#2
+ /Type/OBJR/Obj~#2/Pg~#3
}
\__tag_seq_gput_right:cx
{ g__tag_struct_kids_#1_seq }
@@ -1500,7 +1499,7 @@
}
}
-\cs_generate_variant:Nn\__tag_struct_kid_OBJR_gput_right:nn { xx }
+\cs_generate_variant:Nn\__tag_struct_kid_OBJR_gput_right:nnn { xxx }
\cs_new_protected:Npn\__tag_struct_exchange_kid_command:N #1 %#1 = seq var
{
@@ -1625,13 +1624,17 @@
}
%put the obj number of the annot in the kid entry, this also creates
%the OBJR object
- \__tag_struct_kid_OBJR_gput_right:xx
+ \ref_label:nn {__tag_objr_page_#2 }{ tagabspage }
+ \__tag_struct_kid_OBJR_gput_right:xxx
{
\l__tag_struct_stack_parent_tmpa_tl
}
{
#1 %
}
+ {
+ \pdf_pageobject_ref:n { \__tag_ref_value:nnn {__tag_objr_page_#2 }{ tagabspage }{1} }
+ }
% add the parent obj number to the parent tree:
\exp_args:Nnx
\__tag_parenttree_add_objr:nn
@@ -2089,6 +2092,15 @@
},
}
%% File: tagpdf-space.dtx
+\keys_define:nn { __tag / setup }
+ {
+ interwordspace .choices:nn = { true, on }
+ { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str} },
+ interwordspace .choices:nn = { false, off }
+ { \msg_warning:nnx {tag}{sys-no-interwordspace}{\c_sys_engine_str} },
+ interwordspace .default:n = true,
+ show-spaces .bool_set:N = \l__tag_showspaces_bool
+ }
\sys_if_engine_pdftex:T
{
\sys_if_output_pdf:TF
@@ -2138,19 +2150,6 @@
show-spaces .default:n = true
}
}
-
-\sys_if_engine_xetex:T
- {
- \keys_define:nn { __tag / setup }
- {
- interwordspace .choices:nn = { true, on }
- { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex} },
- interwordspace .choices:nn = { false, off }
- { \msg_warning:nnn {tag}{sys-no-interwordspace}{xetex} },
- interwordspace .default:n = true,
- show-spaces .bool_set:N = \l__tag_showspaces_bool
- }
- }
\sys_if_engine_luatex:T
{
\cs_new_protected:Nn \__tag_fakespace:
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
index 102560ead07..677e2b50704 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
@@ -1,5 +1,5 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2022-05-11} {0.94}
+\ProvidesExplPackage {tagpdfdocu-patches} {2022-05-29} {0.95}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox}