summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source')
-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
11 files changed, 94 insertions, 57 deletions
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}