[latex3-commits] [latex3/latex2e] UF-latex-lab-luamml: update tagpdf/luamml to dev versions (a33139f1a)

github at latex-project.org github at latex-project.org
Fri Nov 29 14:17:37 CET 2024


Repository : https://github.com/latex3/latex2e
On branch  : UF-latex-lab-luamml
Link       : https://github.com/latex3/latex2e/commit/a33139f1a7d20873c9d1ad00f33a811904722a3e

>---------------------------------------------------------------

commit a33139f1a7d20873c9d1ad00f33a811904722a3e
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Nov 29 14:17:37 2024 +0100

    update tagpdf/luamml to dev versions


>---------------------------------------------------------------

a33139f1a7d20873c9d1ad00f33a811904722a3e
 .../latex-lab/testfiles-math-luatex/fakemath.tpf   | 176 ++++++++++-----------
 .../testfiles-math-luatex/mathml-luamml-1.tlg      |  52 ++----
 .../testfiles-math-luatex/mathml-luamml-2.tpf      | 162 +++++++++----------
 .../testfiles-math-luatex/mathml-luamml-3.tpf      | 138 ++++++++--------
 texmf/tex/latex/tagpdf/tagpdf-base.sty             |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty    |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty        |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-debug.sty            |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-luatex.def           |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty  |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty      |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def    |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-latex.def         |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def        |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def           |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def          |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv   |   2 +-
 texmf/tex/latex/tagpdf/tagpdf-parent-child.csv     |   2 +-
 texmf/tex/latex/tagpdf/tagpdf.lua                  |  28 +++-
 texmf/tex/latex/tagpdf/tagpdf.sty                  |   2 +-
 .../lualatex/luamml/luamml-structelemwriter.lua    |  12 +-
 texmf/tex/lualatex/luamml/luamml-tex-annotate.lua  |  12 ++
 texmf/tex/lualatex/luamml/luamml-xmlwriter.lua     |   4 +
 23 files changed, 317 insertions(+), 297 deletions(-)

diff --git a/required/latex-lab/testfiles-math-luatex/fakemath.tpf b/required/latex-lab/testfiles-math-luatex/fakemath.tpf
index 49ac46f23..a1822aed3 100644
--- a/required/latex-lab/testfiles-math-luatex/fakemath.tpf
+++ b/required/latex-lab/testfiles-math-luatex/fakemath.tpf
@@ -1,18 +1,18 @@
 %PDF-2.0
 %���������
 22 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 136 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 130 >>        
 stream
-<math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> 𝑎 </mi> <mo lspace="0.278em" rspace="0.278em"> = </mo> <mi> 𝑏 </mi> </math>
+<math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>𝑎</mi> <mo lspace="0.278em" rspace="0.278em">=</mo> <mi>𝑏</mi> </math>
 endstream
 endobj
 23 0 obj
 << /Type /Filespec /AFRelationship /Supplement /Desc (mathml-1) /F (mathml-1.xml) /UF <FEFF006D006100740068006D006C002D0031002E0078006D006C> /EF<</F 22 0 R/UF 22 0 R>> >>
 endobj
 24 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 341 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 327 >>        
 stream
-<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <mo lspace="0" rspace="0"/> <mi> 𝑥 </mi> <mo lspace="0.278em" rspace="0"> = </mo> <mo lspace="0.278em" rspace="0.167em"> R </mo> <mi> 𝑓 </mi> <mo lspace="0" rspace="0" stretchy="false"> ( </mo> <mi> 𝑦 </mi> <mo lspace="0" rspace="0" stretchy="false"> ) </mo> </math>
+<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <mo lspace="0" rspace="0"/> <mi>𝑥</mi> <mo lspace="0.278em" rspace="0">=</mo> <mo lspace="0.278em" rspace="0.167em">R</mo> <mi>𝑓</mi> <mo lspace="0" rspace="0" stretchy="false">(</mo> <mi>𝑦</mi> <mo lspace="0" rspace="0" stretchy="false">)</mo> </math>
 endstream
 endobj
 25 0 obj
@@ -1130,99 +1130,99 @@ endobj
 xref
 0 92
 0000000002 65535 f 
-0000015572 00000 n 
+0000015552 00000 n 
 0000000003 00000 f 
 0000000004 00000 f 
 0000000010 00000 f 
-0000021461 00000 n 
-0000015721 00000 n 
-0000016328 00000 n 
-0000018437 00000 n 
-0000017062 00000 n 
+0000021441 00000 n 
+0000015701 00000 n 
+0000016308 00000 n 
+0000018417 00000 n 
+0000017042 00000 n 
 0000000012 00000 f 
-0000017130 00000 n 
+0000017110 00000 n 
 0000000014 00000 f 
-0000017200 00000 n 
+0000017180 00000 n 
 0000000020 00000 f 
-0000017963 00000 n 
-0000017281 00000 n 
-0000018241 00000 n 
-0000018070 00000 n 
-0000018348 00000 n 
+0000017943 00000 n 
+0000017261 00000 n 
+0000018221 00000 n 
+0000018050 00000 n 
+0000018328 00000 n 
 0000000000 00000 f 
-0000018498 00000 n 
+0000018478 00000 n 
 0000000020 00000 n 
-0000000305 00000 n 
-0000000492 00000 n 
-0000000982 00000 n 
-0000018612 00000 n 
-0000018700 00000 n 
-0000018788 00000 n 
-0000018888 00000 n 
-0000019023 00000 n 
-0000019123 00000 n 
-0000019234 00000 n 
-0000001169 00000 n 
-0000001317 00000 n 
-0000019426 00000 n 
-0000019537 00000 n 
-0000019658 00000 n 
-0000001517 00000 n 
-0000019790 00000 n 
-0000019911 00000 n 
-0000020011 00000 n 
-0000001588 00000 n 
-0000001774 00000 n 
-0000020194 00000 n 
-0000020317 00000 n 
-0000001974 00000 n 
-0000020474 00000 n 
-0000002028 00000 n 
-0000020568 00000 n 
-0000020689 00000 n 
-0000002087 00000 n 
-0000020821 00000 n 
-0000002152 00000 n 
-0000020953 00000 n 
-0000021074 00000 n 
-0000002223 00000 n 
-0000021206 00000 n 
-0000021328 00000 n 
-0000002298 00000 n 
-0000015473 00000 n 
-0000015338 00000 n 
-0000014078 00000 n 
-0000065233 00000 n 
-0000066993 00000 n 
-0000063290 00000 n 
-0000061547 00000 n 
-0000067152 00000 n 
-0000015619 00000 n 
-0000015655 00000 n 
-0000015848 00000 n 
-0000016291 00000 n 
-0000016920 00000 n 
-0000021598 00000 n 
-0000021623 00000 n 
-0000021712 00000 n 
-0000021919 00000 n 
-0000029498 00000 n 
-0000021996 00000 n 
-0000038198 00000 n 
-0000029702 00000 n 
-0000046250 00000 n 
-0000038406 00000 n 
-0000058030 00000 n 
-0000046455 00000 n 
-0000058234 00000 n 
-0000061705 00000 n 
-0000063449 00000 n 
-0000065390 00000 n 
-0000067214 00000 n 
-0000067258 00000 n 
-0000067387 00000 n 
+0000000299 00000 n 
+0000000486 00000 n 
+0000000962 00000 n 
+0000018592 00000 n 
+0000018680 00000 n 
+0000018768 00000 n 
+0000018868 00000 n 
+0000019003 00000 n 
+0000019103 00000 n 
+0000019214 00000 n 
+0000001149 00000 n 
+0000001297 00000 n 
+0000019406 00000 n 
+0000019517 00000 n 
+0000019638 00000 n 
+0000001497 00000 n 
+0000019770 00000 n 
+0000019891 00000 n 
+0000019991 00000 n 
+0000001568 00000 n 
+0000001754 00000 n 
+0000020174 00000 n 
+0000020297 00000 n 
+0000001954 00000 n 
+0000020454 00000 n 
+0000002008 00000 n 
+0000020548 00000 n 
+0000020669 00000 n 
+0000002067 00000 n 
+0000020801 00000 n 
+0000002132 00000 n 
+0000020933 00000 n 
+0000021054 00000 n 
+0000002203 00000 n 
+0000021186 00000 n 
+0000021308 00000 n 
+0000002278 00000 n 
+0000015453 00000 n 
+0000015318 00000 n 
+0000014058 00000 n 
+0000065213 00000 n 
+0000066973 00000 n 
+0000063270 00000 n 
+0000061527 00000 n 
+0000067132 00000 n 
+0000015599 00000 n 
+0000015635 00000 n 
+0000015828 00000 n 
+0000016271 00000 n 
+0000016900 00000 n 
+0000021578 00000 n 
+0000021603 00000 n 
+0000021692 00000 n 
+0000021899 00000 n 
+0000029478 00000 n 
+0000021976 00000 n 
+0000038178 00000 n 
+0000029682 00000 n 
+0000046230 00000 n 
+0000038386 00000 n 
+0000058010 00000 n 
+0000046435 00000 n 
+0000058214 00000 n 
+0000061685 00000 n 
+0000063429 00000 n 
+0000065370 00000 n 
+0000067194 00000 n 
+0000067238 00000 n 
+0000067367 00000 n 
 trailer
 << /Size 92 /Root 90 0 R /Info 91 0 R /ID [ <2350CAD05F8A7AF0AA4058486855344F> <2350CAD05F8A7AF0AA4058486855344F> ] >>
 startxref
-67519
+67499
 %%EOF
diff --git a/required/latex-lab/testfiles-math-luatex/mathml-luamml-1.tlg b/required/latex-lab/testfiles-math-luatex/mathml-luamml-1.tlg
index fe01eed7b..d2c90def5 100644
--- a/required/latex-lab/testfiles-math-luatex/mathml-luamml-1.tlg
+++ b/required/latex-lab/testfiles-math-luatex/mathml-luamml-1.tlg
@@ -13,26 +13,14 @@ Don't change this file in any respect.
  <mo lspace="0" rspace="0"/>^^M
  <msqrt>^^M
  <msup>^^M
- <mi>^^M
- 𝑥^^M
- </mi>^^M
- <mn>^^M
- 2^^M
- </mn>^^M
+ <mi>𝑥</mi>^^M
+ <mn>2</mn>^^M
  </msup>^^M
  </msqrt>^^M
- <mo lspace="0.278em" rspace="0">^^M
- =^^M
- </mo>^^M
- <mo lspace="0.278em" rspace="0" stretchy="false">^^M
- |^^M
- </mo>^^M
- <mi>^^M
- 𝑥^^M
- </mi>^^M
- <mo lspace="0" rspace="0" stretchy="false">^^M
- |^^M
- </mo>^^M
+ <mo lspace="0.278em" rspace="0">=</mo>^^M
+ <mo lspace="0.278em" rspace="0" stretchy="false">|</mo>^^M
+ <mi>𝑥</mi>^^M
+ <mo lspace="0" rspace="0" stretchy="false">|</mo>^^M
 </math>^^M
 </div>^^M
 ^^M
@@ -44,26 +32,14 @@ Don't change this file in any respect.
 <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">^^M
  <msqrt>^^M
  <msup>^^M
- <mi>^^M
- 𝑥^^M
- </mi>^^M
- <mn>^^M
- 2^^M
- </mn>^^M
+ <mi>𝑥</mi>^^M
+ <mn>2</mn>^^M
  </msup>^^M
  </msqrt>^^M
- <mo lspace="0.278em" rspace="0">^^M
- =^^M
- </mo>^^M
- <mo lspace="0.278em" rspace="0" stretchy="false">^^M
- |^^M
- </mo>^^M
- <mi>^^M
- 𝑥^^M
- </mi>^^M
- <mo lspace="0" rspace="0" stretchy="false">^^M
- |^^M
- </mo>^^M
+ <mo lspace="0.278em" rspace="0">=</mo>^^M
+ <mo lspace="0.278em" rspace="0" stretchy="false">|</mo>^^M
+ <mi>𝑥</mi>^^M
+ <mo lspace="0" rspace="0" stretchy="false">|</mo>^^M
 </math>^^M
 </div>^^M
 ^^M
@@ -73,9 +49,7 @@ Don't change this file in any respect.
 <p>59E43DDDF43026AE640CBD33D3EF4739</p>^^M
 ^^M
 <math xmlns="http://www.w3.org/1998/Math/MathML">^^M
- <mi>^^M
- 𝛤^^M
- </mi>^^M
+ <mi>𝛤</mi>^^M
 </math>^^M
 </div>^^M
 ^^M
diff --git a/required/latex-lab/testfiles-math-luatex/mathml-luamml-2.tpf b/required/latex-lab/testfiles-math-luatex/mathml-luamml-2.tpf
index 314659b36..9539b45ad 100644
--- a/required/latex-lab/testfiles-math-luatex/mathml-luamml-2.tpf
+++ b/required/latex-lab/testfiles-math-luatex/mathml-luamml-2.tpf
@@ -1,36 +1,36 @@
 %PDF-2.0
 %���������
 22 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 329 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 317 >>        
 stream
-<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <mo lspace="0" rspace="0"/> <msqrt> <msup> <mi> 𝑥 </mi> <mn> 2 </mn> </msup> </msqrt> <mo lspace="0.278em" rspace="0"> = </mo> <mo lspace="0.278em" rspace="0" stretchy="false"> | </mo> <mi> 𝑥 </mi> <mo lspace="0" rspace="0" stretchy="false"> | </mo> </math>
+<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <mo lspace="0" rspace="0"/> <msqrt> <msup> <mi>𝑥</mi> <mn>2</mn> </msup> </msqrt> <mo lspace="0.278em" rspace="0">=</mo> <mo lspace="0.278em" rspace="0" stretchy="false">|</mo> <mi>𝑥</mi> <mo lspace="0" rspace="0" stretchy="false">|</mo> </math>
 endstream
 endobj
 23 0 obj
 << /Type /Filespec /AFRelationship /Supplement /Desc (mathml-1) /F (mathml-1.xml) /UF <FEFF006D006100740068006D006C002D0031002E0078006D006C> /EF<</F 22 0 R/UF 22 0 R>> >>
 endobj
 24 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 301 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 289 >>        
 stream
-<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <msqrt> <msup> <mi> 𝑥 </mi> <mn> 2 </mn> </msup> </msqrt> <mo lspace="0.278em" rspace="0"> = </mo> <mo lspace="0.278em" rspace="0" stretchy="false"> | </mo> <mi> 𝑥 </mi> <mo lspace="0" rspace="0" stretchy="false"> | </mo> </math>
+<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"> <msqrt> <msup> <mi>𝑥</mi> <mn>2</mn> </msup> </msqrt> <mo lspace="0.278em" rspace="0">=</mo> <mo lspace="0.278em" rspace="0" stretchy="false">|</mo> <mi>𝑥</mi> <mo lspace="0" rspace="0" stretchy="false">|</mo> </math>
 endstream
 endobj
 25 0 obj
 << /Type /Filespec /AFRelationship /Supplement /Desc (mathml-2) /F (mathml-2.xml) /UF <FEFF006D006100740068006D006C002D0032002E0078006D006C> /EF<</F 24 0 R/UF 24 0 R>> >>
 endobj
 26 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 289 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 273 >>        
 stream
-<math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> 𝑎 </mi> <mo lspace="0.222em" rspace="0.222em"> + </mo> <mi> 𝑏 </mi> <mo lspace="0.278em" rspace="0.278em"> = </mo> <msup> <mi> 𝑥 </mi> <mn> 2 </mn> </msup> <mo lspace="0.222em" rspace="0.222em"> − </mo> <mn> 1 </mn> </math>
+<math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>𝑎</mi> <mo lspace="0.222em" rspace="0.222em">+</mo> <mi>𝑏</mi> <mo lspace="0.278em" rspace="0.278em">=</mo> <msup> <mi>𝑥</mi> <mn>2</mn> </msup> <mo lspace="0.222em" rspace="0.222em">−</mo> <mn>1</mn> </math>
 endstream
 endobj
 27 0 obj
 << /Type /Filespec /AFRelationship /Supplement /Desc (mathml-3) /F (mathml-3.xml) /UF <FEFF006D006100740068006D006C002D0033002E0078006D006C> /EF<</F 26 0 R/UF 26 0 R>> >>
 endobj
 28 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 130 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 124 >>        
 stream
-<math xmlns="http://www.w3.org/1998/Math/MathML"> <mn> 1 </mn> <mo lspace="0.278em" rspace="0.278em"> = </mo> <mn> 1 </mn> </math>
+<math xmlns="http://www.w3.org/1998/Math/MathML"> <mn>1</mn> <mo lspace="0.278em" rspace="0.278em">=</mo> <mn>1</mn> </math>
 endstream
 endobj
 29 0 obj
@@ -770,89 +770,89 @@ endobj
 xref
 0 82
 0000000002 65535 f 
-0000022118 00000 n 
+0000022072 00000 n 
 0000000003 00000 f 
 0000000004 00000 f 
 0000000010 00000 f 
-0000026813 00000 n 
-0000022348 00000 n 
-0000022739 00000 n 
-0000024931 00000 n 
-0000023558 00000 n 
+0000026767 00000 n 
+0000022302 00000 n 
+0000022693 00000 n 
+0000024885 00000 n 
+0000023512 00000 n 
 0000000012 00000 f 
-0000023626 00000 n 
+0000023580 00000 n 
 0000000014 00000 f 
-0000023696 00000 n 
+0000023650 00000 n 
 0000000020 00000 f 
-0000024459 00000 n 
-0000023777 00000 n 
-0000024737 00000 n 
-0000024566 00000 n 
-0000024844 00000 n 
+0000024413 00000 n 
+0000023731 00000 n 
+0000024691 00000 n 
+0000024520 00000 n 
+0000024798 00000 n 
 0000000000 00000 f 
-0000024992 00000 n 
+0000024946 00000 n 
 0000000020 00000 n 
-0000000498 00000 n 
-0000000685 00000 n 
-0000001135 00000 n 
-0000001322 00000 n 
-0000001760 00000 n 
-0000001947 00000 n 
-0000002226 00000 n 
-0000025113 00000 n 
-0000025201 00000 n 
-0000025289 00000 n 
-0000025389 00000 n 
-0000002413 00000 n 
-0000002615 00000 n 
-0000025599 00000 n 
-0000025721 00000 n 
-0000025821 00000 n 
-0000002815 00000 n 
-0000003019 00000 n 
-0000026025 00000 n 
-0000026125 00000 n 
-0000026236 00000 n 
-0000003219 00000 n 
-0000003374 00000 n 
-0000026419 00000 n 
-0000026519 00000 n 
-0000026630 00000 n 
-0000003574 00000 n 
-0000003722 00000 n 
-0000003922 00000 n 
-0000022031 00000 n 
-0000021896 00000 n 
-0000020571 00000 n 
-0000034245 00000 n 
-0000031021 00000 n 
-0000028837 00000 n 
-0000034611 00000 n 
-0000022165 00000 n 
-0000022201 00000 n 
-0000022246 00000 n 
-0000022419 00000 n 
-0000022702 00000 n 
-0000023318 00000 n 
+0000000486 00000 n 
+0000000673 00000 n 
+0000001111 00000 n 
+0000001298 00000 n 
+0000001720 00000 n 
+0000001907 00000 n 
+0000002180 00000 n 
+0000025067 00000 n 
+0000025155 00000 n 
+0000025243 00000 n 
+0000025343 00000 n 
+0000002367 00000 n 
+0000002569 00000 n 
+0000025553 00000 n 
+0000025675 00000 n 
+0000025775 00000 n 
+0000002769 00000 n 
+0000002973 00000 n 
+0000025979 00000 n 
+0000026079 00000 n 
+0000026190 00000 n 
+0000003173 00000 n 
+0000003328 00000 n 
+0000026373 00000 n 
+0000026473 00000 n 
+0000026584 00000 n 
+0000003528 00000 n 
+0000003676 00000 n 
+0000003876 00000 n 
+0000021985 00000 n 
+0000021850 00000 n 
+0000020525 00000 n 
+0000034199 00000 n 
+0000030975 00000 n 
+0000028791 00000 n 
+0000034565 00000 n 
+0000022119 00000 n 
+0000022155 00000 n 
+0000022200 00000 n 
+0000022373 00000 n 
+0000022656 00000 n 
+0000023272 00000 n 
+0000026904 00000 n 
+0000027790 00000 n 
 0000026950 00000 n 
-0000027836 00000 n 
-0000026996 00000 n 
-0000028057 00000 n 
-0000028991 00000 n 
-0000029191 00000 n 
-0000030010 00000 n 
-0000029224 00000 n 
-0000030239 00000 n 
-0000031181 00000 n 
-0000031387 00000 n 
-0000033111 00000 n 
-0000031507 00000 n 
-0000033339 00000 n 
-0000034405 00000 n 
-0000034673 00000 n 
-0000034717 00000 n 
+0000028011 00000 n 
+0000028945 00000 n 
+0000029145 00000 n 
+0000029964 00000 n 
+0000029178 00000 n 
+0000030193 00000 n 
+0000031135 00000 n 
+0000031341 00000 n 
+0000033065 00000 n 
+0000031461 00000 n 
+0000033293 00000 n 
+0000034359 00000 n 
+0000034627 00000 n 
+0000034671 00000 n 
 trailer
 << /Size 82 /Root 81 0 R /ID [ <2350CAD05F8A7AF0AA4058486855344F> <2350CAD05F8A7AF0AA4058486855344F> ] >>
 startxref
-34871
+34825
 %%EOF
diff --git a/required/latex-lab/testfiles-math-luatex/mathml-luamml-3.tpf b/required/latex-lab/testfiles-math-luatex/mathml-luamml-3.tpf
index dbeb5b4a0..788cb2385 100644
--- a/required/latex-lab/testfiles-math-luatex/mathml-luamml-3.tpf
+++ b/required/latex-lab/testfiles-math-luatex/mathml-luamml-3.tpf
@@ -10,18 +10,18 @@ endobj
 << /Type /Filespec /AFRelationship /Supplement /Desc (mathml-4) /F (mathml-4.xml) /UF <FEFF006D006100740068006D006C002D0034002E0078006D006C> /EF<</F 22 0 R/UF 22 0 R>> >>
 endobj
 24 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 289 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 273 >>        
 stream
-<math xmlns="http://www.w3.org/1998/Math/MathML"> <mi> 𝑎 </mi> <mo lspace="0.222em" rspace="0.222em"> + </mo> <mi> 𝑏 </mi> <mo lspace="0.278em" rspace="0.278em"> = </mo> <msup> <mi> 𝑥 </mi> <mn> 2 </mn> </msup> <mo lspace="0.222em" rspace="0.222em"> − </mo> <mn> 1 </mn> </math>
+<math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>𝑎</mi> <mo lspace="0.222em" rspace="0.222em">+</mo> <mi>𝑏</mi> <mo lspace="0.278em" rspace="0.278em">=</mo> <msup> <mi>𝑥</mi> <mn>2</mn> </msup> <mo lspace="0.222em" rspace="0.222em">−</mo> <mn>1</mn> </math>
 endstream
 endobj
 25 0 obj
 << /Type /Filespec /AFRelationship /Supplement /Desc (mathml-2) /F (mathml-2.xml) /UF <FEFF006D006100740068006D006C002D0032002E0078006D006C> /EF<</F 24 0 R/UF 24 0 R>> >>
 endobj
 26 0 obj
-<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 130 >>        
+<< /Type /EmbeddedFile /Subtype /application#2Fmathml+xml /Params<</ModDate (D:20160520) >> /Length 124 >>        
 stream
-<math xmlns="http://www.w3.org/1998/Math/MathML"> <mn> 1 </mn> <mo lspace="0.278em" rspace="0.278em"> = </mo> <mn> 1 </mn> </math>
+<math xmlns="http://www.w3.org/1998/Math/MathML"> <mn>1</mn> <mo lspace="0.278em" rspace="0.278em">=</mo> <mn>1</mn> </math>
 endstream
 endobj
 27 0 obj
@@ -717,82 +717,82 @@ endobj
 xref
 0 75
 0000000002 65535 f 
-0000020391 00000 n 
+0000020369 00000 n 
 0000000003 00000 f 
 0000000004 00000 f 
 0000000010 00000 f 
-0000024567 00000 n 
-0000020603 00000 n 
-0000020932 00000 n 
-0000023124 00000 n 
-0000021751 00000 n 
+0000024545 00000 n 
+0000020581 00000 n 
+0000020910 00000 n 
+0000023102 00000 n 
+0000021729 00000 n 
 0000000012 00000 f 
-0000021819 00000 n 
+0000021797 00000 n 
 0000000014 00000 f 
-0000021889 00000 n 
+0000021867 00000 n 
 0000000020 00000 f 
-0000022652 00000 n 
-0000021970 00000 n 
-0000022930 00000 n 
-0000022759 00000 n 
-0000023037 00000 n 
+0000022630 00000 n 
+0000021948 00000 n 
+0000022908 00000 n 
+0000022737 00000 n 
+0000023015 00000 n 
 0000000000 00000 f 
-0000023185 00000 n 
+0000023163 00000 n 
 0000000020 00000 n 
 0000000240 00000 n 
 0000000427 00000 n 
-0000000865 00000 n 
-0000001052 00000 n 
-0000001331 00000 n 
-0000023299 00000 n 
-0000023387 00000 n 
-0000023475 00000 n 
-0000023575 00000 n 
-0000001518 00000 n 
-0000001722 00000 n 
-0000023779 00000 n 
-0000023879 00000 n 
-0000023990 00000 n 
-0000001922 00000 n 
-0000002077 00000 n 
-0000024173 00000 n 
-0000024273 00000 n 
-0000024384 00000 n 
-0000002277 00000 n 
-0000002425 00000 n 
-0000002625 00000 n 
-0000020304 00000 n 
-0000020169 00000 n 
-0000019274 00000 n 
-0000031774 00000 n 
-0000028550 00000 n 
-0000026366 00000 n 
-0000032140 00000 n 
-0000020438 00000 n 
-0000020474 00000 n 
-0000020519 00000 n 
-0000020660 00000 n 
-0000020895 00000 n 
-0000021511 00000 n 
-0000024704 00000 n 
-0000025393 00000 n 
-0000024735 00000 n 
-0000025614 00000 n 
-0000026520 00000 n 
-0000026720 00000 n 
-0000027539 00000 n 
-0000026753 00000 n 
-0000027768 00000 n 
-0000028710 00000 n 
-0000028916 00000 n 
-0000030640 00000 n 
-0000029036 00000 n 
-0000030868 00000 n 
-0000031934 00000 n 
-0000032202 00000 n 
-0000032246 00000 n 
+0000000849 00000 n 
+0000001036 00000 n 
+0000001309 00000 n 
+0000023277 00000 n 
+0000023365 00000 n 
+0000023453 00000 n 
+0000023553 00000 n 
+0000001496 00000 n 
+0000001700 00000 n 
+0000023757 00000 n 
+0000023857 00000 n 
+0000023968 00000 n 
+0000001900 00000 n 
+0000002055 00000 n 
+0000024151 00000 n 
+0000024251 00000 n 
+0000024362 00000 n 
+0000002255 00000 n 
+0000002403 00000 n 
+0000002603 00000 n 
+0000020282 00000 n 
+0000020147 00000 n 
+0000019252 00000 n 
+0000031752 00000 n 
+0000028528 00000 n 
+0000026344 00000 n 
+0000032118 00000 n 
+0000020416 00000 n 
+0000020452 00000 n 
+0000020497 00000 n 
+0000020638 00000 n 
+0000020873 00000 n 
+0000021489 00000 n 
+0000024682 00000 n 
+0000025371 00000 n 
+0000024713 00000 n 
+0000025592 00000 n 
+0000026498 00000 n 
+0000026698 00000 n 
+0000027517 00000 n 
+0000026731 00000 n 
+0000027746 00000 n 
+0000028688 00000 n 
+0000028894 00000 n 
+0000030618 00000 n 
+0000029014 00000 n 
+0000030846 00000 n 
+0000031912 00000 n 
+0000032180 00000 n 
+0000032224 00000 n 
 trailer
 << /Size 75 /Root 74 0 R /ID [ <2350CAD05F8A7AF0AA4058486855344F> <2350CAD05F8A7AF0AA4058486855344F> ] >>
 startxref
-32400
+32378
 %%EOF
diff --git a/texmf/tex/latex/tagpdf/tagpdf-base.sty b/texmf/tex/latex/tagpdf/tagpdf-base.sty
index f8286a907..282e99d00 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-base.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-base.sty
@@ -25,7 +25,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf-base} {2024-11-22} {0.99j}
+\ProvidesExplPackage {tagpdf-base} {2024-11-20} {0.99j}
   {part of tagpdf - provide base, no-op versions of the user commands }
 \cs_new_protected:Npn \__tag_whatsits: {}
 \AddToHook{begindocument}
diff --git a/texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty b/texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty
index 354d3e91e..14184b287 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-debug-generic.sty
+++ b/texmf/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} {2024-11-22} {0.99j}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-11-20} {0.99j}
  {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/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty b/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty
index ea873c5d9..457e1421c 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf-debug-lua.sty
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf-mc-luacode.dtx
-\ProvidesExplPackage {tagpdf-debug-lua} {2024-11-22} {0.99j}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-11-20} {0.99j}
  {part of tagpdf - debugging code related to marking chunks - lua mode}
 \cs_set_protected:Npn \__tag_mc_handle_stash:n #1 %1 mcidnum
   {
diff --git a/texmf/tex/latex/tagpdf/tagpdf-debug.sty b/texmf/tex/latex/tagpdf/tagpdf-debug.sty
index 7bc9d48bb..014afe452 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-debug.sty
+++ b/texmf/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} {2024-11-22} {0.99j}
+\ProvidesExplPackage {tagpdf-debug} {2024-11-20} {0.99j}
   { 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/texmf/tex/latex/tagpdf/tagpdf-luatex.def b/texmf/tex/latex/tagpdf/tagpdf-luatex.def
index 63ee9f480..877478abd 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-luatex.def
+++ b/texmf/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} {2024-11-22} {0.99j}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-11-20} {0.99j}
   {tagpdf~driver~for~luatex}
 {
   \fontencoding{TU}\fontfamily{lmr}\fontseries{m}\fontshape{n}\fontsize{10pt}{10pt}\selectfont
diff --git a/texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty b/texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
index 1bae99bc9..b7beca7ef 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-mc-code-generic.sty
+++ b/texmf/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} {2024-11-22} {0.99j}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-11-20} {0.99j}
  {part of tagpdf - code related to marking chunks - generic mode}
 \tl_new:N \l__tag_mc_ref_abspage_tl
 
diff --git a/texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty b/texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
index 7e39b1a3c..4dc5441ec 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-mc-code-lua.sty
+++ b/texmf/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} {2024-11-22} {0.99j}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-11-20} {0.99j}
   {tagpdf - mc code only for the luamode }
 \hook_gput_code:nnn{begindocument}{tagpdf/mc}
   {
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def b/texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def
index 201e23953..40715f01d 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-latex-book.def
+++ b/texmf/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} {2024-11-22} {0.99j}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-11-20} {0.99j}
 %% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
 chapter,       H1,pdf2,
 section,       H2,pdf2,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-latex.def b/texmf/tex/latex/tagpdf/tagpdf-ns-latex.def
index 7b156ff0b..517fb7c3c 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-latex.def
+++ b/texmf/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} {2024-11-22} {0.99j}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-11-20} {0.99j}
 %% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
 title,        Title,    pdf2,
 part,         Title,    pdf2,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def b/texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def
index e73971e0d..a82fdc169 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-mathml.def
+++ b/texmf/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} {2024-11-22} {0.99j}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-11-20} {0.99j}
 abs,abs,mathml,
 and,and,mathml,
 annotation,annotation,mathml,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def b/texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def
index 6f002b303..07488660b 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf.def
+++ b/texmf/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} {2024-11-22} {0.99j}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-11-20} {0.99j}
 %%  {pdf}   {http://iso.org/pdf/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf,D,
 Document,Document,pdf,D,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def b/texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def
index 4d7f3d572..15e3fa0b8 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-ns-pdf2.def
+++ b/texmf/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} {2024-11-22} {0.99j}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-11-20} {0.99j}
 %%  {pdf2}  {http://iso.org/pdf2/ssn}{}
 StructTreeRoot,StructTreeRoot,pdf2,D,
 Document,Document,pdf2,D,
diff --git a/texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv b/texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv
index 3b8590903..dc45b22b2 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-parent-child-2.csv
+++ b/texmf/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} {2024-11-22} {0.99j}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-11-20} {0.99j}
 ,,,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/texmf/tex/latex/tagpdf/tagpdf-parent-child.csv b/texmf/tex/latex/tagpdf/tagpdf-parent-child.csv
index 3ac411976..077201464 100644
--- a/texmf/tex/latex/tagpdf/tagpdf-parent-child.csv
+++ b/texmf/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} {2024-11-22} {0.99j}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-11-20} {0.99j}
 ,,,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/texmf/tex/latex/tagpdf/tagpdf.lua b/texmf/tex/latex/tagpdf/tagpdf.lua
index 62e08da88..d94918501 100644
--- a/texmf/tex/latex/tagpdf/tagpdf.lua
+++ b/texmf/tex/latex/tagpdf/tagpdf.lua
@@ -25,7 +25,7 @@
 local ProvidesLuaModule = {
     name          = "tagpdf",
     version       = "0.99j",       --TAGVERSION
-    date          = "2024-11-22", --TAGDATE
+    date          = "2024-11-20", --TAGDATE
     description   = "tagpdf lua code",
     license       = "The LATEX Project Public License 1.3c"
 }
@@ -81,6 +81,9 @@ functions
  ltx.__tag.trace.show_prop: shows a prop
  ltx.__tag.trace.log
  ltx.__tag.trace.showspaces : boolean
+
+ ltx.tag.get_structnum: number, shows the current structure number
+ ltx.tag.get_structnum_next: number, shows the next structure number
 --]]
 
 local mctypeattributeid  = luatexbase.new_attribute ("g__tag_mc_type_attr")
@@ -127,6 +130,7 @@ local MATH           = node.id("math")
 local explicit_disc = 1
 local regular_disc = 3
 ltx             = ltx        or { }
+ltx.tag         = ltx.tag       or { } -- user commands
 ltx.__tag          = ltx.__tag        or { }
 ltx.__tag.mc       = ltx.__tag.mc     or  { } -- mc data
 ltx.__tag.struct   = ltx.__tag.struct or  { } -- struct data
@@ -138,6 +142,28 @@ ltx.__tag.page     = ltx.__tag.page   or  { } -- page data, currently only i->{0
 ltx.__tag.trace    = ltx.__tag.trace  or  { } -- show commands
 ltx.__tag.func     = ltx.__tag.func   or  { } -- functions
 ltx.__tag.conf     = ltx.__tag.conf   or  { } -- configuration variables
+
+local __tag_get_struct_num =
+ function()
+  local a = token.get_macro("g__tag_struct_stack_current_tl")
+  return a
+ end
+
+local __tag_get_struct_counter =
+ function()
+  local a = tex.getcount("c at g__tag_struct_abs_int")
+  return a
+ end
+
+local __tag_get_struct_num_next =
+ function()
+  local a = tex.getcount("c at g__tag_struct_abs_int") + 1
+  return a
+ end
+
+ltx.tag.get_struct_num = __tag_get_struct_num
+ltx.tag.get_struct_counter = __tag_get_struct_counter
+ltx.tag.get_struct_num_next = __tag_get_struct_num_next
 local __tag_log =
  function (message,loglevel)
   if (loglevel or 3) <= tex.count["l__tag_loglevel_int"] then
diff --git a/texmf/tex/latex/tagpdf/tagpdf.sty b/texmf/tex/latex/tagpdf/tagpdf.sty
index 7bada0d56..5bb4c0929 100644
--- a/texmf/tex/latex/tagpdf/tagpdf.sty
+++ b/texmf/tex/latex/tagpdf/tagpdf.sty
@@ -28,7 +28,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: tagpdf.dtx
-\ProvidesExplPackage {tagpdf} {2024-11-22} {0.99j}
+\ProvidesExplPackage {tagpdf} {2024-11-20} {0.99j}
   { LaTeX kernel code for PDF tagging }
 
 \bool_if:nF
diff --git a/texmf/tex/lualatex/luamml/luamml-structelemwriter.lua b/texmf/tex/lualatex/luamml/luamml-structelemwriter.lua
index 97a90aced..36881e1f8 100644
--- a/texmf/tex/lualatex/luamml/luamml-structelemwriter.lua
+++ b/texmf/tex/lualatex/luamml/luamml-structelemwriter.lua
@@ -1,5 +1,6 @@
 local struct_begin = token.create'tag_struct_begin:n'
 local struct_use = token.create'tag_struct_use:n'
+local struct_use_num = token.create'tag_struct_use_num:n'
 local struct_end = token.create'tag_struct_end:'
 
 local mc_begin = token.create'tag_mc_begin:n'
@@ -65,6 +66,11 @@ local function write_elem(tree, stash)
       return tex.sprint(struct_use, '{', tree[':struct'], '}')
     end)
   end
+  if tree[':structnum'] then
+    return tex.runtoks(function()
+      return tex.sprint(struct_use_num, '{', tree[':structnum'], '}')
+    end)
+  end  
   if not tree[0] then print('ERR', require'inspect'(tree)) end
   local i = 0
   for attr, val in next, tree do if type(attr) == 'string' and not string.find(attr, ':') and attr ~= 'xmlns' then
@@ -75,10 +81,8 @@ local function write_elem(tree, stash)
   table.sort(attrs)
 
   if stash then
-    stash_cnt = stash_cnt + 1
-    stash = '__luamml_stashed_' .. stash_cnt
-    tree[':struct'] = stash
-    stash = ', stash, label = ' .. stash
+    tree[':structnum'] = get_ltx().tag.get_struct_num_next() 
+    stash = ', stash, '
   end
 
   local attr_flag = i ~= 0 and ', attribute=' .. attributes[table.concat(attrs)]
diff --git a/texmf/tex/lualatex/luamml/luamml-tex-annotate.lua b/texmf/tex/lualatex/luamml/luamml-tex-annotate.lua
index 050a00a90..958b3eed5 100644
--- a/texmf/tex/lualatex/luamml/luamml-tex-annotate.lua
+++ b/texmf/tex/lualatex/luamml/luamml-tex-annotate.lua
@@ -83,6 +83,18 @@ local function annotate()
           end
         end
       end
+      if annotation.structnum ~= nil then
+        local saved = props.mathml_filter
+        local structnum = annotation.structnum
+        function props.mathml_filter(mml, core)
+          mml[':structnum'] = structnum
+          if saved then
+            return saved(mml, core)
+          else
+            return mml, core
+          end
+        end
+      end            
     else
       tex.error'Unable to annotate nucleus of node without nucleus'
     end
diff --git a/texmf/tex/lualatex/luamml/luamml-xmlwriter.lua b/texmf/tex/lualatex/luamml/luamml-xmlwriter.lua
index a2b5abefb..6880074bd 100644
--- a/texmf/tex/lualatex/luamml/luamml-xmlwriter.lua
+++ b/texmf/tex/lualatex/luamml/luamml-xmlwriter.lua
@@ -34,6 +34,10 @@ local function write_elem(tree, indent)
     return out .. '/>'
   end
   out = out .. '>'
+  -- Never indent the content if it's purely text.
+  if #tree == 1 and type(tree[1]) == 'string' then
+    indent = nil
+  end
   local inner_indent = indent and indent .. '  '
   local is_string
   for _, elem in ipairs(tree) do





More information about the latex3-commits mailing list.