summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/README.md4
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdfbin1532339 -> 1488604 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdfbin757067 -> 854620 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex116
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx8
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx6
-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.dtx6
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx4
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx40
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx92
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx5
-rw-r--r--Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx13
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty6
-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.sty4
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv2
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua4
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty88
-rw-r--r--Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty24
33 files changed, 369 insertions, 107 deletions
diff --git a/Master/texmf-dist/doc/latex/tagpdf/README.md b/Master/texmf-dist/doc/latex/tagpdf/README.md
index 8f562a87168..654c5ec695d 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.98a
-Packagedate: 2022/12/22
+Packageversion: 0.98b
+Packagedate: 2023/01/24
Author: Ulrike Fischer
## License
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
index b0bb3a8290c..5b954258dd5 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 08ec9e590c7..a77e88d3c5f 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 fc096c338d8..e36b3e91979 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
@@ -1,11 +1,22 @@
% !Mode:: "TeX:DE:UTF-8:Main"
\PassOptionsToPackage{check-declarations,enable-debug}{expl3}
-%\RequirePackage{pdfmanagement-testphase}
-\DocumentMetadata{pdfversion=2.0,lang=en-UK,testphase=phase-II,testphase=toc-tagging,testphase=sec-tagging,pdfstandard=a-2b}
+
+% Note on the compilation of the documentation:
+% The documentation uses for the tagging sometimes code
+% that is under development and/or not public yet.
+% To compile an *untagged* documentation, comment the line with
+% the testphase keys in the following \DocumentMetadata command.
+
+\DocumentMetadata
+ {
+ % comment the following line to compile an untagged documentation:
+ testphase=phase-II,testphase=toc-tagging,testphase=sec-tagging,
+ pdfversion=2.0,lang=en-UK,pdfstandard=a-2b
+ }
\makeatletter
-\def\UlrikeFischer@package@version{0.98a}
-\def\UlrikeFischer@package@date{2022-12-22}
+\def\UlrikeFischer@package@version{0.98b}
+\def\UlrikeFischer@package@date{2023-01-24}
\makeatother
\documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
@@ -48,6 +59,10 @@
escapechar=*,
commentstyle=\color{green!50!black}\bfseries}
+% this allow to get real spaces in the code parts.
+% This should perhaps be combined in a new listings key
+\lstset{showspaces}
+\makeatletter \def\lst@visiblespace{\lst@ttfamily{\char32}{\char32}}\makeatother
\tagpdfsetup{
@@ -56,8 +71,7 @@
%show-spaces
}
-\usepackage[pdfdisplaydoctitle=true,%hyperfootnotes=false,
- ]{hyperref}
+\usepackage[pdfdisplaydoctitle=true]{hyperref}
\hypersetup{
pdftitle={The tagpdf package, v\csname UlrikeFischer@package@version\endcsname},
@@ -65,6 +79,8 @@
colorlinks}
\tcbuselibrary{documentation}
+%less space between docCommand
+\tcbset{nosep/.style={doc raster command={raster after skip=-10pt}}}
\definecolor{Definition}{rgb}{0,0.2,0.6}
\newcommand\PrintKeyName[1]{\textsf{#1}}
\newcommand\pkg[1]{\texttt{#1}}
@@ -433,8 +449,8 @@ Small bug fixes.
\item a new option \texttt{paratag} allows to change the tag name used for the
automatically tagged paragraphs.
-\item the commands |\tag_start:|, |\tag_stop:n| and |\tag_start:n| allow
- to stop and start tagging for example in trial typesetting.
+\item the commands |\tag_start:|, |\tag_stop:|, |\tag_stop:n| and |\tag_start:n| allow
+ to stop and start tagging (for example in trial typesetting).
\item Small bug fixes.
\end{itemize}
@@ -461,6 +477,14 @@ can improve the html export.
\end{itemize}
+\subsection{Changes in version 0.98a}
+Small bug fixes in code and documentation.
+
+\subsection{Changes in version 0.98b}
+The main change is from now on every structure has an ID and an IDtree is
+added. The ID of a structure can be retrieved with |\tag_get:n|
+see~\ref{sec:retrieve}.
+
\subsection{Proof of concept: the tagging of the documentation itself}
@@ -975,7 +999,7 @@ executed on the same page as the begin command. So think carefully how to
place them. For strategies how to handle paragraphs that split over pages see
subsection~\ref{sec:splitpara}.
-\begin{docCommand}{tagmcbegin}{\marg{key-val-list}}\end{docCommand}
+\begin{docCommand}[nosep]{tagmcbegin}{\marg{key-val-list}}\end{docCommand}
\begin{docCommand}{tag_mc_begin:n}{\marg{key-val-list}}\end{docCommand}
@@ -1072,7 +1096,7 @@ The key-val list understands the following keys:
\end{description}
-\begin{docCommand}{tagmcend}{}\end{docCommand}
+\begin{docCommand}[nosep]{tagmcend}{}\end{docCommand}
\begin{docCommand}{tag_mc:end}{}\end{docCommand}
These commands insert the end code of the marked content. They don't end a
@@ -1102,7 +1126,7 @@ the command, as the effect of the begin command ends with a new
%\end{tcolorbox}
-\begin{docCommand}{tagmcuse}{}\end{docCommand}
+\begin{docCommand}[nosep]{tagmcuse}{}\end{docCommand}
\begin{docCommand}{tag_mc_use:n}{}\end{docCommand}
@@ -1111,7 +1135,7 @@ into the current structure. Be aware that a marked content can be used only
once -- the command will warn you if you try to use it a second time.
-\begin{docCommand}{tag_mc_end_push:}{}\end{docCommand}
+\begin{docCommand}[nosep]{tag_mc_end_push:}{}\end{docCommand}
\begin{docCommand}{tag_mc_begin_pop:n}{\marg{key-val-list}}\end{docCommand}
If there is an open mc chunk,
@@ -1123,7 +1147,7 @@ definitions so there is only an expl3 version. Perhaps other content of the mc-d
-\begin{docCommand}{tagmcifinTF}{\marg{true code}\marg{false code}}\end{docCommand}
+\begin{docCommand}[nosep]{tagmcifinTF}{\marg{true code}\marg{false code}}\end{docCommand}
\begin{docCommand}{tag_mc_if_in:TF}{\marg{true code}\marg{false code}}\end{docCommand}
@@ -1133,10 +1157,14 @@ In \emph{generic mode}, where marked content command shouldn't be nested, it wor
In \emph{lua mode} it tests if the mc-attribute is currently unset. You can't test the nesting level with it!
+\subsubsection{Retrieving data} \label{sec:retrieve}
+With more elaborate tagging the need arise to retrieve and store current data.
\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+, \verb+struct_tag+ and \verb+struct_num+. The last returns a number and works also if only \pkg{tagpdf-base} has been loaded, but then doesn't give the same output: if \pkg{tagpdf} is loaded and tagging is active, \verb+struct_num+ gives the number of currently
+This (expandable) command give back some variables. Currently the working key words are \verb+mc_tag+, \verb+struct_tag+,
+\verb+struct_id+ and \verb+struct_num+. The ID is a string and returned including parentheses.
+\verb+struct_num+ returns a number and works also if only \pkg{tagpdf-base} has been loaded, but then doesn't give the same output: if \pkg{tagpdf} is loaded and tagging is active, \verb+struct_num+ gives the number of currently
active structure, so it reverts to the parent number if a structure is closed. If only \pkg{tagpdf-base} is loaded
nesting of structure is not tracked and so the command gives back the number of the last structure that has been created.
@@ -1230,11 +1258,11 @@ the needed code.
\tagstructbegin{tag=Figure,alt={Illustration of link annotation structure},attribute=bbox}\tagmcbegin{tag=Figure}
\ExplSyntaxOn
-\tag_stop_group_begin:
+\tag_stop:
\ExplSyntaxOff
\input{link-figure-input}
\ExplSyntaxOn
-\tag_stop_group_end:
+\tag_start:
\ExplSyntaxOff
\tagmcend\tagstructend
@@ -1408,7 +1436,7 @@ rerun.
\subsubsection{Automatic tagging of paragraphs}\label{sec:paratagging}
-\begin{docCommand}{tagpdfparaOn}{}\end{docCommand}
+\begin{docCommand}[nosep]{tagpdfparaOn}{}\end{docCommand}
\begin{docCommand}{tagpdfparaOff}{}\end{docCommand}
Another feature that emerged from the \LaTeX{} tagged PDF project are hooks at the begin and end of paragraphs.
@@ -1491,7 +1519,7 @@ The flat version is more \LaTeX-like and it is rather straightforward to patch \
The following commands can be used to define the tree structure:
-\begin{docCommand}{tagstructbegin}{\marg{key-val-list}}\end{docCommand}
+\begin{docCommand}[nosep]{tagstructbegin}{\marg{key-val-list}}\end{docCommand}
\begin{docCommand}{tag_struct_begin:n}{\marg{key-val-list}}\end{docCommand}
These commands start a new structure. They don't start a group. They set all their values globally.
@@ -1629,12 +1657,12 @@ The key-val list understands the following keys:
This key sets the |/E| key, the expanded form of an abbreviation or an acronym (I couldn't think of a better name, so I sticked to E).
\end{description}
-\begin{docCommand}{tagstructend}{}\end{docCommand}
+\begin{docCommand}[nosep]{tagstructend}{}\end{docCommand}
\begin{docCommand}{tag_struct_end:}{}\end{docCommand}
These commands end a structure. They don't end a group and it doesn't matter if they are in another group as the starting commands.
-\begin{docCommand}{tagstructuse}{\marg{label}}\end{docCommand}
+\begin{docCommand}[nosep]{tagstructuse}{\marg{label}}\end{docCommand}
\begin{docCommand}{tag_struct_use:n}{\marg{label}}\end{docCommand}
@@ -1769,22 +1797,54 @@ The following shows the marking needed for a section, a sentence and a list with
\end{document}
\end{lstlisting}
+\subsection{Interrupting the tagging}
-\subsection{Lazy and automatic tagging}\label{sec:lazy}
+Experience showed that it must be possible to interrupt tagging in some places.
+For example various packages do trial typesetting to measure text and this shouldn't create
+structures. There are therefore a number of commands for various use cases\footnote{it is
+quite possible that some of the commands will disappear again if we realize that they are not fitting!}
-A number of features of \PDF{} readers need a fully tagged \PDF{}. As an example screen readers tend to ignore alternative text (see section~\ref{sec:alt}) if the \PDF{} is not fully tagged. Also reflowing a \PDF{} only works for me (even if real space chars are in the \PDF{}) if the \PDF{} is fully tagged.
+\begin{docCommand}[nosep]{tag_stop:}{}\end{docCommand}
+\begin{docCommand}[nosep]{tag_start:}{}\end{docCommand}
+\begin{docCommand}[nosep]{tag_stop_group_begin:}{}\end{docCommand}
+\begin{docCommand}{tag_start_group_end:}{}\end{docCommand}
-This means that even if you don't care about a proper structure you should try to add at least some minimal tagging. With pdflatex this is not easy due to the page break problem. But with lualatex you can use an \texttt{Document} structure and inside it rather large mc-chunks. This minimizes the needed work.
+This commands stop and start tagging in the current group
+by switching \emph{local} booleans.
+The grouping commands also open and close a group.
-One could ask if in lua mode the code couldn't try to mark up unmarked parts e.g. as P-type chunks, like it marks them up as artifacts currently. Sadly this is not so easy, as it is quite difficult to reliably identify the structure and the place in the kids array where such chunks belongs too. I also don't think that it is really needed. It is not so difficult to define user macros which e.g. opens a structure and start an mc-chunk or which close an open mc-chunk before issuing the next \verb+\tagmcbegin+.
+\begin{docCommand}[nosep]{tag_stop:n}{\marg{label}}\end{docCommand}
+\begin{docCommand}{tag_start:n}{\marg{label}}\end{docCommand}
+This commands stop and start tagging in the current group
+by switching \emph{local} booleans, but |\tag_start:n|
+only restarts if the corresponding |tag_stop:n| actually
+stopped something. This is meant for a situation like the following,
+where you don't want that the inner |\tag_start:n| restarts tagging.
+\begin{lstlisting}
+\tag_stop:n{outer}
+ ...
+ \tag_stop:n{inner}
+ ...
+ \tag_start:n{inner}
+ ...
+\tag_start:n{outer}
+\end{lstlisting}
+
+\subsection{Lazy and automatic tagging}\label{sec:lazy}
-\subsection{Adding tagging to commands}
+
+A number of features of \PDF{} readers need a fully tagged \PDF{}. As an example screen readers tend to ignore alternative text (see section~\ref{sec:alt}) if the \PDF{} is not fully tagged. Also reflowing a \PDF{} only works for me (even if real space chars are in the \PDF{}) if the \PDF{} is fully tagged (recent versions of the adobe reader manage to
+reflow also not tagged \PDF{} but it is very slow).
+
+This means that even if you don't care about a proper structure you should try to add at least some minimal tagging. With the now available automatic tagging of paragraphs all that is needed, is to use |testphase=phase-II| in |\DocumentMetadata|. With lualatex this can work quite OK if you don't have unbalanced paragraphs in your document (pdflatex is more fragile).
+\subsection{Adding tagging to commands}
+
As mentioned above the mc-markers should not be nested. Basically you write:
@@ -1796,9 +1856,7 @@ As mentioned above the mc-markers should not be nested. Basically you write:
\end{lstlisting}
-This is quite workable as long as you mark everything manually. But how to write commands, e.g for a tabular or a graphic, that do tagging automatically without breaking the flow and the structure?
-
-
+This is quite workable as long as you mark everything manually. But when defining commands you have to ensure that they correctly push and pop the mc-chunks where needed.
\section{Alternative text, ActualText and text-to-speech software}\label{sec:alt}
@@ -2133,7 +2191,7 @@ This command takes as argument a key-val list which implements a number of show
-\printbibliography
+\printbibliography[heading=bibintoc]
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
index e8fac1f6ecf..0028f723970 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2022-12-22} {0.98a}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-01-24} {0.98b}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98a", --TAGVERSION
- date = "2022-12-22", --TAGDATE
+ version = "0.98b", --TAGVERSION
+ date = "2023-01-24", --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 6ec0e6aadc9..fae3e853d3a 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -63,7 +63,7 @@
% This is a generic command to retrieve data for the current structure or
% mc-chunk. Currently
% the only sensible values for the argument \meta{keyword}
-% are |mc_tag| and |struct_tag| and |struct_num|.
+% are |mc_tag|, |struct_tag|, |struct_id| and |struct_num|.
% \end{function}
%
% \section{Description of log messages}
@@ -295,7 +295,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-01-24} {0.98b}
{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 379c2114d76..93bf80667bc 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-01-24} {0.98b}
%% {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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-01-24} {0.98b}
%% {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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-01-24} {0.98b}
%% {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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-01-24} {0.98b}
%% {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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-01-24} {0.98b}
%% {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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-01-24} {0.98b}
% {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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-01-24} {0.98b}
,,,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} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-01-24} {0.98b}
,,,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 573604fa874..fd3409c73bb 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-01-24} {0.98b}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-01-24} {0.98b}
{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 6195218abf3..de5fe42739f 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \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-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-01-24} {0.98b}
{tagpdf - mc code only for the luamode }
%</luamode>
% \end{macrocode}
@@ -165,7 +165,7 @@
=
{\lua_now:e
{
- tex.print(tex.getattribute(luatexbase.attributes.g__tag_mc_type_attr))
+ tex.print(\int_use:N \c_document_cctab,tex.getattribute(luatexbase.attributes.g__tag_mc_type_attr))
}
}
{ \prg_return_false: }
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 66ad8a922ce..e693242d1b0 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -174,7 +174,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-01-24} {0.98b}
{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 d24fae960e3..60ba8572948 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -90,7 +90,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-01-24} {0.98b}
{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 26602a96b01..f450520a481 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-space-code} {2023-01-24} {0.98b}
{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 1299cc10e99..2e83d512806 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -242,7 +242,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-01-24} {0.98b}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -507,6 +507,24 @@
% \end{macrocode}
% \end{variable}
%
+% \subsection{Adding the /ID key}
+% Every structure gets automatically an ID which is currently
+% simply calculated from the structure number.
+% \begin{macro}{\@@_struct_get_id:n}
+% \begin{macrocode}
+\cs_new:Npn \@@_struct_get_id:n #1 %#1=struct num
+ {
+ (
+ ID.
+ \prg_replicate:nn
+ { \int_abs:n{\g_@@_tree_id_pad_int - \tl_count:e { \int_to_arabic:n { #1 } }} }
+ { 0 }
+ \int_to_arabic:n { #1 }
+ )
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Filling in the tag info}
% \begin{macro}{\@@_struct_set_tag_info:nnn }
@@ -808,7 +826,8 @@
{ @@/struct/#1 }
{dict}
{
- \l_@@_tmpa_tl
+ \l_@@_tmpa_tl\c_space_tl
+ /ID~\@@_struct_get_id:n{#1}
}
}
{
@@ -884,7 +903,7 @@
%
% \begin{macro}{\@@_get_data_struct_tag:}
% this command allows \cs{tag_get:n} to get the current
-% structure tag with the keyword |struct_tag|. We will need to handle nesting
+% structure tag with the keyword |struct_tag|.
% \begin{macrocode}
\cs_new:Npn \@@_get_data_struct_tag:
{
@@ -894,6 +913,17 @@
\prop_item:cn {g_@@_struct_\g_@@_struct_stack_current_tl _prop}{S}
}
}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_get_data_struct_id:}
+% this command allows \cs{tag_get:n} to get the current
+% structure id with the keyword |struct_id|.
+% \begin{macrocode}
+\cs_new:Npn \@@_get_data_struct_id:
+ {
+ \@@_struct_get_id:n {\g_@@_struct_stack_current_tl}
+ }
%</package>
% \end{macrocode}
% \end{macro}
@@ -1480,7 +1510,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-01-24} {0.98b}
{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 f8c7aa27d75..2a02a7c5df8 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-01-24} {0.98b}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
@@ -119,6 +119,73 @@
}
% \end{macrocode}
%
+% \subsection{Writing the IDtree}
+%
+% The ID are currently quite simple: every structure has an ID build from
+% the prefix ID together with the structure number padded with enough zeros to
+% that we get directly an lexical order. We ship them out in bundles
+% At first a seq to hold the references for the kids
+% \begin{variable}{\g_@@_tree_id_pad_int}
+% \begin{macrocode}
+\int_new:N\g_@@_tree_id_pad_int
+% \end{macrocode}
+% \end{variable}
+% Now we get the needed padding
+% \begin{macrocode}
+\cs_generate_variant:Nn \tl_count:n {e}
+\hook_gput_code:nnn{begindocument}{tagpdf}
+ {
+ \int_gset:Nn\g_@@_tree_id_pad_int
+ {\tl_count:e { \@@_ref_value_lastpage:nn{tagstruct}{1000}}+1}
+ }
+
+% \end{macrocode}
+% This is the main code to write the tree it basically splits the
+% existing structure numbers in chunks of length 50
+% TODO consider is 50 is a good length.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_tree_write_idtree:
+ {
+ \tl_clear:N \l_@@_tmpa_tl
+ \tl_clear:N \l_@@_tmpb_tl
+ \int_zero:N \l_@@_tmpa_int
+ \int_step_inline:nn {\c@g_@@_struct_abs_int}
+ {
+ \int_incr:N\l_@@_tmpa_int
+ \tl_put_right:Nx \l_@@_tmpa_tl
+ {
+ \@@_struct_get_id:n{##1}~\pdf_object_ref:n{@@/struct/##1}~
+ }
+ \int_compare:nNnF {\l_@@_tmpa_int}<{50} %
+ {
+ \pdf_object_unnamed_write:nx {dict}
+ { /Limits~[\@@_struct_get_id:n{##1-\l_@@_tmpa_int+1}~\@@_struct_get_id:n{##1}]
+ /Names~[\l_@@_tmpa_tl]
+ }
+ \tl_put_right:Nx\l_@@_tmpb_tl {\pdf_object_ref_last:\c_space_tl}
+ \int_zero:N \l_@@_tmpa_int
+ \tl_clear:N \l_@@_tmpa_tl
+ }
+ }
+ \tl_if_empty:NF \l_@@_tmpa_tl
+ {
+ \pdf_object_unnamed_write:nx {dict}
+ {
+ /Limits~
+ [\@@_struct_get_id:n{\c@g_@@_struct_abs_int-\l_@@_tmpa_int+1}~
+ \@@_struct_get_id:n{\c@g_@@_struct_abs_int}]
+ /Names~[\l_@@_tmpa_tl]
+ }
+ \tl_put_right:Nx\l_@@_tmpb_tl {\pdf_object_ref_last:}
+ }
+ \pdf_object_unnamed_write:nx {dict}{/Kids~[\l_@@_tmpb_tl]}
+ \@@_prop_gput:cnx
+ { g_@@_struct_0_prop }
+ { IDTree }
+ { \pdf_object_ref_last: }
+ }
+% \end{macrocode}
+%
% \subsection{Writing structure elements}
% The following commands are needed to write out the structure.
% \begin{macro}{\@@_tree_write_structtreeroot:}
@@ -135,8 +202,15 @@
\@@_prop_gput:cnx
{ g_@@_struct_0_prop }
{ RoleMap }
- { \pdf_object_ref:n { @@/tree/rolemap } }
- \@@_struct_write_obj:n { 0 }
+ { \pdf_object_ref:n { @@/tree/rolemap } }
+ \@@_struct_fill_kid_key:n { 0 }
+ \@@_struct_get_dict_content:nN { 0 } \l_@@_tmpa_tl
+ \pdf_object_write:nnx
+ { @@/struct/0 }
+ {dict}
+ {
+ \l_@@_tmpa_tl
+ }
}
}
% \end{macrocode}
@@ -149,7 +223,14 @@
{ g_@@_struct_0_prop }
{ ParentTree }
{ \pdf_object_ref:n { @@/tree/parenttree } }
- \@@_struct_write_obj:n { 0 }
+ \@@_struct_fill_kid_key:n { 0 }
+ \@@_struct_get_dict_content:nN { 0 } \l_@@_tmpa_tl
+ \pdf_object_write:nnx
+ { @@/struct/0 }
+ {dict}
+ {
+ \l_@@_tmpa_tl
+ }
}
}
% \end{macrocode}
@@ -459,6 +540,7 @@
\hook_use:n {tagpdf/finish/before}
\@@_tree_final_checks:
\@@_tree_write_parenttree:
+ \@@_tree_write_idtree:
\@@_tree_write_rolemap:
\@@_tree_write_classmap:
\@@_tree_write_namespaces:
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
index a2a0475ccf1..309b62a6c1f 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.98a, released 2022-12-22}
+% \date{Version 0.98b, released 2023-01-24}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -246,7 +246,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-user} {2023-01-24} {0.98b}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -639,6 +639,7 @@
% \begin{macrocode}
\AddToHook{begindocument/before}
{
+ \@ifundefined{@mult@ptagging@hook}{\RequirePackage{output-patches-tmp-ltx}}{} %
\bool_if:NF \g_@@_mode_lua_bool
{
\cs_if_exist:NT \@kernel@before@footins
diff --git a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
index 59795d78a39..c264123ebc7 100644
--- a/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
+++ b/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
@@ -34,7 +34,7 @@
% \end{function}
%
% \begin{function}{ \tag_stop_group_begin:, \tag_stop_group_end:,
-% \tag_stop:, \tag_start:, \tag_stop:n, \tag_start:n }
+% \tag_stop:, \tag_start: }
% We need commands to stop tagging in some places.
% There simply switches the two local booleans. The grouping commands
% can be used to group the effect.
@@ -92,7 +92,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf} {2023-01-24} {0.98b}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -118,7 +118,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-debug} {2023-01-24} {0.98b}
{ 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} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-base} {2023-01-24} {0.98b}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -197,6 +197,7 @@
{
{abspage} { \int_use:N \g_shipout_readonly_int}
{tagmcabs}{ \int_use:N \c@g_@@_MCID_abs_int }
+ {tagstruct}{\int_use:N \c@g_@@_struct_abs_int }
}
}
}
@@ -518,8 +519,8 @@
%<*base>
\cs_new_protected:Npn \tag_stop:{}
\cs_new_protected:Npn \tag_start:{}
-\cs_new_protected:Npn \tag_stop:n{}
-\cs_new_protected:Npn \tag_start:n{}
+\cs_new_protected:Npn \tag_stop:n #1 {}
+\cs_new_protected:Npn \tag_start:n #1 {}
%</base>
% \end{macrocode}
% \end{macro}
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
index 3da06a2f1b4..e33868b0b0d 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
@@ -24,7 +24,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-base} {2023-01-24} {0.98b}
{part of tagpdf - provide base, no-op versions of the user commands }
\AddToHook{begindocument}
{
@@ -40,8 +40,8 @@
\cs_new_protected:Npn \tag_stop:{}
\cs_new_protected:Npn \tag_start:{}
-\cs_new_protected:Npn \tag_stop:n{}
-\cs_new_protected:Npn \tag_start:n{}
+\cs_new_protected:Npn \tag_stop:n #1 {}
+\cs_new_protected:Npn \tag_start:n #1 {}
%% File: tagpdf-mc-generic.dtx
\cs_new_protected:Npn \tag_mc_begin:n #1 { \__tag_whatsits: }
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 ea2f311304c..367a746c612 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-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-01-24} {0.98b}
{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 944dd28d7fc..bac841f7404 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-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-debug} {2023-01-24} {0.98b}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
\prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {}
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
index b3c2876b012..021c829abb9 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-12-22} {0.98a}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-01-24} {0.98b}
{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 b345e736719..254b5c1c7fa 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-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-01-24} {0.98b}
{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 30ad779f1ae..e7ec855ee54 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-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-01-24} {0.98b}
{tagpdf - mc code only for the luamode }
\hook_gput_code:nnn{begindocument}{tagpdf/mc}
{
@@ -80,7 +80,7 @@
=
{\lua_now:e
{
- tex.print(tex.getattribute(luatexbase.attributes.g__tag_mc_type_attr))
+ tex.print(\int_use:N \c_document_cctab,tex.getattribute(luatexbase.attributes.g__tag_mc_type_attr))
}
}
{ \prg_return_false: }
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
index 42d51a6d383..c73e98afa38 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-01-24} {0.98b}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
index 5dcec775dc7..05f27502519 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-inline.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-01-24} {0.98b}
%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
chapter, Span, pdf2,
section, Span, pdf2,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
index 4d5115640f9..b6275cd847d 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-01-24} {0.98b}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
index 0d0096c63f4..a3e97ada0ba 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-01-24} {0.98b}
abs,,,
and,,,
annotation,,,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
index 693faa9ba45..b6bb6391cbe 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-01-24} {0.98b}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
index fbc68fa9b54..6c2c31df27c 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-01-24} {0.98b}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
Document,Document,pdf2,D,
Part,Part,pdf2,G,
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
index 43263cb5513..96faf168ae9 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-01-24} {0.98b}
,,,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/tex/latex/tagpdf/tagpdf-parent-child.csv b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
index 39567b05cc0..cd41098083d 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2022-12-22} {0.98a}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-01-24} {0.98b}
,,,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,∅,∅
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
index 676e7a99b2e..b4accfdb906 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.98a", --TAGVERSION
- date = "2022-12-22", --TAGDATE
+ version = "0.98b", --TAGVERSION
+ date = "2023-01-24", --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 ebd2964642a..8591ee5f978 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
@@ -28,7 +28,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdf} {2023-01-24} {0.98b}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -70,6 +70,7 @@
{
{abspage} { \int_use:N \g_shipout_readonly_int}
{tagmcabs}{ \int_use:N \c@g__tag_MCID_abs_int }
+ {tagstruct}{\int_use:N \c@g__tag_struct_abs_int }
}
}
}
@@ -744,6 +745,54 @@
{ \pdf_object_ref:n { __tag/struct/0 } }
}
}
+\int_new:N\g__tag_tree_id_pad_int
+\cs_generate_variant:Nn \tl_count:n {e}
+\hook_gput_code:nnn{begindocument}{tagpdf}
+ {
+ \int_gset:Nn\g__tag_tree_id_pad_int
+ {\tl_count:e { \__tag_ref_value_lastpage:nn{tagstruct}{1000}}+1}
+ }
+
+\cs_new_protected:Npn \__tag_tree_write_idtree:
+ {
+ \tl_clear:N \l__tag_tmpa_tl
+ \tl_clear:N \l__tag_tmpb_tl
+ \int_zero:N \l__tag_tmpa_int
+ \int_step_inline:nn {\c@g__tag_struct_abs_int}
+ {
+ \int_incr:N\l__tag_tmpa_int
+ \tl_put_right:Nx \l__tag_tmpa_tl
+ {
+ \__tag_struct_get_id:n{##1}~\pdf_object_ref:n{__tag/struct/##1}~
+ }
+ \int_compare:nNnF {\l__tag_tmpa_int}<{50} %
+ {
+ \pdf_object_unnamed_write:nx {dict}
+ { /Limits~[\__tag_struct_get_id:n{##1-\l__tag_tmpa_int+1}~\__tag_struct_get_id:n{##1}]
+ /Names~[\l__tag_tmpa_tl]
+ }
+ \tl_put_right:Nx\l__tag_tmpb_tl {\pdf_object_ref_last:\c_space_tl}
+ \int_zero:N \l__tag_tmpa_int
+ \tl_clear:N \l__tag_tmpa_tl
+ }
+ }
+ \tl_if_empty:NF \l__tag_tmpa_tl
+ {
+ \pdf_object_unnamed_write:nx {dict}
+ {
+ /Limits~
+ [\__tag_struct_get_id:n{\c@g__tag_struct_abs_int-\l__tag_tmpa_int+1}~
+ \__tag_struct_get_id:n{\c@g__tag_struct_abs_int}]
+ /Names~[\l__tag_tmpa_tl]
+ }
+ \tl_put_right:Nx\l__tag_tmpb_tl {\pdf_object_ref_last:}
+ }
+ \pdf_object_unnamed_write:nx {dict}{/Kids~[\l__tag_tmpb_tl]}
+ \__tag_prop_gput:cnx
+ { g__tag_struct_0_prop }
+ { IDTree }
+ { \pdf_object_ref_last: }
+ }
\pdf_version_compare:NnTF < {2.0}
{
\cs_new_protected:Npn \__tag_tree_write_structtreeroot:
@@ -756,7 +805,14 @@
{ g__tag_struct_0_prop }
{ RoleMap }
{ \pdf_object_ref:n { __tag/tree/rolemap } }
- \__tag_struct_write_obj:n { 0 }
+ \__tag_struct_fill_kid_key:n { 0 }
+ \__tag_struct_get_dict_content:nN { 0 } \l__tag_tmpa_tl
+ \pdf_object_write:nnx
+ { __tag/struct/0 }
+ {dict}
+ {
+ \l__tag_tmpa_tl
+ }
}
}
{
@@ -766,7 +822,14 @@
{ g__tag_struct_0_prop }
{ ParentTree }
{ \pdf_object_ref:n { __tag/tree/parenttree } }
- \__tag_struct_write_obj:n { 0 }
+ \__tag_struct_fill_kid_key:n { 0 }
+ \__tag_struct_get_dict_content:nN { 0 } \l__tag_tmpa_tl
+ \pdf_object_write:nnx
+ { __tag/struct/0 }
+ {dict}
+ {
+ \l__tag_tmpa_tl
+ }
}
}
\cs_new_protected:Npn \__tag_tree_write_structelements:
@@ -966,6 +1029,7 @@
\hook_use:n {tagpdf/finish/before}
\__tag_tree_final_checks:
\__tag_tree_write_parenttree:
+ \__tag_tree_write_idtree:
\__tag_tree_write_rolemap:
\__tag_tree_write_classmap:
\__tag_tree_write_namespaces:
@@ -1832,6 +1896,16 @@
{ g__tag_struct_0_prop }
{ Namespaces }
{ \pdf_object_ref:n { __tag/tree/namespaces } }
+\cs_new:Npn \__tag_struct_get_id:n #1 %#1=struct num
+ {
+ (
+ ID.
+ \prg_replicate:nn
+ { \int_abs:n{\g__tag_tree_id_pad_int - \tl_count:e { \int_to_arabic:n { #1 } }} }
+ { 0 }
+ \int_to_arabic:n { #1 }
+ )
+ }
\pdf_version_compare:NnTF < {2.0}
{
@@ -2042,7 +2116,8 @@
{ __tag/struct/#1 }
{dict}
{
- \l__tag_tmpa_tl
+ \l__tag_tmpa_tl\c_space_tl
+ /ID~\__tag_struct_get_id:n{#1}
}
}
{
@@ -2095,6 +2170,10 @@
\prop_item:cn {g__tag_struct_\g__tag_struct_stack_current_tl _prop}{S}
}
}
+\cs_new:Npn \__tag_get_data_struct_id:
+ {
+ \__tag_struct_get_id:n {\g__tag_struct_stack_current_tl}
+ }
\keys_define:nn { __tag / struct }
{
label .tl_set:N = \l__tag_struct_key_label_tl,
@@ -2927,6 +3006,7 @@
}
\AddToHook{begindocument/before}
{
+ \@ifundefined{@mult@ptagging@hook}{\RequirePackage{output-patches-tmp-ltx}}{} %
\bool_if:NF \g__tag_mode_lua_bool
{
\cs_if_exist:NT \@kernel@before@footins
diff --git a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
index cc4eb9f4b76..3ad0e3de746 100644
--- a/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
+++ b/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
@@ -1,33 +1,36 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2022-12-22} {0.98a}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-01-24} {0.98b}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
+% latex-lab experiments
+\providecommand\tagtool[1]{}
%vLogos
\ExplSyntaxOn
\DeclareRobustCommand\TeX{
+ \leavevmode
\tag_mc_end_push:
\tag_struct_begin:n{tag=Span,alt=TeX,actualtext=TeX}
\tagmcbegin{}
- T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@
+ T\kern-.1667em\lower.5ex\hbox{E}\kern-.05emX\@ %changed from -.125em
\tagmcend
\tag_struct_end:
\tag_mc_begin_pop:n{}}
-\DeclareRobustCommand{\LaTeX}{L\kern-.36em%
- {
+\DeclareRobustCommand{\LaTeX}{
+ \leavevmode
\tag_mc_end_push:
\tag_struct_begin:n{tag=Span,alt=LaTeX,actualtext=LaTeX}
\tagmcbegin{}
+ L\kern-.25em % %changed from -0.36em
\sbox\z@ T%
\vbox to\ht\z@{\hbox{\check@mathfonts
\fontsize\sf@size\z@
\math@fontsfalse\selectfont
A}%
\vss}%
- }%
- \kern-.15em%
- T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@
+ \kern-.1em % %changed from 0.15em
+ T\kern-.1667em\lower.5ex\hbox{E}\kern-.05emX\@ %changed from -0.125
\tagmcend
\tag_struct_end:
\tag_mc_begin_pop:n{}
@@ -39,6 +42,13 @@
\AddToHook{cmd/textbf/after}
{\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
+
+% emph
+\AddToHook{cmd/emph/before}
+ {\leavevmode\tag_mc_end_push:\tag_struct_begin:n{tag=Em}\tagmcbegin{}}
+
+\AddToHook{cmd/emph/after}
+ {\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
\newcommand\minisec[1]{%