texlive[74073] branches/branch2024.final/Master/texmf-dist: tagpdf
commits+karl at tug.org
commits+karl at tug.org
Mon Feb 17 21:49:02 CET 2025
Revision: 74073
https://tug.org/svn/texlive?view=revision&revision=74073
Author: karl
Date: 2025-02-17 21:49:02 +0100 (Mon, 17 Feb 2025)
Log Message:
-----------
tagpdf (branch) (17feb25)
Modified Paths:
--------------
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/README.md
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-AF-file.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-attribute.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-list.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split-obsolete.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-structure-obsolete.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/README.md
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/README.md 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/README.md 2025-02-17 20:49:02 UTC (rev 74073)
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.99l
-Packagedate: 2025/01/12
+Packageversion: 0.99m
+Packagedate: 2025/02/17
Author: Ulrike Fischer, LaTeX Project Team
## License
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-AF-file.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-attribute.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-list.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split-obsolete.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-structure-obsolete.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf-code.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
===================================================================
(Binary files differ)
Modified: branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
===================================================================
--- branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex 2025-02-17 20:49:02 UTC (rev 74073)
@@ -16,8 +16,8 @@
}
\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer at package@version{0.99l}
-\def\UlrikeFischer at package@date{2025-01-12}
+\def\UlrikeFischer at package@version{0.99m}
+\def\UlrikeFischer at package@date{2025-02-17}
\makeatother
\documentclass[bibliography=totoc,a4paper]{article}
@@ -156,7 +156,7 @@
The code has been written so that it can be added as module to the \LaTeX{}
-kernel itself if it turns out to be usable. It therefore avoid to patch
+kernel itself if it turned out to be usable. It therefore avoid to patch
commands from other packages. It was also not an aim of the package to
develop patches to directly enable tagging in other packages. While in the end changes to various commands in many
classes and packages will be needed to automatically get tagged \PDF{} files, these changes
@@ -185,7 +185,7 @@
While the package is named \pkg{tagpdf} the goal is also \emph{accessible}
\PDF{}-files. Tagging is \emph{one} (the most difficult) requirement for
accessibility but there are others. I will mention some later on in this
-documentation, and -- if sensible -- I will also try to add code, keys or
+documentation, and -- if sensible -- also add code, keys or
tips for them.
So the name of the package is a bit wrong. As excuse I can only say that it
@@ -194,7 +194,7 @@
\subsection{Engines and modes}
- Theoretically, the package works with all engines, but the xelatex and the
+Theoretically, the package works with all engines, but the xelatex and the
latex-dvips-route are basically untested and they also don't support real
space glyphs so I don't recommend them. lualatex is the most powerful and
safe modus and should be used for new documents, it is slower than pdflatex
@@ -204,7 +204,8 @@
The package has two modes: the \emph{generic mode} which should work in
theory with every engine and the \emph{lua mode} which works only with
-lualatex and (since version 0.98k) with dvilualatex.
+lualatex and (since version 0.98k) with dvilualatex. Since version 0.99m,
+the lua mode is forced if luatex is detected, otherwise generic mode is used.
I implemented the generic mode first. Mostly because my \TeX\ skills are much
better than my lua skills and I wanted to get the \TeX\ side right before
@@ -238,16 +239,16 @@
it knows more structure types, it allows to add associated files to
structures---these are small, embedded files that can, for example, contain
the mathML or source code of an equation---, it knows structure destinations,
-which allows to link to a structure.
+which allows to link to a structure. It knows the MathML namespace.
-\PDF{}~2.0 features are currently (end of 2023) not well supported by
-\PDF~consumer. No PDF viewer (including Acrobat) for example can handle name
-spaces and associated files. The PDF Accessibility Checker (PAC) even crashes
-if one tries to load a \PDF{} 2.0 file, and pdftk will create a \PDF{}~1.0
-from it.
+\LaTeX{} therefore targets \PDF{} 2.0 and tagpdf has support for
+associated files, for name spaces and other \PDF{} 2.0 features.
-Nevertheless \LaTeX{} targets \PDF{} 2.0, tagpdf has added support for
-associated files, for name spaces and other \PDF{} 2.0 features. We recommend
+\PDF{}~2.0 features are currently (begin of 2025) still not well supported by
+\PDF~consumer, but some progress has been made. Foxit can handle MathML associated files
+and to some extend MathML structure elements and
+together with development versions of NVDA and MathCat reading of equations is already quite good. The PDF Accessibility Checker (PAC) no longer crashes
+if one tries to load a \PDF{} 2.0 file. We recommend
to use \PDF{} 2.0 if possible and then to complain to the PDF{} consumer if
something doesn't work.
@@ -261,7 +262,6 @@
\subsection{Validation}
-
\PDF{}'s created with the commands of this package must be validated:
\begin{itemize}
@@ -280,11 +280,9 @@
\end{itemize}
-Syntax validation and formal standard validation can be done for example with
-preflight of the (non-free) Adobe Acrobat. It can also be done
-(only for PDF 1.7 and older) also with the
-free \PDF{} Accessibility Checker (PAC~2024) \parencite{pac2024}. There is also
-the validator veraPDF \parencite{verapdf} which can also handle PDF 2.0 files.
+Syntax validation and formal standard validation can be done with the
+validator veraPDF \parencite{verapdf} which can also handle PDF 2.0 files.
+Other options (only for PDF 1.7 and older) are preflight of the (non-free) Adobe Acrobat and the free \PDF{} Accessibility Checker (PAC~2024) \parencite{pac2024}.
A quite useful tool
is \enquote{Next Generation PDF} \parencite{ngpdf}, a browser application
which converts a tagged PDF to html, allows to inspect its structure and also
@@ -291,6 +289,8 @@
to edit the structure. For PDF~2.0 files there is also a checker based on the
Arlington model from veraPDF.
+A tool developed by the \LaTeX{} team allows to extract the structure as XML and to validate it against a schema. This can be tested as \url{https://texlive.net/showtags}.
+
Practical validation is naturally the more complicated part.
It needs screen reader, users which actually knows how to handle them,
can test documents and can report where a \PDF{} has real accessibility problems.
@@ -302,7 +302,7 @@
As an example for an reason that I don't understand the adobe preflight
don't like the list structure \texttt{L}.
It is also possible that validators contradict: that the one says everything is okay,
-while the other complains.
+while the other complains. Generally when in doubt I recommend to use and trust verapdf.
\subsection{Examples wanted!}
@@ -444,19 +444,11 @@
The package has two different modes: The \textbf{generic mode} works
(in theory, currently only fully tested with pdflatex) probably with
all engines, the \textbf{lua mode} only with lualatex. The differences
-between both modes will be described later. The mode can be set with
-package options:
+between both modes will be described later.
-\DescribeKey{luamode}
+Starting with version 0.99m the mode is set automatically (lua mode for luatex, generic mode otherwise). The package options do nothing anymore and will be remove in future versions.
-This is the default mode. It will use the generic mode if the document
-is processed with pdflatex and the lua mode with lualatex.
-\DescribeKey{genericmode}
-
-This will force the generic mode for all engines.
-
-
\subsection{Setup and activation}\label{ssec:setup}
@@ -899,26 +891,7 @@
mark these text chunks correctly one has to analyze the code creating
such content to find suitable places to inject the literals.
- \item The literals are inserted directly and not at shipout. This means
- that due to the asynchronous page breaking of \TeX\ the MCID-number
- can be wrong even if the counter is reset at every page. This package
- uses in generic mode a label-ref-system to get around this problem.
- This sadly means that often at least three compilations are needed
- until everything has settled down.
-
- It can actually be worse: If the text is changed after the MCID-numbers
- have been assigned, and a new mc-chunk is inserted in the middle of the
- page, then all the numbers have to be recalculated and that requires
- again a number of compilations until it really settles down again.
- Internal references are especially problematic here, as the first
- compilation typically creates a non-link |??|, and only the second
- inserts the structure and the new mc. When the reference system in \LaTeX\
- will be extended, care will be taken to ensure that already the dummy
- text builds a chunk. Until then the advice is to first compile the
- document and resolve all cross-reference and to activate tagging only at
- the end.
-
-
+
\item There exist environments which process their content more than once
-- examples are \texttt{align} and \texttt{tabularx}.
So one has to check for doublets and holes in the counting system.
@@ -1869,6 +1842,11 @@
\item[\PrintKeyName{E}] 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).
+
+ \item[\PrintKeyName{phoneme}] This key sets the |/Phoneme| key, a pronunciation hint. The value should be a IPA text (the PDF spec
+ allows other variants but this not yet implemented).
+ This is a new key from PDF 2.0 but as far as I know not used by any
+ viewer.
\end{description}
\begin{docCommands}
@@ -3091,6 +3069,12 @@
Deprecated |\tag_start:|, |\tag_stop:|, |\tag_stop:n| and
|\tag_start:n| in favor of |\tag_suspend:n| and |\tag_resume:n|.
+
+\subsection{Changes in version 0.99m}
+
+Removed/deactivated package options |luamode| and |genericmode|.
+Added first support for pronunciation hints, the |phoneme| key.
+
\printbibliography[heading=bibintoc]
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-backend.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2025-01-12} {0.99l}
+\ProvidesExplFile {tagpdf-luatex.def} {2025-02-17} {0.99m}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -174,8 +174,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.99l", --TAGVERSION
- date = "2025-01-12", --TAGDATE
+ version = "0.99m", --TAGVERSION
+ date = "2025-02-17", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-checks.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -331,7 +331,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-checks-code} {2025-02-17} {0.99m}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -350,7 +350,7 @@
% \begin{macro}{mc-tag-missing}
% If the tag is missing
% \begin{macrocode}
-\msg_new:nnn { tag } {mc-tag-missing} { required~tag~missing~-~mcid~#1 }
+\msg_new:nnn { tag } {mc-tag-missing} { MC-tag~missing;~#1~used~instead~-~mcid~#2 }
% \end{macrocode}
% \end{macro}
% \begin{macro}{mc-label-unknown}
@@ -869,18 +869,23 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_check_mc_tag:N}
-% This checks if the mc has a (known) tag.
+% This checks if the mc has a (known) tag, if it is empty
+% (e.g. if due to a call to the output routine, see issue https://github.com/latex3/tagpdf/issues/111)
+% then we fall back to the structure name.
% \begin{macrocode}
\cs_new_protected:Npn \@@_check_mc_tag:N #1 %#1 is var with a tag name in it
{
- \tl_if_empty:NT #1
+ \tl_if_empty:NTF #1
{
- \msg_error:nne { tag } {mc-tag-missing} { \@@_get_mc_abs_cnt: }
+ \tl_set:No #1 { \g_@@_struct_tag_tl }
+ \msg_info:nnee { tag } {mc-tag-missing} { \g_@@_struct_tag_tl }{ \@@_get_mc_abs_cnt: }
}
- \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1}
- {
- \msg_warning:nne { tag } {role-unknown-tag} {#1}
- }
+ {
+ \prop_if_in:NoF \g_@@_role_tags_NS_prop {#1}
+ {
+ \msg_warning:nne { tag } {role-unknown-tag} {#1}
+ }
+ }
}
% \end{macrocode}
% \end{macro}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-data.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -61,7 +61,7 @@
% latex-lab has also a namespace module, which takes precedence!
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2025-02-17} {0.99m}
%% {latex} {https://www.latex-project.org/ns/dflt}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -93,7 +93,7 @@
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2025-02-17} {0.99m}
%% {latex-book} {https://www.latex-project.org/ns/book}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -107,7 +107,7 @@
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2025-02-17} {0.99m}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -175,7 +175,7 @@
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2025-02-17} {0.99m}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
StructTreeRoot,StructTreeRoot,pdf2,D,
Document,Document,pdf2,D,
@@ -232,7 +232,7 @@
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2025-02-17} {0.99m}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -467,7 +467,7 @@
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2025-02-17} {0.99m}
,,,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,∅,∅
@@ -522,7 +522,7 @@
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2025-02-17} {0.99m}
,,,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,∅
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-generic.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2025-02-17} {0.99m}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-debug-generic} {2025-02-17} {0.99m}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -544,89 +544,22 @@
% We also define a wrapper around the low-level command as luamode will need
% something different.
% \begin{macrocode}
-\bool_if:NTF\g_@@_delayed_shipout_bool
- {
- \hook_gput_code:nnn {shipout/before}{tagpdf}{ \flag_clear:n { @@/mcid } }
- \cs_set_protected:Npn \@@_mc_bdc_mcid:nn #1 #2
- {
- \int_gincr:N \c at g_@@_MCID_abs_int
- \@@_property_record:eV
- {
- mcid-\int_use:N \c at g_@@_MCID_abs_int
- }
- \c_@@_property_mc_clist
- \@@_mc_bdc_shipout:ee
- {#1}
- {
- /MCID~\flag_height:n { @@/mcid }
- \flag_raise:n { @@/mcid }~ #2
- }
+\hook_gput_code:nnn {shipout/before}{tagpdf}{ \flag_clear:n { @@/mcid } }
+\cs_set_protected:Npn \@@_mc_bdc_mcid:nn #1 #2
+ {
+ \int_gincr:N \c at g_@@_MCID_abs_int
+ \@@_property_record:eV
+ {
+ mcid-\int_use:N \c at g_@@_MCID_abs_int
+ }
+ \c_@@_property_mc_clist
+ \@@_mc_bdc_shipout:ee
+ {#1}
+ {
+ /MCID~\flag_height:n { @@/mcid }
+ \flag_raise:n { @@/mcid }~ #2
}
- }
-% \end{macrocode}
-% if the engine is too old, we have to revert to earlier method.
-% \begin{macrocode}
- {
- \msg_new:nnn { tagpdf } { old-engine }
- {
- The~engine~or~the~PDF management~is~too~old~or\\
- delayed~shipout~has~been~disabled.\\
- Fast~numbering~of~MC-chunks~not~available.\\
- More~compilations~will~be~needed~in~generic~mode.
- }
- \msg_warning:nn { tagpdf} { old-engine }
- \@@_prop_new:N \g_@@_MCID_byabspage_prop
- \int_new:N \g_@@_MCID_tmp_bypage_int
- \cs_generate_variant:Nn \@@_mc_bdc:nn {ne}
-% \end{macrocode}
-% revert the attribute:
-% \begin{macrocode}
- \property_gset:nnnn {tagmcid } { now }
- {0} { \int_use:N \g_@@_MCID_tmp_bypage_int }
- \cs_new_protected:Npn \@@_mc_bdc_mcid:nn #1 #2
- {
- \int_gincr:N \c at g_@@_MCID_abs_int
- \tl_set:Ne \l_@@_mc_ref_abspage_tl
- {
- \property_ref:enn %3 args
- {
- mcid-\int_use:N \c at g_@@_MCID_abs_int
- }
- { tagabspage }
- {-1}
- }
- \prop_get:NoNTF
- \g_@@_MCID_byabspage_prop
- {
- \l_@@_mc_ref_abspage_tl
- }
- \l_@@_mc_tmpa_tl
- {
- %key already present, use value for MCID and add 1 for the next
- \int_gset:Nn \g_@@_MCID_tmp_bypage_int { \l_@@_mc_tmpa_tl }
- \@@_prop_gput:Nee
- \g_@@_MCID_byabspage_prop
- { \l_@@_mc_ref_abspage_tl }
- { \int_eval:n {\l_@@_mc_tmpa_tl +1} }
- }
- {
- %key not present, set MCID to 0 and insert 1
- \int_gzero:N \g_@@_MCID_tmp_bypage_int
- \@@_prop_gput:Nee
- \g_@@_MCID_byabspage_prop
- { \l_@@_mc_ref_abspage_tl }
- {1}
- }
- \@@_property_record:eV
- {
- mcid-\int_use:N \c at g_@@_MCID_abs_int
- }
- \c_@@_property_mc_clist
- \@@_mc_bdc:ne
- {#1}
- { /MCID~\int_eval:n { \g_@@_MCID_tmp_bypage_int }~ \exp_not:n { #2 } }
- }
- }
+ }
\cs_new_protected:Npn \@@_mc_bdc_mcid:n #1
{
\@@_mc_bdc_mcid:nn {#1} {}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-luacode.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{implementation}
% The code is split into three parts: code shared by all engines,
@@ -86,11 +86,11 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2025-02-17} {0.99m}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-debug-lua} {2025-02-17} {0.99m}
{part of tagpdf - debugging code related to marking chunks - lua mode}
%</debug>
% \end{macrocode}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-mc-shared.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -207,7 +207,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2025-02-17} {0.99m}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-roles.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-roles-code} {2025-02-17} {0.99m}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-space.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% \begin{function}{activate/space (setup-key),interwordspace (deprecated)}
@@ -66,7 +66,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-space-code} {2025-02-17} {0.99m}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-struct.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -308,7 +308,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-struct-code} {2025-02-17} {0.99m}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -878,7 +878,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_struct_fill_kid_key:n #1 %#1 is the struct num
{
- \bool_if:NF\g_@@_mode_lua_bool
+ \bool_if:NF \g_@@_mode_lua_bool
{
\seq_clear:N \l_@@_tmpa_seq
\seq_map_inline:cn { g_@@_struct_kids_#1_seq }
@@ -904,7 +904,7 @@
{
% in this case we need a special command in
% luamode to get the array right. See issue #13
- \bool_if:NTF\g_@@_mode_lua_bool
+ \sys_if_engine_luatex:TF
{
\@@_struct_exchange_kid_command:c
{g_@@_struct_kids_#1_seq}
@@ -1229,7 +1229,8 @@
% actualtext,
% lang,
% ref,
-% E
+% E,
+% phoneme
% }
% \begin{macrocode}
\keys_define:nn { @@ / struct }
@@ -1320,6 +1321,21 @@
{ <\l_@@_tmpa_str>}
}
},
+ phoneme .code:n = % ActualText property
+ {
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l_@@_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \@@_struct_prop_gput:nne
+ { \int_use:N \c at g_@@_struct_abs_int }
+ { Phoneme }
+ { <\l_@@_tmpa_str>}
+ }
+ },
lang .code:n = % Lang property
{
\@@_struct_prop_gput:nne
@@ -2118,7 +2134,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-attr-code} {2025-02-17} {0.99m}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-tree.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-tree-code} {2025-02-17} {0.99m}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf-user.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -164,7 +164,7 @@
% |debug/structures| = \meta{structure number}
% \end{syntax}
% This key is available only if the tagpdf-debug package is loaded
-% and shows all structures starting with the one with the number
+% and shows all structures starting with the one with the number
% given by the key.
% \end{function}
@@ -195,13 +195,13 @@
% \begin{syntax}
% |para/tagging| = |true|\verb+|+|false|\\
% |debug/show=para|\\
-% |debug/show=paraOff|
+% |debug/show=paraOff|
% \end{syntax}
% The |para/tagging| key can be used in |\tagpdfsetup| and enable/disables tagging
% of paragraphics.
% |debug/show=para| puts small colored numbers at the begin and end of a paragraph.
% This is meant as a debugging help. The number are boxes and have a (tiny) height,
-% so they can affect typesetting.
+% so they can affect typesetting.
% \end{function}
%
% \begin{function}{\tagpdfparaOn,\tagpdfparaOff}
@@ -259,9 +259,9 @@
% { Contents }
% { (ref) }
% \end{verbatim}
-%
+%
% \section{Socket support}
-%
+%
% \begin{function}{\tag_socket_use:n,\tag_socket_use:nnn,\UseTaggingSocket}
% \begin{syntax}
% \cs{tag_socket_use:n} \Arg{socket name}\\
@@ -273,7 +273,7 @@
% \cs{UseTaggingSocket} \Arg{socket name} \Arg{socket argument} \Arg{socket argument}\\
% \end{syntax}
% \end{function}
-%
+%
% Given that we sometimes have to suspend tagging, it would be fairly
% inefficient to put different plugs into these sockets whenever that
% happens. We therefore offer \cs{UseTaggingSocket} which is like
@@ -290,8 +290,8 @@
% instead of changing the plugs of the tagging support sockets back and forth.
%
% Usually, these sockets have (beside the default plug defined for every socket)
-% one additional plug defined and directly assigned. This plug is used when
-% tagging is active.
+% one additional plug defined and directly assigned. This plug is used when
+% tagging is active.
% There may be more plugs, e.g., tagging with special debugging or special behaviour
% depending on the class or PDF version etc., but right now it is usually just on or off.
%
@@ -304,7 +304,7 @@
% \cs{UseSocket} directly, but in this case the socket remains active
% if e.g. \cs{SuspendTagging} is in force. There may be reasons for doing
% that but in general we expect to always use \cs{UseTaggingSocket}.
-%
+%
% For special cases like in some \cs{halign} contexts we need a fully expandable
% version of the commend. For these cases, \cs{UseExpandableTaggingSocket} can be
% used. To allow being expandable, it does not output any debugging information
@@ -311,7 +311,7 @@
% if \cs{DebugSocketsOn} is in effect and therefore should be avoided whenever possible.
%
% The L3 programming layer versions \cs{tag_socket_use_expandable:n}, \cs{tag_socket_use:n}, and
-% \cs{tag_socket_use:nn}, \cs{tag_socket_use:nnn}
+% \cs{tag_socket_use:nn}, \cs{tag_socket_use:nnn}
% are slightly more efficient than
% \cs{UseTaggingSocket} because they do not have to determine how
% many arguments the socket takes when disabling it.
@@ -322,7 +322,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-user} {2025-02-17} {0.99m}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -347,11 +347,11 @@
%<base>\cs_new_protected:Npn\tag_tool:n #1 {}
%<base>\cs_set_eq:NN\tagtool\tag_tool:n
%<*package>
-\cs_set_protected:Npn\tag_tool:n #1
+\cs_set_protected:Npn\tag_tool:n #1
{
- \tag_if_active:T { \keys_set:nn {tag / tool}{#1} }
+ \tag_if_active:T { \keys_set:nn {tag / tool}{#1} }
}
-\cs_set_eq:NN\tagtool\tag_tool:n
+\cs_set_eq:NN\tagtool\tag_tool:n
%</package>
% \end{macrocode}
% \end{macro}
@@ -448,7 +448,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\cs_set_protected:Npn \tag_socket_use:nn #1#2
+\cs_set_protected:Npn \tag_socket_use:nn #1#2
{
\bool_if:NT \l_@@_active_socket_bool
{ \socket_use:nn {tagsupport/#1} {#2} }
@@ -456,7 +456,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\cs_set_protected:Npn \tag_socket_use:nnn #1#2#3
+\cs_set_protected:Npn \tag_socket_use:nnn #1#2#3
{
\bool_if:NTF \l_@@_active_socket_bool
{ \socket_use:nnn {tagsupport/#1} {#2} {#3} }
@@ -464,7 +464,7 @@
}
% \end{macrocode}
% \begin{macrocode}
-\cs_set:Npn \tag_socket_use_expandable:n #1
+\cs_set:Npn \tag_socket_use_expandable:n #1
{
\bool_if:NT \l_@@_active_socket_bool
{ \socket_use_expandable:n {tagsupport/#1} }
@@ -471,7 +471,7 @@
}
% \end{macrocode}
% \begin{macrocode}
-\cs_set_protected:Npn \UseTaggingSocket #1
+\cs_set_protected:Npn \UseTaggingSocket #1
{
\bool_if:NTF \l_@@_active_socket_bool
{ \socket_use:nw {tagsupport/#1} }
@@ -493,7 +493,7 @@
% \end{macrocode}
% \begin{macrocode}
-\cs_set:Npn \UseExpandableTaggingSocket #1
+\cs_set:Npn \UseExpandableTaggingSocket #1
{
\bool_if:NTF \l_@@_active_socket_bool
{ \socket_use_expandable:nw {tagsupport/#1} }
@@ -512,7 +512,7 @@
\ERRORusetaggingsocket
}
}
-%</package>
+%</package>
% \end{macrocode}
% \end{macro}
%
@@ -540,7 +540,7 @@
{
mc-data .code:n =
{
- \sys_if_engine_luatex:T
+ \bool_if:NT \g_@@_mode_lua_bool
{
\lua_now:e{ltx.@@.trace.show_all_mc_data(#1,\@@_get_mc_abs_cnt:,0)}
}
@@ -556,61 +556,58 @@
\keys_define:nn { @@ / show }
{ mc-current .code:n =
{
- \bool_if:NTF \g_@@_mode_lua_bool
+ \bool_if:NTF \g_@@_mode_lua_bool
+ {
+ \int_compare:nNnTF
+ { -2147483647 }
+ =
+ {
+ \lua_now:e
+ {
+ tex.print
+ (tex.getattribute
+ (luatexbase.attributes.g_@@_mc_cnt_attr))
+ }
+ }
+ {
+ \lua_now:e
+ {
+ ltx.@@.trace.log
+ (
+ "mc-current:~no~MC~open,~current~abscnt
+ =\@@_get_mc_abs_cnt:"
+ ,0
+ )
+ texio.write_nl("")
+ }
+ }
+ {
+ \lua_now:e
+ {
+ ltx.@@.trace.log
+ (
+ "mc-current:~abscnt=\@@_get_mc_abs_cnt:=="
+ ..
+ tex.getattribute(luatexbase.attributes.g_@@_mc_cnt_attr)
+ ..
+ "~=>tag="
+ ..
+ tostring
+ (ltx.@@.func.get_tag_from
+ (tex.getattribute
+ (luatexbase.attributes.g_@@_mc_type_attr)))
+ ..
+ "="
+ ..
+ tex.getattribute
+ (luatexbase.attributes.g_@@_mc_type_attr)
+ ,0
+ )
+ texio.write_nl("")
+ }
+ }
+ }
{
- \sys_if_engine_luatex:T
- {
- \int_compare:nNnTF
- { -2147483647 }
- =
- {
- \lua_now:e
- {
- tex.print
- (tex.getattribute
- (luatexbase.attributes.g_@@_mc_cnt_attr))
- }
- }
- {
- \lua_now:e
- {
- ltx.@@.trace.log
- (
- "mc-current:~no~MC~open,~current~abscnt
- =\@@_get_mc_abs_cnt:"
- ,0
- )
- texio.write_nl("")
- }
- }
- {
- \lua_now:e
- {
- ltx.@@.trace.log
- (
- "mc-current:~abscnt=\@@_get_mc_abs_cnt:=="
- ..
- tex.getattribute(luatexbase.attributes.g_@@_mc_cnt_attr)
- ..
- "~=>tag="
- ..
- tostring
- (ltx.@@.func.get_tag_from
- (tex.getattribute
- (luatexbase.attributes.g_@@_mc_type_attr)))
- ..
- "="
- ..
- tex.getattribute
- (luatexbase.attributes.g_@@_mc_type_attr)
- ,0
- )
- texio.write_nl("")
- }
- }
- }
- }
- {
\msg_note:nn{ tag }{ mc-current }
}
}
@@ -676,44 +673,44 @@
,struct-stack / show .code:n = \seq_show:N \g_@@_struct_tag_stack_seq
,struct-stack .default:n = show
}
-%</package>
+%</package>
% \end{macrocode}
% \end{macro}
% \begin{macro}{debug/structures (show-key)}
% The following key is available only if the tagpdf-debug package is loaded
-% and shows all structures starting with the one with the number
+% and shows all structures starting with the one with the number
% given by the key.
% \begin{macrocode}
%<*debug>
\keys_define:nn { @@ / show }
{
- ,debug/structures .code:n =
+ ,debug/structures .code:n =
{
\int_step_inline:nnn{#1}{\c at g_@@_struct_abs_int}
{
- \msg_term:nneeee
+ \msg_term:nneeee
{ tag/debug } { show-struct }
{ ##1 }
- {
- \prop_map_function:cN
- {g_@@_struct_debug_##1_prop}
- \msg_show_item_unbraced:nn
+ {
+ \prop_map_function:cN
+ {g_@@_struct_debug_##1_prop}
+ \msg_show_item_unbraced:nn
}
{ } { }
- \msg_term:nneeee
+ \msg_term:nneeee
{ tag/debug } { show-kids }
{ ##1 }
- {
- \seq_map_function:cN
- {g_@@_struct_debug_kids_##1_seq}
+ {
+ \seq_map_function:cN
+ {g_@@_struct_debug_kids_##1_seq}
\msg_show_item_unbraced:n
}
- { } { }
+ { } { }
}
- }
+ }
,debug/structures .default:n = 1
}
-%</debug>
+%</debug>
% \end{macrocode}
% \end{macro}
%
@@ -723,7 +720,7 @@
% or do a first step to apply tagpdf commands to document commands.
% This part should be regularly revisited to check if the code should go to a
% better place or can be improved.
-%
+%
% \begin{macrocode}
%<*package>
% \end{macrocode}
@@ -737,26 +734,26 @@
\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf}{\tagstructend}
\keys_define:nn { @@ / setup}
- {
- activate/socket .bool_set:N = \l_@@_active_socket_bool,
+ {
+ activate/socket .bool_set:N = \l_@@_active_socket_bool,
activate .code:n =
{
\keys_set:nn { @@ / setup }
{ activate/mc,activate/tree,activate/struct,activate/socket }
- \tl_gset:Nn\g_@@_root_default_tl {#1}
+ \tl_gset:Nn\g_@@_root_default_tl {#1}
},
activate .default:n = Document
}
-
+
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Structure destinations}
% Since TeXlive 2022 pdftex and luatex offer support for structure destinations
% and the pdfmanagement has backend support for. We activate them if
% structures are actually created.
-% Structure destinations are actually PDF 2.0 only but they don't harm in
-% older PDF and can improve html export.
+% Structure destinations are actually PDF 2.0 only but they don't harm in
+% older PDF and can improve html export.
% \begin{macrocode}
\AddToHook{begindocument/before}
{
@@ -764,7 +761,7 @@
{ \g_@@_active_struct_dest_bool }
{ \g_@@_active_struct_bool }
{
- \tl_set:Nn \l_pdf_current_structure_destination_tl
+ \tl_set:Nn \l_pdf_current_structure_destination_tl
{ {@@/struct}{\g_@@_struct_stack_current_tl }}
\pdf_activate_indexed_structure_destination:
}
@@ -776,7 +773,7 @@
% We need a luatex variant for |\pdffakespace|. This should probably go into
% the kernel at some time. We also provide a no-op version for dvi mode
% \begin{macrocode}
-\sys_if_engine_luatex:T
+\bool_if:NT \g_@@_mode_lua_bool
{
\NewDocumentCommand\pdffakespace { }
{
@@ -783,7 +780,7 @@
\@@_fakespace:
}
}
-\providecommand\pdffakespace{}
+\providecommand\pdffakespace{}
% \end{macrocode}
% \end{macro}
%
@@ -833,7 +830,7 @@
% \begin{macrocode}
\tl_if_exist:NF \l_@@_para_attr_class_tl
{\tl_new:N \l_@@_para_attr_class_tl }
-\tl_new:N \l_@@_para_main_attr_class_tl
+\tl_new:N \l_@@_para_main_attr_class_tl
% \end{macrocode}
% \end{macro}
@@ -845,7 +842,7 @@
% \@@_gincr_para_end_int:
% }
% The global para counter should be set through commands so
-% that \cs{tag_stop:} can stop them.
+% that \cs{tag_stop:} can stop them.
% \begin{macrocode}
\cs_new_protected:Npn \@@_gincr_para_main_begin_int:
{
@@ -884,7 +881,7 @@
\cs_set_protected:Npn \@@_gincr_para_end_int:
{
\int_gincr:N \g_@@_para_end_int
- }
+ }
}
\cs_new_protected:Npn \@@_stop_para_ints:
{
@@ -892,47 +889,22 @@
\cs_set_eq:NN \@@_gincr_para_begin_int: \prg_do_nothing:
\cs_set_eq:NN \@@_gincr_para_main_end_int: \prg_do_nothing:
\cs_set_eq:NN \@@_gincr_para_end_int: \prg_do_nothing:
- }
+ }
% \end{macrocode}
% \end{macro}
%
-% We want to be able to inspect the current para main structure, so
+% We want to be able to inspect the current para main structure, so
% we need a command to store its structure number
% \begin{macro}{\@@_para_main_store_struct:}
% \begin{macrocode}
-\cs_new:Npn \@@_para_main_store_struct:
+\cs_new:Npn \@@_para_main_store_struct:
{
- \tl_gset:Ne \g_@@_para_main_struct_tl {\int_use:N \c at g_@@_struct_abs_int }
+ \tl_gset:Ne \g_@@_para_main_struct_tl {\int_use:N \c at g_@@_struct_abs_int }
}
% \end{macrocode}
% \end{macro}
-% TEMPORARY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command:
+% temporary adaption for the block module:
% \begin{macrocode}
-\AddToHook{package/latex-lab-testphase-sec/after}
- {
- \cs_set_protected:Npn \@kernel at tag@hangfrom #1
- {
- \tagstructbegin{tag=\l_@@_para_tag_tl}
- \@@_gincr_para_begin_int:
- \tagstructbegin{tag=Lbl}
- \setbox\@tempboxa
- \hbox
- {
- \bool_lazy_and:nnT
- {\tag_if_active_p:}
- {\g_@@_mode_lua_bool}
- {\tagmcbegin{tag=Lbl}}
- {#1}
- }
- \tag_suspend:n{hangfrom}
- \hangindent \wd\@tempboxa\noindent
- \tag_resume:n{hangfrom}
- \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}
- }
- }
-% \end{macrocode}
-% and one temporary adaptions for the block module:
-% \begin{macrocode}
\AddToHook{package/latex-lab-testphase-block/after}
{
\tl_if_exist:NT \l_tag_para_attr_class_tl
@@ -939,8 +911,7 @@
{
\tl_set:Nn \l_@@_para_attr_class_tl { \l_tag_para_attr_class_tl }
}
-}
-
+}
% \end{macrocode}
%\begin{macro}
% {
@@ -957,14 +928,14 @@
% paratagging-show (deprecated),
% paratag (deprecated),
% }
-% These keys enable/disable locally paratagging.
+% These keys enable/disable locally paratagging.
% Paragraphs are typically tagged with two structure: A main structure
% around the whole paragraph, and inner structures around the various chunks.
% Debugging can be
-% activated locally with |debug/show=para|, this can affect the typesetting
+% activated locally with |debug/show=para|, this can affect the typesetting
% as the small numbers
% are boxes and they have a (small) height. Debugging can be deactivated
-% with |debug/show=paraOff|
+% with |debug/show=paraOff|
% The |para/tag| key sets the tag used by
% the inner structure, |para/maintag| the tag of the outer structure,
% both can also be changed with |\tag_tool:n|
@@ -978,7 +949,7 @@
para/maintag .tl_set:N = \l_@@_para_main_tag_tl,
para/flattened .bool_set:N = \l_@@_para_flattened_bool
}
-\keys_define:nn { tag / tool}
+\keys_define:nn { tag / tool}
{
para/tagging .bool_set:N = \l_@@_para_bool,
para/tag .tl_set:N = \l_@@_para_tag_tl,
@@ -994,7 +965,7 @@
paratagging-show .bool_set:N = \l_@@_para_show_bool,
paratag .tl_set:N = \l_@@_para_tag_tl
}
-\keys_define:nn { tag / tool}
+\keys_define:nn { tag / tool}
{
para .bool_set:N = \l_@@_para_bool,
paratag .tl_set:N = \l_@@_para_tag_tl,
@@ -1003,13 +974,13 @@
}
% \end{macrocode}
% \end{macro}
-% Helper command for debugging:
+% Helper command for debugging:
% \begin{macrocode}
-\cs_new_protected:Npn \@@_check_para_begin_show:nn #1 #2
+\cs_new_protected:Npn \@@_check_para_begin_show:nn #1 #2
%#1 color, #2 prefix
{
\bool_if:NT \l_@@_para_show_bool
- {
+ {
\tag_mc_begin:n{artifact}
\llap{\color_select:n{#1}\tiny#2\int_use:N\g_@@_para_begin_int\ }
\tag_mc_end:
@@ -1020,7 +991,7 @@
%#1 color, #2 prefix
{
\bool_if:NT \l_@@_para_show_bool
- {
+ {
\tag_mc_begin:n{artifact}
\rlap{\color_select:n{#1}\tiny\ #2\int_use:N\g_@@_para_end_int}
\tag_mc_end:
@@ -1036,7 +1007,7 @@
% It is possible that we will need more variants, so
% we setup a socket so that the code can be easily switched.
% This code should move into lttagging, so we add a test for
-% the transition.
+% the transition.
% \begin{macrocode}
\str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str }
{
@@ -1054,13 +1025,13 @@
{
tag=\l_@@_para_main_tag_tl,
}
- \@@_para_main_store_struct:
+ \@@_para_main_store_struct:
}
\@@_gincr_para_begin_int:
\tag_struct_begin:n {tag=\l_@@_para_tag_tl}
\@@_check_para_begin_show:nn {green}{}
\tag_mc_begin:n {}
- }
+ }
}
\socket_new_plug:nnn{tagsupport/para/begin}{block}
{
@@ -1080,7 +1051,7 @@
tag=\l_@@_para_main_tag_tl,
attribute-class=\l_@@_para_main_attr_class_tl,
}
- \@@_para_main_store_struct:
+ \@@_para_main_store_struct:
}
}
\@@_gincr_para_begin_int:
@@ -1090,10 +1061,10 @@
tag=\l_@@_para_tag_tl
,attribute-class=\l_@@_para_attr_class_tl
}
- \@@_check_para_begin_show:nn {green}{\PARALABEL}
+ \@@_check_para_begin_show:nn {green}{\PARALABEL}
\tag_mc_begin:n {}
}
- }
+ }
}
% \end{macrocode}
% there was no real difference between the original and
@@ -1114,7 +1085,7 @@
\@@_gincr_para_main_end_int:
\tag_struct_end:
}
- }
+ }
}
}
% \end{macrocode}
@@ -1161,7 +1132,7 @@
\tag_if_active:F
{
\msg_redirect_name:nnn { tag } { para-hook-count-wrong } { warning }
- }
+ }
\int_compare:nNnF {\g_@@_para_main_begin_int}={\g_@@_para_main_end_int}
{
\msg_error:nneee
@@ -1179,20 +1150,20 @@
{\int_use:N\g_@@_para_begin_int}
{\int_use:N\g_@@_para_end_int}
{text}
- }
+ }
}
% \end{macrocode}
+% \subsection{output routine stuff}
% We need at least the new-or-1 code.
-% In generic mode we also must insert the code to finish the MC-chunks
+% In generic mode we also must insert the code to finish the MC-chunks
+% This part here can go in June 2025
% \begin{macrocode}
\@ifpackageloaded{footmisc}
{\PackageWarning{tagpdf}{tagpdf~has~been~loaded~too~late!}} %
{\RequirePackage{latex-lab-testphase-new-or-1}}
-
+
\AddToHook{begindocument/before}
{
- \providecommand\@kernel at tagsupport@@@@makecol{}
- \providecommand\@kernel at before@cclv{}
\bool_if:NF \g_@@_mode_lua_bool
{
\cs_if_exist:NT \@kernel at before@footins
@@ -1199,31 +1170,35 @@
{
\tl_put_right:Nn \@kernel at before@footins
{ \tag_mc_add_missing_to_stream:Nn \footins {footnote} }
- \tl_put_right:Nn \@kernel at before@cclv
- {
- \@@_check_typeout_v:n {====>~In~\token_to_str:N \@makecol\c_space_tl\the\c at page}
- \tag_mc_add_missing_to_stream:Nn \@cclv {main}
- }
\tl_put_right:Nn \@kernel at tagsupport@@@@makecol
{
\@@_check_typeout_v:n {====>~In~\token_to_str:N \@makecol\c_space_tl\the\c at page}
\tag_mc_add_missing_to_stream:Nn \@outputbox {main}
- }
- \tl_if_exist:NT \@mult at ptagging@hook
- {
- \tl_put_right:Nn \@mult at ptagging@hook
- {
- \@@_check_typeout_v:n {====>~In~\string\page at sofar}
- \process at cols\mult at firstbox
- {
- \tag_mc_add_missing_to_stream:Nn \count@ {multicol}
- }
- \tag_mc_add_missing_to_stream:Nn \mult at rightbox {multicol}
- }
- }
+ }
}
}
}
+
+% \end{macrocode}
+% If the new OR is there, we use it
+% \begin{macrocode}
+\str_if_exist:cT { l__socket_tagsupport/build/column/outputbox_plug_str }
+ {
+ \NewSocketPlug{tagsupport/build/column/outputbox}{tagpdf}
+ {
+ \@@_check_typeout_v:n { ====>~In~\token_to_str:N \@makecol
+ \c_space_tl\the\c at page }
+ \tag_mc_add_missing_to_stream:Nn \@outputbox {main}
+ }
+ \NewSocketPlug{tagsupport/build/column/footins}{tagpdf}
+ { \tag_mc_add_missing_to_stream:Nn \footins {footnote} }
+
+ \bool_if:NF \g_@@_mode_lua_bool
+ {
+ \AssignSocketPlug{tagsupport/build/column/outputbox}{tagpdf}
+ \AssignSocketPlug{tagsupport/build/column/footins}{tagpdf}
+ }
+ }
%</package>
% \end{macrocode}
% \begin{macro}
@@ -1265,7 +1240,7 @@
% \end{macrocode}
% \end{macro}
% \subsection{Language support}
-%
+%
% With the following key the lang variable is set. All structures in the current group will
% then set this lang variable.
% \begin{macro}{test/lang (setup-key)}
@@ -1287,7 +1262,9 @@
\cs_new_protected:Npn\@@_hook_kernel_after_head:{}
\cs_new_protected:Npn\@@_hook_kernel_before_foot:{}
\cs_new_protected:Npn\@@_hook_kernel_after_foot:{}
-
+% \end{macrocode}
+% This can go once the new OR is active (June 2025)
+% \begin{macrocode}
\AddToHook{begindocument}
{
\cs_if_exist:NT \@kernel at before@head
@@ -1298,7 +1275,31 @@
\tl_put_left:Nn \@kernel at after@foot {\@@_hook_kernel_after_foot:}
}
}
-
+% \end{macrocode}
+% If the new page sockets exist, we use them.
+% \begin{macrocode}
+\str_if_exist:cT { l__socket_tagsupport/build/page/footer_plug_str }
+ {
+ \NewSocketPlug{tagsupport/build/page/header}{tagpdf}
+ {
+ \@@_hook_kernel_before_head:
+ #2
+ \@@_hook_kernel_after_head:
+ }
+
+ \AssignSocketPlug{tagsupport/build/page/header}{tagpdf}
+ \NewSocketPlug{tagsupport/build/page/footer}{tagpdf}
+ {
+ \@@_hook_kernel_before_foot:
+ #2
+ \@@_hook_kernel_after_foot:
+ }
+ \AssignSocketPlug{tagsupport/build/page/footer}{tagpdf}
+ }
+
+% \end{macrocode}
+%
+% \begin{macrocode}
\bool_new:N \g_@@_saved_in_mc_bool
\cs_new_protected:Npn \@@_exclude_headfoot_begin:
{
Modified: branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx
===================================================================
--- branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/source/latex/tagpdf/tagpdf.dtx 2025-02-17 20:49:02 UTC (rev 74073)
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99l, released 2025-01-12}
+% \date{Version 0.99m, released 2025-02-17}
% \maketitle%
%
% \begin{documentation}
@@ -153,7 +153,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf} {2025-02-17} {0.99m}
{ LaTeX kernel code for PDF tagging }
\bool_if:nF
@@ -179,7 +179,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-debug} {2025-02-17} {0.99m}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -202,29 +202,18 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-base} {2025-02-17} {0.99m}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
%\section{Package options}
-% There are only two documented options to switch for luatex between generic and luamode,
-% TODO try to get rid of them.
-% The option \texttt{disabledelayedshipout} is only temporary to be able to debug
-% problem with the new shipout keyword if needed.
+% The boolean is kept for now for compability, can go in 2026.
% \begin{macrocode}
%<*package>
-\bool_new:N\g_@@_mode_lua_bool
-\bool_new:N\g_@@_delayed_shipout_bool
-\bool_lazy_and:nnT
- { \bool_if_exist_p:N \l__pdfmanagement_delayed_shipout_bool }
- { \l__pdfmanagement_delayed_shipout_bool }
- {
- \bool_gset_true:N\g_@@_delayed_shipout_bool
- }
-\DeclareOption {luamode} { \sys_if_engine_luatex:T { \bool_gset_true:N \g_@@_mode_lua_bool } }
-\DeclareOption {genericmode}{ \bool_gset_false:N\g_@@_mode_lua_bool }
-\DeclareOption {disabledelayedshipout}{ \bool_gset_false:N\g_@@_delayed_shipout_bool }
-\ExecuteOptions{luamode}
+\bool_new:N\g_@@_mode_lua_bool
+\sys_if_engine_luatex:T {\bool_gset_true:N \g_@@_mode_lua_bool}
+\DeclareOption {luamode} { }
+\DeclareOption {genericmode}{ }
\ProcessOptions
% \end{macrocode}
% \section{Packages}
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -25,7 +25,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-base} {2025-02-17} {0.99m}
{part of tagpdf - provide base, no-op versions of the user commands }
\cs_new_protected:Npn \__tag_whatsits: {}
\AddToHook{begindocument}
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-generic.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-debug-generic} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-debug-generic} {2025-02-17} {0.99m}
{part of tagpdf - debugging code related to marking chunks - generic mode}
\cs_set_protected:Npn \tag_mc_begin:n #1 %#1 keyval
{
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug-lua.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-debug-lua} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-debug-lua} {2025-02-17} {0.99m}
{part of tagpdf - debugging code related to marking chunks - lua mode}
\cs_set_protected:Npn \__tag_mc_handle_stash:n #1 %1 mcidnum
{
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-debug.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -26,7 +26,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-debug} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-debug} {2025-02-17} {0.99m}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
\prop_gput:Nnn \g_msg_module_type_prop { tag / debug} {}
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-backend.dtx
-\ProvidesExplFile {tagpdf-luatex.def} {2025-01-12} {0.99l}
+\ProvidesExplFile {tagpdf-luatex.def} {2025-02-17} {0.99m}
{tagpdf~driver~for~luatex}
{
\fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-generic.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-generic.dtx
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2025-02-17} {0.99m}
{part of tagpdf - code related to marking chunks - generic mode}
\tl_new:N \l__tag_mc_ref_abspage_tl
@@ -249,83 +249,22 @@
\cs_set_eq:NN \__tag_mc_emc: \pdf_emc:
\cs_set_eq:NN \__tag_mc_bdc:nn \pdf_bdc:nn
\cs_set_eq:NN \__tag_mc_bdc_shipout:ee \pdf_bdc_shipout:ee
-\bool_if:NTF\g__tag_delayed_shipout_bool
+\hook_gput_code:nnn {shipout/before}{tagpdf}{ \flag_clear:n { __tag/mcid } }
+\cs_set_protected:Npn \__tag_mc_bdc_mcid:nn #1 #2
{
- \hook_gput_code:nnn {shipout/before}{tagpdf}{ \flag_clear:n { __tag/mcid } }
- \cs_set_protected:Npn \__tag_mc_bdc_mcid:nn #1 #2
+ \int_gincr:N \c at g__tag_MCID_abs_int
+ \__tag_property_record:eV
+ {
+ mcid-\int_use:N \c at g__tag_MCID_abs_int
+ }
+ \c__tag_property_mc_clist
+ \__tag_mc_bdc_shipout:ee
+ {#1}
{
- \int_gincr:N \c at g__tag_MCID_abs_int
- \__tag_property_record:eV
- {
- mcid-\int_use:N \c at g__tag_MCID_abs_int
- }
- \c__tag_property_mc_clist
- \__tag_mc_bdc_shipout:ee
- {#1}
- {
- /MCID~\flag_height:n { __tag/mcid }
- \flag_raise:n { __tag/mcid }~ #2
- }
+ /MCID~\flag_height:n { __tag/mcid }
+ \flag_raise:n { __tag/mcid }~ #2
}
}
- {
- \msg_new:nnn { tagpdf } { old-engine }
- {
- The~engine~or~the~PDF management~is~too~old~or\\
- delayed~shipout~has~been~disabled.\\
- Fast~numbering~of~MC-chunks~not~available.\\
- More~compilations~will~be~needed~in~generic~mode.
- }
- \msg_warning:nn { tagpdf} { old-engine }
- \__tag_prop_new:N \g__tag_MCID_byabspage_prop
- \int_new:N \g__tag_MCID_tmp_bypage_int
- \cs_generate_variant:Nn \__tag_mc_bdc:nn {ne}
- \property_gset:nnnn {tagmcid } { now }
- {0} { \int_use:N \g__tag_MCID_tmp_bypage_int }
- \cs_new_protected:Npn \__tag_mc_bdc_mcid:nn #1 #2
- {
- \int_gincr:N \c at g__tag_MCID_abs_int
- \tl_set:Ne \l__tag_mc_ref_abspage_tl
- {
- \property_ref:enn %3 args
- {
- mcid-\int_use:N \c at g__tag_MCID_abs_int
- }
- { tagabspage }
- {-1}
- }
- \prop_get:NoNTF
- \g__tag_MCID_byabspage_prop
- {
- \l__tag_mc_ref_abspage_tl
- }
- \l__tag_mc_tmpa_tl
- {
- %key already present, use value for MCID and add 1 for the next
- \int_gset:Nn \g__tag_MCID_tmp_bypage_int { \l__tag_mc_tmpa_tl }
- \__tag_prop_gput:Nee
- \g__tag_MCID_byabspage_prop
- { \l__tag_mc_ref_abspage_tl }
- { \int_eval:n {\l__tag_mc_tmpa_tl +1} }
- }
- {
- %key not present, set MCID to 0 and insert 1
- \int_gzero:N \g__tag_MCID_tmp_bypage_int
- \__tag_prop_gput:Nee
- \g__tag_MCID_byabspage_prop
- { \l__tag_mc_ref_abspage_tl }
- {1}
- }
- \__tag_property_record:eV
- {
- mcid-\int_use:N \c at g__tag_MCID_abs_int
- }
- \c__tag_property_mc_clist
- \__tag_mc_bdc:ne
- {#1}
- { /MCID~\int_eval:n { \g__tag_MCID_tmp_bypage_int }~ \exp_not:n { #2 } }
- }
- }
\cs_new_protected:Npn \__tag_mc_bdc_mcid:n #1
{
\__tag_mc_bdc_mcid:nn {#1} {}
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2025-02-17} {0.99m}
{tagpdf - mc code only for the luamode }
\hook_gput_code:nnn{begindocument}{tagpdf/mc}
{
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex-book.def 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2025-02-17} {0.99m}
%% {latex-book} {https://www.latex-project.org/ns/book}{}
chapter, H1,pdf2,
section, H2,pdf2,
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-latex.def 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2025-02-17} {0.99m}
%% {latex} {https://www.latex-project.org/ns/dflt}{}
title, Title, pdf2,
part, Title, pdf2,
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-mathml.def 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2025-02-17} {0.99m}
abs,abs,mathml,
and,and,mathml,
annotation,annotation,mathml,
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf.def 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2025-02-17} {0.99m}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-ns-pdf2.def 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2025-02-17} {0.99m}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
StructTreeRoot,StructTreeRoot,pdf2,D,
Document,Document,pdf2,D,
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child-2.csv 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2025-02-17} {0.99m}
,,,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,∅
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf-parent-child.csv 2025-02-17 20:49:02 UTC (rev 74073)
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf-data.dtx
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2025-01-12} {0.99l}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2025-02-17} {0.99m}
,,,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,∅,∅
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.lua 2025-02-17 20:49:02 UTC (rev 74073)
@@ -24,8 +24,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.99l", --TAGVERSION
- date = "2025-01-12", --TAGDATE
+ version = "0.99m", --TAGVERSION
+ date = "2025-02-17", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdf.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -28,7 +28,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdf} {2025-02-17} {0.99m}
{ LaTeX kernel code for PDF tagging }
\bool_if:nF
@@ -52,17 +52,9 @@
}
\prop_gput:Nnn \g_msg_module_name_prop { tag }{ tagpdf }
\bool_new:N\g__tag_mode_lua_bool
-\bool_new:N\g__tag_delayed_shipout_bool
-\bool_lazy_and:nnT
- { \bool_if_exist_p:N \l__pdfmanagement_delayed_shipout_bool }
- { \l__pdfmanagement_delayed_shipout_bool }
- {
- \bool_gset_true:N\g__tag_delayed_shipout_bool
- }
-\DeclareOption {luamode} { \sys_if_engine_luatex:T { \bool_gset_true:N \g__tag_mode_lua_bool } }
-\DeclareOption {genericmode}{ \bool_gset_false:N\g__tag_mode_lua_bool }
-\DeclareOption {disabledelayedshipout}{ \bool_gset_false:N\g__tag_delayed_shipout_bool }
-\ExecuteOptions{luamode}
+\sys_if_engine_luatex:T {\bool_gset_true:N \g__tag_mode_lua_bool}
+\DeclareOption {luamode} { }
+\DeclareOption {genericmode}{ }
\ProcessOptions
\RequirePackage{tagpdf-base}
\AddToHook{package/latex-lab-testphase-new-or-2/after}
@@ -289,7 +281,7 @@
%% File: tagpdf-checks.dtx
\msg_new:nnn { tag } {mc-nested} { nested~marked~content~found~-~mcid~#1 }
-\msg_new:nnn { tag } {mc-tag-missing} { required~tag~missing~-~mcid~#1 }
+\msg_new:nnn { tag } {mc-tag-missing} { MC-tag~missing;~#1~used~instead~-~mcid~#2 }
\msg_new:nnn { tag } {mc-label-unknown}
{ label~#1~unknown~or~has~been~already~used.\\
Either~rerun~or~remove~one~of~the~uses. }
@@ -509,14 +501,17 @@
}
\cs_new_protected:Npn \__tag_check_mc_tag:N #1 %#1 is var with a tag name in it
{
- \tl_if_empty:NT #1
+ \tl_if_empty:NTF #1
{
- \msg_error:nne { tag } {mc-tag-missing} { \__tag_get_mc_abs_cnt: }
+ \tl_set:No #1 { \g__tag_struct_tag_tl }
+ \msg_info:nnee { tag } {mc-tag-missing} { \g__tag_struct_tag_tl }{ \__tag_get_mc_abs_cnt: }
}
- \prop_if_in:NoF \g__tag_role_tags_NS_prop {#1}
- {
- \msg_warning:nne { tag } {role-unknown-tag} {#1}
- }
+ {
+ \prop_if_in:NoF \g__tag_role_tags_NS_prop {#1}
+ {
+ \msg_warning:nne { tag } {role-unknown-tag} {#1}
+ }
+ }
}
\cs_new_protected:Npn \__tag_check_init_mc_used:
{
@@ -2180,7 +2175,7 @@
\cs_generate_variant:Nn\__tag_struct_exchange_kid_command:N { c }
\cs_new_protected:Npn \__tag_struct_fill_kid_key:n #1 %#1 is the struct num
{
- \bool_if:NF\g__tag_mode_lua_bool
+ \bool_if:NF \g__tag_mode_lua_bool
{
\seq_clear:N \l__tag_tmpa_seq
\seq_map_inline:cn { g__tag_struct_kids_#1_seq }
@@ -2206,7 +2201,7 @@
{
% in this case we need a special command in
% luamode to get the array right. See issue #13
- \bool_if:NTF\g__tag_mode_lua_bool
+ \sys_if_engine_luatex:TF
{
\__tag_struct_exchange_kid_command:c
{g__tag_struct_kids_#1_seq}
@@ -2485,6 +2480,21 @@
{ <\l__tag_tmpa_str>}
}
},
+ phoneme .code:n = % ActualText property
+ {
+ \tl_if_empty:oF{#1}
+ {
+ \str_set_convert:Noon
+ \l__tag_tmpa_str
+ { #1 }
+ { default }
+ { utf16/hex }
+ \__tag_struct_prop_gput:nne
+ { \int_use:N \c at g__tag_struct_abs_int }
+ { Phoneme }
+ { <\l__tag_tmpa_str>}
+ }
+ },
lang .code:n = % Lang property
{
\__tag_struct_prop_gput:nne
@@ -3345,7 +3355,7 @@
{
mc-data .code:n =
{
- \sys_if_engine_luatex:T
+ \bool_if:NT \g__tag_mode_lua_bool
{
\lua_now:e{ltx.__tag.trace.show_all_mc_data(#1,\__tag_get_mc_abs_cnt:,0)}
}
@@ -3356,61 +3366,58 @@
\keys_define:nn { __tag / show }
{ mc-current .code:n =
{
- \bool_if:NTF \g__tag_mode_lua_bool
+ \bool_if:NTF \g__tag_mode_lua_bool
+ {
+ \int_compare:nNnTF
+ { -2147483647 }
+ =
+ {
+ \lua_now:e
+ {
+ tex.print
+ (tex.getattribute
+ (luatexbase.attributes.g__tag_mc_cnt_attr))
+ }
+ }
+ {
+ \lua_now:e
+ {
+ ltx.__tag.trace.log
+ (
+ "mc-current:~no~MC~open,~current~abscnt
+ =\__tag_get_mc_abs_cnt:"
+ ,0
+ )
+ texio.write_nl("")
+ }
+ }
+ {
+ \lua_now:e
+ {
+ ltx.__tag.trace.log
+ (
+ "mc-current:~abscnt=\__tag_get_mc_abs_cnt:=="
+ ..
+ tex.getattribute(luatexbase.attributes.g__tag_mc_cnt_attr)
+ ..
+ "~=>tag="
+ ..
+ tostring
+ (ltx.__tag.func.get_tag_from
+ (tex.getattribute
+ (luatexbase.attributes.g__tag_mc_type_attr)))
+ ..
+ "="
+ ..
+ tex.getattribute
+ (luatexbase.attributes.g__tag_mc_type_attr)
+ ,0
+ )
+ texio.write_nl("")
+ }
+ }
+ }
{
- \sys_if_engine_luatex:T
- {
- \int_compare:nNnTF
- { -2147483647 }
- =
- {
- \lua_now:e
- {
- tex.print
- (tex.getattribute
- (luatexbase.attributes.g__tag_mc_cnt_attr))
- }
- }
- {
- \lua_now:e
- {
- ltx.__tag.trace.log
- (
- "mc-current:~no~MC~open,~current~abscnt
- =\__tag_get_mc_abs_cnt:"
- ,0
- )
- texio.write_nl("")
- }
- }
- {
- \lua_now:e
- {
- ltx.__tag.trace.log
- (
- "mc-current:~abscnt=\__tag_get_mc_abs_cnt:=="
- ..
- tex.getattribute(luatexbase.attributes.g__tag_mc_cnt_attr)
- ..
- "~=>tag="
- ..
- tostring
- (ltx.__tag.func.get_tag_from
- (tex.getattribute
- (luatexbase.attributes.g__tag_mc_type_attr)))
- ..
- "="
- ..
- tex.getattribute
- (luatexbase.attributes.g__tag_mc_type_attr)
- ,0
- )
- texio.write_nl("")
- }
- }
- }
- }
- {
\msg_note:nn{ tag }{ mc-current }
}
}
@@ -3495,7 +3502,7 @@
}
}
-\sys_if_engine_luatex:T
+\bool_if:NT \g__tag_mode_lua_bool
{
\NewDocumentCommand\pdffakespace { }
{
@@ -3565,28 +3572,6 @@
{
\tl_gset:Ne \g__tag_para_main_struct_tl {\int_use:N \c at g__tag_struct_abs_int }
}
-\AddToHook{package/latex-lab-testphase-sec/after}
- {
- \cs_set_protected:Npn \@kernel at tag@hangfrom #1
- {
- \tagstructbegin{tag=\l__tag_para_tag_tl}
- \__tag_gincr_para_begin_int:
- \tagstructbegin{tag=Lbl}
- \setbox\@tempboxa
- \hbox
- {
- \bool_lazy_and:nnT
- {\tag_if_active_p:}
- {\g__tag_mode_lua_bool}
- {\tagmcbegin{tag=Lbl}}
- {#1}
- }
- \tag_suspend:n{hangfrom}
- \hangindent \wd\@tempboxa\noindent
- \tag_resume:n{hangfrom}
- \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}
- }
- }
\AddToHook{package/latex-lab-testphase-block/after}
{
\tl_if_exist:NT \l_tag_para_attr_class_tl
@@ -3594,7 +3579,6 @@
\tl_set:Nn \l__tag_para_attr_class_tl { \l_tag_para_attr_class_tl }
}
}
-
\keys_define:nn { __tag / setup }
{
para/tagging .bool_set:N = \l__tag_para_bool,
@@ -3770,8 +3754,6 @@
\AddToHook{begindocument/before}
{
- \providecommand\@kernel at tagsupport@@makecol{}
- \providecommand\@kernel at before@cclv{}
\bool_if:NF \g__tag_mode_lua_bool
{
\cs_if_exist:NT \@kernel at before@footins
@@ -3778,31 +3760,32 @@
{
\tl_put_right:Nn \@kernel at before@footins
{ \tag_mc_add_missing_to_stream:Nn \footins {footnote} }
- \tl_put_right:Nn \@kernel at before@cclv
- {
- \__tag_check_typeout_v:n {====>~In~\token_to_str:N \@makecol\c_space_tl\the\c at page}
- \tag_mc_add_missing_to_stream:Nn \@cclv {main}
- }
\tl_put_right:Nn \@kernel at tagsupport@@makecol
{
\__tag_check_typeout_v:n {====>~In~\token_to_str:N \@makecol\c_space_tl\the\c at page}
\tag_mc_add_missing_to_stream:Nn \@outputbox {main}
}
- \tl_if_exist:NT \@mult at ptagging@hook
- {
- \tl_put_right:Nn \@mult at ptagging@hook
- {
- \__tag_check_typeout_v:n {====>~In~\string\page at sofar}
- \process at cols\mult at firstbox
- {
- \tag_mc_add_missing_to_stream:Nn \count@ {multicol}
- }
- \tag_mc_add_missing_to_stream:Nn \mult at rightbox {multicol}
- }
- }
}
}
}
+
+\str_if_exist:cT { l__socket_tagsupport/build/column/outputbox_plug_str }
+ {
+ \NewSocketPlug{tagsupport/build/column/outputbox}{tagpdf}
+ {
+ \__tag_check_typeout_v:n { ====>~In~\token_to_str:N \@makecol
+ \c_space_tl\the\c at page }
+ \tag_mc_add_missing_to_stream:Nn \@outputbox {main}
+ }
+ \NewSocketPlug{tagsupport/build/column/footins}{tagpdf}
+ { \tag_mc_add_missing_to_stream:Nn \footins {footnote} }
+
+ \bool_if:NF \g__tag_mode_lua_bool
+ {
+ \AssignSocketPlug{tagsupport/build/column/outputbox}{tagpdf}
+ \AssignSocketPlug{tagsupport/build/column/footins}{tagpdf}
+ }
+ }
\renewcommand\tagpdfparaOn {\bool_set_true:N \l__tag_para_bool}
\renewcommand\tagpdfparaOff{\bool_set_false:N \l__tag_para_bool}
\NewDocumentCommand\tagpdfsuppressmarks{m}
@@ -3815,7 +3798,6 @@
\cs_new_protected:Npn\__tag_hook_kernel_after_head:{}
\cs_new_protected:Npn\__tag_hook_kernel_before_foot:{}
\cs_new_protected:Npn\__tag_hook_kernel_after_foot:{}
-
\AddToHook{begindocument}
{
\cs_if_exist:NT \@kernel at before@head
@@ -3826,7 +3808,25 @@
\tl_put_left:Nn \@kernel at after@foot {\__tag_hook_kernel_after_foot:}
}
}
+\str_if_exist:cT { l__socket_tagsupport/build/page/footer_plug_str }
+ {
+ \NewSocketPlug{tagsupport/build/page/header}{tagpdf}
+ {
+ \__tag_hook_kernel_before_head:
+ #2
+ \__tag_hook_kernel_after_head:
+ }
+ \AssignSocketPlug{tagsupport/build/page/header}{tagpdf}
+ \NewSocketPlug{tagsupport/build/page/footer}{tagpdf}
+ {
+ \__tag_hook_kernel_before_foot:
+ #2
+ \__tag_hook_kernel_after_foot:
+ }
+ \AssignSocketPlug{tagsupport/build/page/footer}{tagpdf}
+ }
+
\bool_new:N \g__tag_saved_in_mc_bool
\cs_new_protected:Npn \__tag_exclude_headfoot_begin:
{
Modified: branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty
===================================================================
--- branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty 2025-02-17 20:48:45 UTC (rev 74072)
+++ branches/branch2024.final/Master/texmf-dist/tex/latex/tagpdf/tagpdfdocu-patches.sty 2025-02-17 20:49:02 UTC (rev 74073)
@@ -1,5 +1,5 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2025-01-12} {0.99l}
+\ProvidesExplPackage {tagpdfdocu-patches} {2025-02-17} {0.99m}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
More information about the tex-live-commits
mailing list.