summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tagpdf
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tagpdf')
-rw-r--r--macros/latex/contrib/tagpdf/README.md4
-rw-r--r--macros/latex/contrib/tagpdf/ex-AF-file.pdf98
-rw-r--r--macros/latex/contrib/tagpdf/ex-alt-actualtext.pdfbin34295 -> 34624 bytes
-rw-r--r--macros/latex/contrib/tagpdf/ex-attribute.pdf86
-rw-r--r--macros/latex/contrib/tagpdf/ex-formula-problem.pdf74
-rw-r--r--macros/latex/contrib/tagpdf/ex-list.pdf162
-rw-r--r--macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf56
-rw-r--r--macros/latex/contrib/tagpdf/ex-softhyphen.pdf76
-rw-r--r--macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf70
-rw-r--r--macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf104
-rw-r--r--macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf98
-rw-r--r--macros/latex/contrib/tagpdf/link-figure-input.tex6
-rw-r--r--macros/latex/contrib/tagpdf/pac2024-report.pngbin0 -> 60301 bytes
-rw-r--r--macros/latex/contrib/tagpdf/pac2024-version.pngbin0 -> 29032 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx115
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx55
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1713045 -> 1306918 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.tex14
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx20
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-docelements.tex2
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx14
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx8
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx12
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-roles.dtx46
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx9
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx466
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx16
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx266
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx305
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin1171785 -> 1157045 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex182
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty185
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex5
33 files changed, 1589 insertions, 965 deletions
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index d5ec6a6054..992f30d43d 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.99b
-Packagedate: 2024/04/12
+Packageversion: 0.99g
+Packagedate: 2024/10/27
Author: Ulrike Fischer, LaTeX Project Team
## License
diff --git a/macros/latex/contrib/tagpdf/ex-AF-file.pdf b/macros/latex/contrib/tagpdf/ex-AF-file.pdf
index 88cce58755..76dc573775 100644
--- a/macros/latex/contrib/tagpdf/ex-AF-file.pdf
+++ b/macros/latex/contrib/tagpdf/ex-AF-file.pdf
@@ -1,11 +1,11 @@
%PDF-2.0
%ÌÕÁÔÅØÐÄÆ
22 0 obj
-<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20240412224343+02'00') /Size 151 /CheckSum (D52DAF2721ACFB0A3038F7BEDDA61C03) >> /Length 151 >>
+<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20241027223455+01'00') /Size 151 /CheckSum (B5205D91E2A02C84B9BAA9C16AD1CF1C) >> /Length 151 >>
stream
%% LaTeX2e file `example-input-file.tex'
%% generated by the `filecontents' environment
-%% from source `ex-AF-file' on 2024/04/12.
+%% from source `ex-AF-file' on 2024/10/27.
%%
Additional info!
@@ -15,7 +15,7 @@ endobj
<< /Type /Filespec /AFRelationship /Unspecified /F (example-input-file.tex) /UF <FEFF006500780061006D0070006C0065002D0069006E007000750074002D00660069006C0065002E007400650078> /EF<</F 22 0 R/UF 22 0 R>> >>
endobj
25 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240412) >> /Length 19 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20241027) >> /Length 19 >>
stream
Bär with teh shirt
endstream
@@ -24,7 +24,7 @@ endobj
<< /Type /Filespec /AFRelationship /Supplement /F (tag-AFfile1.txt) /UF <FEFF007400610067002D0041004600660069006C00650031002E007400780074> /EF<</F 25 0 R/UF 25 0 R>> >>
endobj
28 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20240412) >> /Length 4 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20241027) >> /Length 4 >>
stream
Duck
endstream
@@ -33,7 +33,7 @@ endobj
<< /Type /Filespec /AFRelationship /Supplement /F (tag-AFfile2.txt) /UF <FEFF007400610067002D0041004600660069006C00650032002E007400780074> /EF<</F 28 0 R/UF 28 0 R>> >>
endobj
31 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11382 >>
+<< /Type /Metadata /Subtype /XML /Length 11713 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -88,6 +88,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -242,17 +248,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:43:57+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:35:14+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-AF-file.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:43:57+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:43:57+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:43:57+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:35:14+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:35:14+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:35:14+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:38d5a844-2217-4081-87cc-b2129dc357a6</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:6b06569f-01cc-4520-8f3e-f24784f393ab</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:b9c8533e-5926-4169-80c5-4f19662d574b</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -347,7 +353,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/book/2022) /RoleMapNS 18 0 R >>
endobj
19 0 obj
-<< /Type /Namespace /NS (data:,F7B920C5-38F1-B398-9D50-A556845632C) >>
+<< /Type /Namespace /NS (data:,B984A37A-6119-D29A-79BA-2F544DD34796) >>
endobj
8 0 obj
[ 9 0 R 11 0 R 13 0 R 15 0 R 17 0 R 19 0 R ]
@@ -449,59 +455,59 @@ endobj
<< /Type /Catalog /Pages 36 0 R /MarkInfo 37 0 R/Lang (de-DE)/Metadata 31 0 R/StructTreeRoot 5 0 R >>
endobj
46 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224357+02'00')/ModDate (D:20240412224357+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223514+01'00')/ModDate (D:20241027223514+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 47
0000000002 65535 f
-0000013544 00000 n
+0000013875 00000 n
0000000003 00000 f
0000000004 00000 f
0000000010 00000 f
-0000016361 00000 n
-0000013627 00000 n
-0000013838 00000 n
-0000015791 00000 n
-0000014417 00000 n
+0000016693 00000 n
+0000013958 00000 n
+0000014169 00000 n
+0000016123 00000 n
+0000014748 00000 n
0000000012 00000 f
-0000014485 00000 n
+0000014816 00000 n
0000000014 00000 f
-0000014555 00000 n
+0000014886 00000 n
0000000020 00000 f
-0000015318 00000 n
-0000014636 00000 n
-0000015596 00000 n
-0000015425 00000 n
-0000015703 00000 n
+0000015649 00000 n
+0000014967 00000 n
+0000015927 00000 n
+0000015756 00000 n
+0000016034 00000 n
0000000000 00000 f
-0000015852 00000 n
+0000016184 00000 n
0000000020 00000 n
0000000382 00000 n
-0000015965 00000 n
+0000016297 00000 n
0000000603 00000 n
0000000758 00000 n
-0000016097 00000 n
+0000016429 00000 n
0000000943 00000 n
0000001083 00000 n
-0000016229 00000 n
+0000016561 00000 n
0000001268 00000 n
-0000013481 00000 n
-0000013346 00000 n
-0000012740 00000 n
-0000020114 00000 n
-0000020468 00000 n
-0000013591 00000 n
-0000013684 00000 n
-0000013801 00000 n
-0000016481 00000 n
-0000018930 00000 n
-0000016667 00000 n
-0000019151 00000 n
-0000020268 00000 n
-0000020530 00000 n
-0000020648 00000 n
+0000013812 00000 n
+0000013677 00000 n
+0000013071 00000 n
+0000020446 00000 n
+0000020800 00000 n
+0000013922 00000 n
+0000014015 00000 n
+0000014132 00000 n
+0000016813 00000 n
+0000019262 00000 n
+0000016999 00000 n
+0000019483 00000 n
+0000020600 00000 n
+0000020862 00000 n
+0000020980 00000 n
trailer
-<< /Size 47 /Root 45 0 R /Info 46 0 R /ID [ <94D14D0D874136BA8E3138318B983D46> <94D14D0D874136BA8E3138318B983D46> ] >>
+<< /Size 47 /Root 45 0 R /Info 46 0 R /ID [ <913D8F5840CCF3ABCB73EC03D2084997> <913D8F5840CCF3ABCB73EC03D2084997> ] >>
startxref
-20871
+21203
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
index 2ee461f0b5..e0cb9ec4fd 100644
--- a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
+++ b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/ex-attribute.pdf b/macros/latex/contrib/tagpdf/ex-attribute.pdf
index cf0457f4ce..4ff4f1b87d 100644
--- a/macros/latex/contrib/tagpdf/ex-attribute.pdf
+++ b/macros/latex/contrib/tagpdf/ex-attribute.pdf
@@ -7,7 +7,7 @@ endobj
<< <</O /Layout /Borderstyle /Dotted >> >>
endobj
21 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11384 >>
+<< /Type /Metadata /Subtype /XML /Length 11715 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -62,6 +62,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -216,17 +222,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:45:00+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:36:03+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-attribute.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:45:00+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:45:00+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:45:00+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:36:03+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:36:03+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:36:03+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:7a9cf910-1c19-429a-8f24-339c62d8a57f</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:ebb76e7a-6558-411c-8644-ae16263a1ccf</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:eb6f1c74-38b0-4da0-8890-bd15f425cf65</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -450,51 +456,51 @@ endobj
<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (de_DE)/Metadata 21 0 R/StructTreeRoot 5 0 R >>
endobj
38 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20240412224500+02'00')/ModDate (D:20240412224500+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20241027223603+01'00')/ModDate (D:20241027223603+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 39
0000000002 65535 f
-0000012845 00000 n
+0000013176 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014965 00000 n
-0000012928 00000 n
-0000013247 00000 n
+0000015296 00000 n
+0000013259 00000 n
+0000013578 00000 n
0000000000 00000 f
-0000013953 00000 n
-0000014038 00000 n
-0000014130 00000 n
-0000014214 00000 n
-0000014304 00000 n
+0000014284 00000 n
+0000014369 00000 n
+0000014461 00000 n
+0000014545 00000 n
+0000014635 00000 n
0000000020 00000 n
0000000071 00000 n
-0000014433 00000 n
-0000014573 00000 n
-0000014657 00000 n
-0000014747 00000 n
-0000014856 00000 n
+0000014764 00000 n
+0000014904 00000 n
+0000014988 00000 n
+0000015078 00000 n
+0000015187 00000 n
0000000132 00000 n
-0000012758 00000 n
-0000012616 00000 n
-0000011606 00000 n
-0000017305 00000 n
-0000017659 00000 n
-0000012892 00000 n
-0000012992 00000 n
-0000013210 00000 n
-0000013826 00000 n
-0000015083 00000 n
-0000016261 00000 n
-0000015160 00000 n
-0000015234 00000 n
-0000016497 00000 n
-0000017459 00000 n
-0000017721 00000 n
-0000017839 00000 n
+0000013089 00000 n
+0000012947 00000 n
+0000011937 00000 n
+0000017636 00000 n
+0000017990 00000 n
+0000013223 00000 n
+0000013323 00000 n
+0000013541 00000 n
+0000014157 00000 n
+0000015414 00000 n
+0000016592 00000 n
+0000015491 00000 n
+0000015565 00000 n
+0000016828 00000 n
+0000017790 00000 n
+0000018052 00000 n
+0000018170 00000 n
trailer
-<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <F0A4043D02B88225A376093CF6F0F5F6> <F0A4043D02B88225A376093CF6F0F5F6> ] >>
+<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <36576E9D2D1E9F3A4955814A51D0B45A> <36576E9D2D1E9F3A4955814A51D0B45A> ] >>
startxref
-18076
+18407
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
index 4f52377221..626ef81ffc 100644
--- a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
+++ b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
@@ -30,7 +30,7 @@ endobj
<< /ExtGState 1 0 R /Font << /F15 15 0 R >> /ProcSet [ /PDF /Text ] >>
endobj
19 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11390 >>
+<< /Type /Metadata /Subtype /XML /Length 11721 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -85,6 +85,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -239,17 +245,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:45:21+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:36:28+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-formula-problem.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:45:21+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:45:21+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:45:21+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:36:28+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:36:28+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:36:28+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:8eb2ce1d-b2ec-440a-8bc2-73733eb3eeb0</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:b235cb52-00e7-4b87-80da-099ff7a08959</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:e5a9c002-c48f-4b02-8deb-4c97d9905cec</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -425,46 +431,46 @@ endobj
<< /Type /Catalog /Pages 16 0 R /MarkInfo 23 0 R/Lang (de-DE)/Metadata 19 0 R/StructTreeRoot 5 0 R >>
endobj
33 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224521+02'00')/ModDate (D:20240412224521+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223628+01'00')/ModDate (D:20241027223628+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 34
0000000002 65535 f
-0000012816 00000 n
+0000013147 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014379 00000 n
-0000012899 00000 n
-0000013137 00000 n
+0000014710 00000 n
+0000013230 00000 n
+0000013468 00000 n
0000000000 00000 f
-0000013716 00000 n
-0000013823 00000 n
-0000013929 00000 n
+0000014047 00000 n
+0000014154 00000 n
+0000014260 00000 n
0000000637 00000 n
0000000502 00000 n
0000000020 00000 n
-0000018463 00000 n
-0000018817 00000 n
-0000014041 00000 n
-0000014147 00000 n
+0000018794 00000 n
+0000019148 00000 n
+0000014372 00000 n
+0000014478 00000 n
0000000724 00000 n
-0000012729 00000 n
-0000012594 00000 n
-0000012204 00000 n
-0000012863 00000 n
-0000012969 00000 n
-0000013100 00000 n
-0000014480 00000 n
-0000017236 00000 n
-0000014681 00000 n
-0000014757 00000 n
-0000017472 00000 n
-0000018617 00000 n
-0000018886 00000 n
-0000019004 00000 n
+0000013060 00000 n
+0000012925 00000 n
+0000012535 00000 n
+0000013194 00000 n
+0000013300 00000 n
+0000013431 00000 n
+0000014811 00000 n
+0000017567 00000 n
+0000015012 00000 n
+0000015088 00000 n
+0000017803 00000 n
+0000018948 00000 n
+0000019217 00000 n
+0000019335 00000 n
trailer
-<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <DA67BF625C6AC31DA20A2C414D89BF53> <DA67BF625C6AC31DA20A2C414D89BF53> ] >>
+<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <E8E46712CBF433CAE23978E436BFCC76> <E8E46712CBF433CAE23978E436BFCC76> ] >>
startxref
-19227
+19558
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-list.pdf b/macros/latex/contrib/tagpdf/ex-list.pdf
index 68136b26fc..a577247275 100644
--- a/macros/latex/contrib/tagpdf/ex-list.pdf
+++ b/macros/latex/contrib/tagpdf/ex-list.pdf
@@ -1,7 +1,7 @@
%PDF-1.7
%ÌÕÁÔÅØÐÄÆ
48 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11379 >>
+<< /Type /Metadata /Subtype /XML /Length 11707 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -205,22 +211,22 @@ stream
</dc:type>
<dc:language>
<rdf:Bag>
- <rdf:li>en-US</rdf:li>
+ <rdf:li>en</rdf:li>
</rdf:Bag>
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:45:43+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:36:54+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-list.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:45:43+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:45:43+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:45:43+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:36:54+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:36:54+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:36:54+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:4c749825-1de7-414c-879f-29e4d0bef66e</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:2a093094-e2b9-4472-8f3a-4dbbebc7fd1c</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:5dbd46c1-55e1-44e2-8203-75ae3977078e</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -651,88 +657,88 @@ endobj
<< /Type /Pages /Count 1 /Kids [ 50 0 R ] >>
endobj
71 0 obj
-<< /Type /Catalog /Pages 54 0 R /MarkInfo 55 0 R/Lang (en-US)/Metadata 48 0 R/StructTreeRoot 5 0 R >>
+<< /Type /Catalog /Pages 54 0 R /MarkInfo 55 0 R/Lang (en)/Metadata 48 0 R/StructTreeRoot 5 0 R >>
endobj
72 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224543+02'00')/ModDate (D:20240412224543+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223654+01'00')/ModDate (D:20241027223654+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 73
0000000002 65535 f
-0000013512 00000 n
+0000013840 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000019050 00000 n
-0000013595 00000 n
-0000014434 00000 n
+0000019378 00000 n
+0000013923 00000 n
+0000014762 00000 n
0000000000 00000 f
-0000015231 00000 n
-0000015332 00000 n
-0000015408 00000 n
-0000015484 00000 n
-0000015571 00000 n
-0000015678 00000 n
-0000015768 00000 n
-0000015878 00000 n
-0000015962 00000 n
-0000016050 00000 n
-0000016173 00000 n
-0000016263 00000 n
-0000016373 00000 n
-0000016457 00000 n
-0000016545 00000 n
-0000016668 00000 n
-0000016755 00000 n
-0000016866 00000 n
-0000016956 00000 n
-0000017066 00000 n
-0000017150 00000 n
-0000017238 00000 n
-0000017361 00000 n
-0000017451 00000 n
-0000017561 00000 n
-0000017645 00000 n
-0000017733 00000 n
-0000017856 00000 n
-0000017943 00000 n
-0000018058 00000 n
-0000018148 00000 n
-0000018258 00000 n
-0000018342 00000 n
-0000018430 00000 n
-0000018553 00000 n
-0000018643 00000 n
-0000018754 00000 n
-0000018838 00000 n
-0000018926 00000 n
+0000015559 00000 n
+0000015660 00000 n
+0000015736 00000 n
+0000015812 00000 n
+0000015899 00000 n
+0000016006 00000 n
+0000016096 00000 n
+0000016206 00000 n
+0000016290 00000 n
+0000016378 00000 n
+0000016501 00000 n
+0000016591 00000 n
+0000016701 00000 n
+0000016785 00000 n
+0000016873 00000 n
+0000016996 00000 n
+0000017083 00000 n
+0000017194 00000 n
+0000017284 00000 n
+0000017394 00000 n
+0000017478 00000 n
+0000017566 00000 n
+0000017689 00000 n
+0000017779 00000 n
+0000017889 00000 n
+0000017973 00000 n
+0000018061 00000 n
+0000018184 00000 n
+0000018271 00000 n
+0000018386 00000 n
+0000018476 00000 n
+0000018586 00000 n
+0000018670 00000 n
+0000018758 00000 n
+0000018881 00000 n
+0000018971 00000 n
+0000019082 00000 n
+0000019166 00000 n
+0000019254 00000 n
0000000020 00000 n
-0000013413 00000 n
-0000013271 00000 n
-0000011489 00000 n
-0000029177 00000 n
-0000022225 00000 n
-0000029531 00000 n
-0000013559 00000 n
-0000013715 00000 n
-0000014397 00000 n
-0000015026 00000 n
-0000019168 00000 n
-0000021127 00000 n
-0000019300 00000 n
-0000019374 00000 n
-0000021361 00000 n
-0000022376 00000 n
-0000022573 00000 n
-0000027712 00000 n
-0000022909 00000 n
-0000023032 00000 n
-0000027948 00000 n
-0000029331 00000 n
-0000029593 00000 n
-0000029711 00000 n
+0000013741 00000 n
+0000013599 00000 n
+0000011817 00000 n
+0000029505 00000 n
+0000022553 00000 n
+0000029859 00000 n
+0000013887 00000 n
+0000014043 00000 n
+0000014725 00000 n
+0000015354 00000 n
+0000019496 00000 n
+0000021455 00000 n
+0000019628 00000 n
+0000019702 00000 n
+0000021689 00000 n
+0000022704 00000 n
+0000022901 00000 n
+0000028040 00000 n
+0000023237 00000 n
+0000023360 00000 n
+0000028276 00000 n
+0000029659 00000 n
+0000029921 00000 n
+0000030036 00000 n
trailer
-<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <AB165FBD92401154000829BD1ADC4E0A> <AB165FBD92401154000829BD1ADC4E0A> ] >>
+<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <9FE5893F47078D523BBE8D61D50ED061> <9FE5893F47078D523BBE8D61D50ED061> ] >>
startxref
-29934
+30259
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
index 05f6c08b7e..8d41c002bd 100644
--- a/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
+++ b/macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf
@@ -34,7 +34,7 @@ endobj
<< /ExtGState 1 0 R /Font << /F15 13 0 R >> /ProcSet [ /PDF /Text ] >>
endobj
15 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11404 >>
+<< /Type /Metadata /Subtype /XML /Length 11732 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -89,6 +89,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -238,22 +244,22 @@ stream
</dc:type>
<dc:language>
<rdf:Bag>
- <rdf:li>en-US</rdf:li>
+ <rdf:li>de</rdf:li>
</rdf:Bag>
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:46:02+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:37:16+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-mc-manual-para-split-obsolete.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:46:02+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:46:02+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:46:02+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:37:16+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:37:16+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:37:16+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:c33d64b4-96ec-4e48-8f27-0b3edc831547</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:bcd2c2e1-c962-4de2-807b-cf19c4e0788a</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:46f4a0dd-bede-45aa-8ac4-70841977b423</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -410,15 +416,15 @@ endobj
<< /Type /Pages /Count 2 /Kids [ 9 0 R 10 0 R ] >>
endobj
24 0 obj
-<< /Type /Catalog /Pages 14 0 R /Lang (en-US)/Metadata 15 0 R >>
+<< /Type /Catalog /Pages 14 0 R /Lang (de)/Metadata 15 0 R >>
endobj
25 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224602+02'00')/ModDate (D:20240412224602+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223716+01'00')/ModDate (D:20241027223716+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 26
0000000002 65535 f
-0000016854 00000 n
+0000017182 00000 n
0000000003 00000 f
0000000004 00000 f
0000000005 00000 f
@@ -427,24 +433,24 @@ xref
0000000008 00000 f
0000000000 00000 f
0000002976 00000 n
-0000016648 00000 n
+0000016976 00000 n
0000003094 00000 n
0000000020 00000 n
-0000023475 00000 n
-0000023829 00000 n
+0000023803 00000 n
+0000024157 00000 n
0000003181 00000 n
-0000016767 00000 n
-0000014675 00000 n
-0000016901 00000 n
-0000022024 00000 n
-0000017208 00000 n
-0000017283 00000 n
-0000022260 00000 n
-0000023629 00000 n
-0000023897 00000 n
-0000023978 00000 n
+0000017095 00000 n
+0000015003 00000 n
+0000017229 00000 n
+0000022352 00000 n
+0000017536 00000 n
+0000017611 00000 n
+0000022588 00000 n
+0000023957 00000 n
+0000024225 00000 n
+0000024303 00000 n
trailer
-<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <F8A7135FF68D011151C46C7318E355A1> <F8A7135FF68D011151C46C7318E355A1> ] >>
+<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <021868C517E246E72695F327A79C7F3F> <021868C517E246E72695F327A79C7F3F> ] >>
startxref
-24201
+24526
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
index 167f4c4098..5c2df8897b 100644
--- a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
+++ b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
@@ -1,7 +1,7 @@
%PDF-1.7
%ÌÕÁÔÅØÐÄÆ
14 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11385 >>
+<< /Type /Metadata /Subtype /XML /Length 11713 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -205,22 +211,22 @@ stream
</dc:type>
<dc:language>
<rdf:Bag>
- <rdf:li>en-US</rdf:li>
+ <rdf:li>de</rdf:li>
</rdf:Bag>
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:46:20+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:37:38+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-softhyphen.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:46:20+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:46:20+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:46:20+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:37:38+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:37:38+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:37:38+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:aa82e685-4098-469d-861c-3c45dfc700c7</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:519a7795-b9d2-4e15-8969-b897a5a4ef22</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:c020fac8-bd8b-4093-88a3-079e4416672a</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -390,46 +396,46 @@ endobj
<< /Type /Pages /Count 1 /Kids [ 16 0 R ] >>
endobj
29 0 obj
-<< /Type /Catalog /Pages 19 0 R /MarkInfo 20 0 R/Lang (en-US)/Metadata 14 0 R/StructTreeRoot 5 0 R >>
+<< /Type /Catalog /Pages 19 0 R /MarkInfo 20 0 R/Lang (de)/Metadata 14 0 R/StructTreeRoot 5 0 R >>
endobj
30 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224620+02'00')/ModDate (D:20240412224620+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223738+01'00')/ModDate (D:20241027223738+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 31
0000000002 65535 f
-0000012363 00000 n
+0000012691 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000013741 00000 n
-0000012446 00000 n
-0000012664 00000 n
+0000014069 00000 n
+0000012774 00000 n
+0000012992 00000 n
0000000000 00000 f
-0000013256 00000 n
-0000013349 00000 n
-0000013435 00000 n
-0000013545 00000 n
-0000013631 00000 n
+0000013584 00000 n
+0000013677 00000 n
+0000013763 00000 n
+0000013873 00000 n
+0000013959 00000 n
0000000020 00000 n
-0000012276 00000 n
-0000012141 00000 n
-0000011495 00000 n
-0000017690 00000 n
-0000018054 00000 n
-0000012410 00000 n
-0000012496 00000 n
-0000012627 00000 n
-0000013842 00000 n
-0000016490 00000 n
-0000013996 00000 n
+0000012604 00000 n
+0000012469 00000 n
+0000011823 00000 n
+0000018018 00000 n
+0000018382 00000 n
+0000012738 00000 n
+0000012824 00000 n
+0000012955 00000 n
0000014170 00000 n
-0000016730 00000 n
-0000017849 00000 n
-0000018116 00000 n
-0000018234 00000 n
+0000016818 00000 n
+0000014324 00000 n
+0000014498 00000 n
+0000017058 00000 n
+0000018177 00000 n
+0000018444 00000 n
+0000018559 00000 n
trailer
-<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <D9AD6A8B84F7C436A5E33ABFF75724B5> <D9AD6A8B84F7C436A5E33ABFF75724B5> ] >>
+<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <2884F9E61D000E3EB4AD37FF6613925D> <2884F9E61D000E3EB4AD37FF6613925D> ] >>
startxref
-18457
+18782
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
index 3925dd28a1..3766768619 100644
--- a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
+++ b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
@@ -1,7 +1,7 @@
%PDF-1.5
%ÌÕÁÔÅØÐÄÆ
10 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11394 >>
+<< /Type /Metadata /Subtype /XML /Length 11722 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -205,22 +211,22 @@ stream
</dc:type>
<dc:language>
<rdf:Bag>
- <rdf:li>en-US</rdf:li>
+ <rdf:li>de</rdf:li>
</rdf:Bag>
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:46:38+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:37:59+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-spaceglyph-listings.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:46:38+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:46:38+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:46:38+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:37:59+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:37:59+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:37:59+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:acdc2435-bf29-4e54-8d09-1c9b6dc32038</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:6c942f83-dfd6-4e6f-8910-a9170ff614fd</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:75cddc90-a6a9-482a-8325-37e09bb2ef3c</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -351,42 +357,42 @@ endobj
<< /Type /Pages /Count 1 /Kids [ 12 0 R ] >>
endobj
25 0 obj
-<< /Type /Catalog /Pages 15 0 R /MarkInfo 16 0 R/Lang (en-US)/Metadata 10 0 R/StructTreeRoot 5 0 R >>
+<< /Type /Catalog /Pages 15 0 R /MarkInfo 16 0 R/Lang (de)/Metadata 10 0 R/StructTreeRoot 5 0 R >>
endobj
26 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224638+02'00')/ModDate (D:20240412224638+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223759+01'00')/ModDate (D:20241027223759+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 27
0000000002 65535 f
-0000012010 00000 n
+0000012338 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000012889 00000 n
-0000012093 00000 n
-0000012236 00000 n
+0000013217 00000 n
+0000012421 00000 n
+0000012564 00000 n
0000000000 00000 f
-0000012815 00000 n
+0000013143 00000 n
0000000020 00000 n
-0000011923 00000 n
-0000011788 00000 n
-0000011504 00000 n
-0000015072 00000 n
-0000015426 00000 n
-0000012057 00000 n
-0000012128 00000 n
-0000012199 00000 n
-0000012990 00000 n
-0000014056 00000 n
-0000013045 00000 n
-0000013120 00000 n
-0000014292 00000 n
-0000015226 00000 n
-0000015488 00000 n
-0000015606 00000 n
+0000012251 00000 n
+0000012116 00000 n
+0000011832 00000 n
+0000015400 00000 n
+0000015754 00000 n
+0000012385 00000 n
+0000012456 00000 n
+0000012527 00000 n
+0000013318 00000 n
+0000014384 00000 n
+0000013373 00000 n
+0000013448 00000 n
+0000014620 00000 n
+0000015554 00000 n
+0000015816 00000 n
+0000015931 00000 n
trailer
-<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <4F03E017A0AB75B1D9F70C4C092338B6> <4F03E017A0AB75B1D9F70C4C092338B6> ] >>
+<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <F17259B217182DBF90C1A855FBD46F7D> <F17259B217182DBF90C1A855FBD46F7D> ] >>
startxref
-15829
+16154
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
index 4e1d3bd333..03e8187342 100644
--- a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
+++ b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
@@ -1,7 +1,7 @@
%PDF-1.7
%ÌÕÁÔÅØÐÄÆ
20 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11393 >>
+<< /Type /Metadata /Subtype /XML /Length 11721 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -205,22 +211,22 @@ stream
</dc:type>
<dc:language>
<rdf:Bag>
- <rdf:li>en-US</rdf:li>
+ <rdf:li>de</rdf:li>
</rdf:Bag>
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:46:56+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:38:20+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-structure-obsolete.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:46:56+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:46:56+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:46:56+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:38:20+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:38:20+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:38:20+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:bf5e4a2b-cfa9-4fc5-878c-8f9d2ee95445</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:dfe9a42c-3fb3-4d0b-8cff-cbabbd4c8758</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:2f0d3560-6ba5-4289-8a7d-631646751146</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -523,59 +529,59 @@ endobj
<< /Type /Pages /Count 1 /Kids [ 22 0 R ] >>
endobj
42 0 obj
-<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (en-US)/Metadata 20 0 R/StructTreeRoot 5 0 R >>
+<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (de)/Metadata 20 0 R/StructTreeRoot 5 0 R >>
endobj
43 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224656+02'00')/ModDate (D:20240412224656+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223820+01'00')/ModDate (D:20241027223820+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 44
0000000002 65535 f
-0000012797 00000 n
+0000013125 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014933 00000 n
-0000012880 00000 n
-0000013229 00000 n
+0000015261 00000 n
+0000013208 00000 n
+0000013557 00000 n
0000000000 00000 f
-0000013821 00000 n
-0000013906 00000 n
-0000014004 00000 n
-0000014112 00000 n
-0000014220 00000 n
-0000014309 00000 n
-0000014399 00000 n
-0000014509 00000 n
-0000014621 00000 n
-0000014711 00000 n
-0000014821 00000 n
+0000014149 00000 n
+0000014234 00000 n
+0000014332 00000 n
+0000014440 00000 n
+0000014548 00000 n
+0000014637 00000 n
+0000014727 00000 n
+0000014837 00000 n
+0000014949 00000 n
+0000015039 00000 n
+0000015149 00000 n
0000000020 00000 n
-0000012698 00000 n
-0000012563 00000 n
-0000011503 00000 n
-0000023016 00000 n
-0000019782 00000 n
-0000023364 00000 n
-0000012844 00000 n
-0000012958 00000 n
-0000013192 00000 n
-0000015034 00000 n
-0000018513 00000 n
-0000015283 00000 n
-0000015358 00000 n
-0000018749 00000 n
-0000019936 00000 n
-0000020136 00000 n
-0000021904 00000 n
-0000020273 00000 n
-0000020349 00000 n
-0000022138 00000 n
-0000023167 00000 n
-0000023426 00000 n
-0000023544 00000 n
+0000013026 00000 n
+0000012891 00000 n
+0000011831 00000 n
+0000023344 00000 n
+0000020110 00000 n
+0000023692 00000 n
+0000013172 00000 n
+0000013286 00000 n
+0000013520 00000 n
+0000015362 00000 n
+0000018841 00000 n
+0000015611 00000 n
+0000015686 00000 n
+0000019077 00000 n
+0000020264 00000 n
+0000020464 00000 n
+0000022232 00000 n
+0000020601 00000 n
+0000020677 00000 n
+0000022466 00000 n
+0000023495 00000 n
+0000023754 00000 n
+0000023869 00000 n
trailer
-<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <070B43978F0B9DD29A40F81836E2FD94> <070B43978F0B9DD29A40F81836E2FD94> ] >>
+<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <7BB4C9B60D10544DA8B57870368C28A1> <7BB4C9B60D10544DA8B57870368C28A1> ] >>
startxref
-23767
+24092
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
index 1edb5a1526..b523c18609 100644
--- a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
+++ b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
@@ -1,7 +1,7 @@
%PDF-2.0
%ÌÕÁÔÅØÐÄÆ
26 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11390 >>
+<< /Type /Metadata /Subtype /XML /Length 11718 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -56,6 +56,12 @@ stream
<pdfaProperty:category>internal</pdfaProperty:category>
<pdfaProperty:description>Year of standard</pdfaProperty:description>
</rdf:li>
+ <rdf:li rdf:parseType="Resource">
+ <pdfaProperty:name>rev</pdfaProperty:name>
+ <pdfaProperty:valueType>Integer</pdfaProperty:valueType>
+ <pdfaProperty:category>internal</pdfaProperty:category>
+ <pdfaProperty:description>Revision year of standard</pdfaProperty:description>
+ </rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
@@ -205,22 +211,22 @@ stream
</dc:type>
<dc:language>
<rdf:Bag>
- <rdf:li>en-US</rdf:li>
+ <rdf:li>en</rdf:li>
</rdf:Bag>
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2024-04-12T22:47:14+02:00</rdf:li>
+ <rdf:li>2024-10-27T22:38:43+01:00</rdf:li>
</rdf:Seq>
</dc:date>
<dc:format>application/pdf</dc:format>
<dc:source>ex-tagpdf-template.tex</dc:source>
<xmp:CreatorTool>LaTeX</xmp:CreatorTool>
- <xmp:CreateDate>2024-04-12T22:47:14+02:00</xmp:CreateDate>
- <xmp:ModifyDate>2024-04-12T22:47:14+02:00</xmp:ModifyDate>
- <xmp:MetadataDate>2024-04-12T22:47:14+02:00</xmp:MetadataDate>
+ <xmp:CreateDate>2024-10-27T22:38:43+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2024-10-27T22:38:43+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2024-10-27T22:38:43+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:f320abfc-f6ab-4d12-8719-d176f4d947cf</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:a58b5e07-b0ee-4a81-8000-b7d421e306ee</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:56e7d257-35a4-49ae-8577-3c691372d233</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -307,7 +313,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/book/2022) /RoleMapNS 18 0 R >>
endobj
19 0 obj
-<< /Type /Namespace /NS (data:,116ADA92-7CCD-B12C-F093-B4B64DA61C) >>
+<< /Type /Namespace /NS (data:,8E4C8AF-E27-DA88-5F3F-9A62E664EE8) >>
endobj
8 0 obj
[ 9 0 R 11 0 R 13 0 R 15 0 R 17 0 R 19 0 R ]
@@ -396,58 +402,58 @@ endobj
<< /Type /Pages /Count 1 /Kids [ 28 0 R ] >>
endobj
41 0 obj
-<< /Type /Catalog /Pages 31 0 R /MarkInfo 32 0 R/Lang (en-US)/Metadata 26 0 R/StructTreeRoot 5 0 R >>
+<< /Type /Catalog /Pages 31 0 R /MarkInfo 32 0 R/Lang (en)/Metadata 26 0 R/StructTreeRoot 5 0 R >>
endobj
42 0 obj
-<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20240412224714+02'00')/ModDate (D:20240412224714+02'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
+<< /Producer (luahbtex-1.18.0)/Creator (LaTeX)/CreationDate (D:20241027223843+01'00')/ModDate (D:20241027223843+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.18.0 (TeX Live 2024)) >>
endobj
xref
0 43
0000000002 65535 f
-0000011932 00000 n
+0000012260 00000 n
0000000003 00000 f
0000000004 00000 f
0000000010 00000 f
-0000014806 00000 n
-0000012015 00000 n
-0000012225 00000 n
-0000014241 00000 n
-0000012868 00000 n
+0000015133 00000 n
+0000012343 00000 n
+0000012553 00000 n
+0000014568 00000 n
+0000013196 00000 n
0000000012 00000 f
-0000012936 00000 n
+0000013264 00000 n
0000000014 00000 f
-0000013006 00000 n
+0000013334 00000 n
0000000020 00000 f
-0000013769 00000 n
-0000013087 00000 n
-0000014047 00000 n
-0000013876 00000 n
-0000014154 00000 n
+0000014097 00000 n
+0000013415 00000 n
+0000014375 00000 n
+0000014204 00000 n
+0000014482 00000 n
0000000000 00000 f
-0000014302 00000 n
-0000014399 00000 n
-0000014486 00000 n
-0000014573 00000 n
-0000014672 00000 n
+0000014629 00000 n
+0000014726 00000 n
+0000014813 00000 n
+0000014900 00000 n
+0000014999 00000 n
0000000020 00000 n
-0000011869 00000 n
-0000011734 00000 n
-0000011500 00000 n
-0000017427 00000 n
-0000017781 00000 n
-0000011979 00000 n
-0000012056 00000 n
-0000012188 00000 n
-0000012804 00000 n
-0000014943 00000 n
-0000016384 00000 n
-0000015030 00000 n
-0000016605 00000 n
-0000017581 00000 n
-0000017843 00000 n
-0000017961 00000 n
+0000012197 00000 n
+0000012062 00000 n
+0000011828 00000 n
+0000017754 00000 n
+0000018108 00000 n
+0000012307 00000 n
+0000012384 00000 n
+0000012516 00000 n
+0000013132 00000 n
+0000015270 00000 n
+0000016711 00000 n
+0000015357 00000 n
+0000016932 00000 n
+0000017908 00000 n
+0000018170 00000 n
+0000018285 00000 n
trailer
-<< /Size 43 /Root 41 0 R /Info 42 0 R /ID [ <6A478CD03D1F91A40D3812163E3E3FC9> <6A478CD03D1F91A40D3812163E3E3FC9> ] >>
+<< /Size 43 /Root 41 0 R /Info 42 0 R /ID [ <2B6006DEEF35DD1A3F3AC9CAA0916125> <2B6006DEEF35DD1A3F3AC9CAA0916125> ] >>
startxref
-18184
+18508
%%EOF
diff --git a/macros/latex/contrib/tagpdf/link-figure-input.tex b/macros/latex/contrib/tagpdf/link-figure-input.tex
index ef07c33e95..1a1036d282 100644
--- a/macros/latex/contrib/tagpdf/link-figure-input.tex
+++ b/macros/latex/contrib/tagpdf/link-figure-input.tex
@@ -27,7 +27,7 @@
\NewDocumentCommand\balloon{m}{%
\node[fit={(pic cs:#1-first) (pic cs:#1-end)
([yshift=7pt]pic cs:#1-end)},balloon](#1){};}
-\begin{tikzpicture}[overlay,remember picture]
+\begin{tikzpicture}[overlay,remember picture,alt={Illustration of link annotation structure}]
\balloon{link}
\balloon{structparent}
\balloon{OBJR}
@@ -45,7 +45,7 @@
\draw[ref] (kid)--(OBJR);
\draw[ref] (OBJR)--(linkref);
\end{tikzpicture}
-\begin{lstlisting}[name=OBJR]
+\begin{taglstlisting}[name=OBJR]
*\tikzmark{link-first}*18 0 obj*\tikzmark{link-end}* %Link Object
<< /Type /Annot /Subtype/Link
/Rect [ 196.109 494.573 399.167 506.831 ]
@@ -67,4 +67,4 @@ endobj};
<< /Nums
[... *\tikzmark{pnum-first}*16*\tikzmark{pnum-end}* *\tikzmark{pref-first}*17 0 R*\tikzmark{pref-end}* ...] >>
endobj
-\end{lstlisting}
+\end{taglstlisting}
diff --git a/macros/latex/contrib/tagpdf/pac2024-report.png b/macros/latex/contrib/tagpdf/pac2024-report.png
new file mode 100644
index 0000000000..4474bc989f
--- /dev/null
+++ b/macros/latex/contrib/tagpdf/pac2024-report.png
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/pac2024-version.png b/macros/latex/contrib/tagpdf/pac2024-version.png
new file mode 100644
index 0000000000..1bc12bdafe
--- /dev/null
+++ b/macros/latex/contrib/tagpdf/pac2024-version.png
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index 0f388b2542..5a957d64e3 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2024-04-12} {0.99b}
+\ProvidesExplFile {tagpdf-luatex.def} {2024-10-27} {0.99g}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -85,6 +85,7 @@
% \@@_seq_new:N,
% \@@_prop_gput:Nnn,
% \@@_seq_gput_right:Nn,
+% \@@_seq_gput_left:Nn,
% \@@_seq_item:cn,
% \@@_prop_item:cn,
% \@@_seq_show:N,
@@ -114,7 +115,7 @@
\cs_set_protected:Npn \@@_prop_gput:Nnn #1 #2 #3
{
\prop_gput:Nnn #1 { #2 } { #3 }
- \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 ["#2"] = "#3" }
+ \lua_now:e { ltx.@@.tables.\cs_to_str:N#1 ["#2"] = "\lua_escape:n{#3}" }
}
@@ -123,9 +124,18 @@
\seq_gput_right:Nn #1 { #2 }
\lua_now:e { table.insert(ltx.@@.tables.\cs_to_str:N#1, "#2") }
}
-
+% \end{macrocode}
+%
+% this inserts on the right of the lua table, but as the lua table is not used for kids
+% this is ignored for now.
+% \begin{macrocode}
+\cs_set_protected:Npn \@@_seq_gput_left:Nn #1 #2
+ {
+ \seq_gput_left:Nn #1 { #2 }
+ \lua_now:e { table.insert(ltx.@@.tables.\cs_to_str:N#1, "#2") }
+ }
+
%Hm not quite sure about the naming
-
\cs_set:Npn \@@_seq_item:cn #1 #2
{
\lua_now:e { tex.print(ltx.@@.tables.#1[#2]) }
@@ -164,8 +174,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.99b", --TAGVERSION
- date = "2024-04-12", --TAGDATE
+ version = "0.99g", --TAGVERSION
+ date = "2024-10-27", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
@@ -196,8 +206,8 @@ ltx.@@.page will contain page data
ltx.@@.tables contains also data from mc and struct (from older code). This needs cleaning up.
There are certainly dublettes, but I don't dare yet ...
ltx.@@.func will contain (public) functions.
-ltx.@@.trace will contain tracing/loging functions.
-local funktions starts with __
+ltx.@@.trace will contain tracing/logging functions.
+local functions starts with __
functions meant for users will be in ltx.tag
functions
@@ -210,7 +220,7 @@ functions
ltx.@@.func.store_mc_kid (mcnum,kid,page): stores the mc-kids of mcnum on page page
ltx.@@.func.store_mc_in_page(mcnum,mcpagecnt,page): stores in the page table the number of mcnum on this page
ltx.@@.func.store_struct_mcabs (structnum,mcnum): stores relations structnum<->mcnum (abs)
- ltx.@@.func.mc_insert_kids (mcnum): inserts the /K entries for mcnum by wandering throught the [kids] table
+ ltx.@@.func.mc_insert_kids (mcnum): inserts the /K entries for mcnum by wandering through the [kids] table
ltx.@@.func.mark_page_elements(box,mcpagecnt,mccntprev,mcopen,name,mctypeprev) : the main function
ltx.@@.func.mark_shipout (): a wrapper around the core function which inserts the last EMC
ltx.@@.func.fill_parent_tree_line (page): outputs the entries of the parenttree for this page
@@ -252,6 +262,12 @@ local iwfontattributeid = luatexbase.new_attribute ("g_@@_interwordfont_attr")
local tagunmarkedbool= token.create("g_@@_tagunmarked_bool")
local truebool = token.create("c_true_bool")
% \end{macrocode}
+% with this token we can query the state of the softhyphen boolean
+% and so detect if hyphens from hyphenation should be replaced by soft-hyphens.
+% \begin{macrocode}
+local softhyphenbool = token.create("g_@@_softhyphen_bool")
+% \end{macrocode}
+
% Now a number of local versions from global tables.
% Not all is perhaps needed, most node variants were copied from lua-debug.
% \begin{macrocode}
@@ -286,6 +302,9 @@ local KERN = node.id("kern")
local PENALTY = node.id("penalty")
local LOCAL_PAR = node.id("local_par")
local MATH = node.id("math")
+
+local explicit_disc = 1
+local regular_disc = 3
% \end{macrocode}
% Now we setup the main table structure. ltx is used by other latex code too!
% \begin{macrocode}
@@ -827,7 +846,7 @@ end
% @@_activate_mark_space,
% ltx.@@.func.markspaceoff
% }
-% Theses functions add/remove the function which marks the spaces to the callbacks
+% These functions add/remove the function which marks the spaces to the callbacks
% |pre_linebreak_filter| and |hpack_filter|
% \begin{macrocode}
local function @@_activate_mark_space ()
@@ -1267,6 +1286,80 @@ function ltx.@@.func.output_parenttree (abspage)
end
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}
+% {
+% process_softhyphen_pre
+% process_softhyphen_post
+% }
+% First some local definitions. Since these are only needed locally everything gets wrapped into a block.
+% \begin{macrocode}
+do
+ local properties = node.get_properties_table()
+ local is_soft_hyphen_prop = 'tagpdf.rewrite-softhyphen.is_soft_hyphen'
+ local hyphen_char = 0x2D
+ local soft_hyphen_char = 0xAD
+% \end{macrocode}
+%
+% A lookup table to test if the font supports the soft hyphen glyph.
+% \begin{macrocode}
+ local softhyphen_fonts = setmetatable({}, {__index = function(t, fid)
+ local fdir = identifiers[fid]
+ local format = fdir and fdir.format
+ local result = (format == 'opentype' or format == 'truetype')
+ local characters = fdir and fdir.characters
+ result = result and (characters and characters[soft_hyphen_char]) ~= nil
+ t[fid] = result
+ return result
+ end})
+% \end{macrocode}
+%
+% A pre shaping callback to mark hyphens as being hyphenation hyphens.
+% This runs before shaping to avoid affecting hyphens moved into
+% discretionaries during shaping.
+% \begin{macrocode}
+ local function process_softhyphen_pre(head, _context, _dir)
+ if softhyphenbool.mode ~= truebool.mode then return true end
+ for disc, sub in node.traverse_id(DISC, head) do
+ if sub == explicit_disc or sub == regular_disc then
+ for n, _ch, _f in node.traverse_char(disc.pre) do
+ local props = properties[n]
+ if not props then
+ props = {}
+ properties[n] = props
+ end
+ props[is_soft_hyphen_prop] = true
+ end
+ end
+ end
+ return true
+ end
+
+% \end{macrocode}
+%
+% Finally do the actual replacement after shaping. No checking for double processing here
+% since the operation is idempotent.
+% \begin{macrocode}
+ local function process_softhyphen_post(head, _context, _dir)
+ if softhyphenbool.mode ~= truebool.mode then return true end
+ for disc, sub in node.traverse_id(DISC, head) do
+ for n, ch, fid in node.traverse_glyph(disc.pre) do
+ local props = properties[n]
+ if softhyphen_fonts[fid] and ch == hyphen_char and props and props[is_soft_hyphen_prop] then
+ n.char = soft_hyphen_char
+ props.glyph_info = nil
+ end
+ end
+ end
+ return true
+ end
+
+ luatexbase.add_to_callback('pre_shaping_filter', process_softhyphen_pre, 'tagpdf.rewrite-softhyphen')
+ luatexbase.add_to_callback('post_shaping_filter', process_softhyphen_post, 'tagpdf.rewrite-softhyphen')
+end
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</lua>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index f786ede615..cb81541ad1 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -74,7 +74,7 @@
% It relies currently on that the code, that saved the box, correctly sets
% the command \verb+\l_tag_box_\int_use:N #1_tl+ to a positive value.
% The LaTeX commands will do that automatically
-% at some time but it is in the responsability of the user to
+% at some time but it is in the responsibility of the user to
% ensure that when using low-level code.
% If the internal command doesn't exist the box is assumed to be untagged.
% \end{function}
@@ -331,11 +331,12 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-checks-code} {2024-10-27} {0.99g}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
% \section{Messages}
+%
% \subsection{Messages related to mc-chunks}
% \begin{macro}{mc-nested}
% This message is issue is a mc is opened before the previous has been closed.
@@ -454,6 +455,18 @@
{ closing~structure~#1~tagged~\use:e{\prop_item:cn{g_@@_struct_#1_prop}{S}} }
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{struct-Ref-unknown}
+% This message is issued at the end, when the Ref keys are updated.
+% TODO: in debug mode it should report more info about the structure.
+% \begin{macrocode}
+\msg_new:nnn { tag } {struct-Ref-unknown}
+ {
+ #1~has~no~related~structure.\\
+ /Ref~not~updated.
+ }
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{tree-struct-still-open}
% Message issued at the end if there are beside Root other
% open structures on the stack.
@@ -639,7 +652,7 @@
% It relies on that the code that saved the box correctly set
% \verb+\l_tag_box_<box number>_tl+ to a positive value.
% The LaTeX commands will do that automatically
-% at some time but it is in the responsability of the user to
+% at some time but it is in the responsibility of the user to
% ensure that when using low-level code.
% If the internal command doesn't exist the box is assumed to be untagged.
% \begin{macrocode}
@@ -752,7 +765,7 @@
\cs_new_protected:Npn \@@_check_struct_used:n #1 %#1 label
{
\prop_get:cnNT
- {g_@@_struct_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop}
+ {g_@@_struct_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop}
{P}
\l_@@_tmpa_tl
{
@@ -773,7 +786,7 @@
\msg_error:nnn { tag } {role-missing} {#1}
}
{
- \prop_get:NnNTF \g_@@_role_tags_NS_prop {#2} \l_tmpa_tl
+ \prop_get:NnNTF \g_@@_role_tags_NS_prop {#2} \l_@@_tmpa_tl
{
\int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
{
@@ -795,7 +808,7 @@
\msg_error:nnn { tag } {role-missing} {#1}
}
{
- \prop_get:cnNTF { g_@@_role_NS_#3_prop } {#2} \l_tmpa_tl
+ \prop_get:cnNTF { g_@@_role_NS_#3_prop } {#2} \l_@@_tmpa_tl
{
\int_compare:nNnT {\l_@@_loglevel_int} > { 0 }
{
@@ -928,7 +941,7 @@
\l_@@_tmpa_tl
}
{
- \seq_clear:N \l_tmpa_seq
+ \seq_clear:N \l_@@_tmpa_seq
\int_step_inline:nnnn
{1}
{1}
@@ -940,7 +953,7 @@
{
\int_compare:nT
{
- \@@_property_ref:enn
+ \property_ref:enn
{mcid-####1}
{tagabspage}
{-1}
@@ -948,17 +961,17 @@
##1
}
{
- \seq_gput_right:Ne \l_tmpa_seq
+ \seq_gput_right:Ne \l_@@_tmpa_seq
{
Page##1-####1-
- \@@_property_ref:enn
+ \property_ref:enn
{mcid-####1}
{tagmcid}
{-1}
}
}
}
- \seq_show:N \l_tmpa_seq
+ \seq_show:N \l_@@_tmpa_seq
}
}
% \end{macrocode}
@@ -1124,24 +1137,24 @@
}
}
% \end{macrocode}
-% This tracks tag stop and start.
-% The tag-stop message should go before the int is increased.
-% The tag-start message after the int is decreased.
+% This tracks tag suspend and resume.
+% The tag-suspend message should go before the int is increased.
+% The tag-resume message after the int is decreased.
% \begin{macrocode}
-\msg_new:nnn { tag / debug } {tag-stop}
+\msg_new:nnn { tag / debug } {tag-suspend}
{
\int_if_zero:nTF
{#1}
- {Tagging~stopped}
- {Tagging~(not)~stopped~(already~inactive)}\\
+ {Tagging~suspended}
+ {Tagging~(not)~suspended~(already~inactive)}\\
level:~#1~==>~\int_eval:n{#1+1}\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
}
-\msg_new:nnn { tag / debug } {tag-start}
+\msg_new:nnn { tag / debug } {tag-resume}
{
\int_if_zero:nTF
{#1}
- {Tagging~restarted}
- {Tagging~(not)~restarted}\\
+ {Tagging~resumed}
+ {Tagging~(not)~resumed}\\
level:~\int_eval:n{#1+1}~==>~#1\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
}
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index 10a9c1dc8d..9da9be69b0 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.tex b/macros/latex/contrib/tagpdf/tagpdf-code.tex
index b483b96974..df05b99a30 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.tex
@@ -28,9 +28,18 @@
% The next line is needed so that \GetFileInfo will be able to pick up
% version data.
+\usepackage{iftex}
+%until l3doc is corrected
+\ifluatex
+\usepackage[TU]{fontenc}
+\ttfamily
+ \DeclareFontShape{TU}{lmtt}{m}{it}
+ {<-> \UnicodeFontFile{lmmonoslant10-regular}{}}{}
+\fi
\usepackage{longtable}
\usepackage{tagpdf}
-\makeatletter
+
+\input{tagpdf-docelements}
%\def\@setupverbvisiblespace{}
%\def\verb{\relax\ifmmode\hbox\else\leavevmode\null\fi
% \bgroup
@@ -38,13 +47,12 @@
% \verbatim@font\@noligs
% \language\l@nohyphenation
% \@ifstar\@verb\@verb}
-\makeatother
\begin{document}
\GetFileInfo{tagpdf.sty}
\title{%
- \pkg{tagpdf} -- A package to experiment with pdf tagging%
+ \pkg{tagpdf} -- \LaTeX{} kernel code for PDF tagging%
\thanks{This file describes \fileversion,
last revised \filedate.}%
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
index d8cba42142..9d4045e52d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -58,10 +58,10 @@
% \section{The LaTeX namespace}
% This is the main new namespace. It is bound to change a lot!
% It lists the new tag, the rolemap and the namespace of the rolemap.
-% latex-lab has also a namespace module, which takes precendence!
+% latex-lab has also a namespace module, which takes precedence!
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2024-10-27} {0.99g}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -93,7 +93,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2024-10-27} {0.99g}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -107,7 +107,7 @@ subparagraph, H6,pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2024-10-27} {0.99g}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -175,7 +175,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2024-10-27} {0.99g}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
StructTreeRoot,StructTreeRoot,pdf2,D,
Document,Document,pdf2,D,
@@ -232,7 +232,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2024-10-27} {0.99g}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -430,7 +430,7 @@ xor,xor,mathml,
% \section{Rule naming}
% \begin{macro}{\c_@@_role_rules_prop}
% These two properties map the rule strings to numbers and back.
-% There are in tagpdf-data.dtx near the csv files for easier maintainance.
+% There are in tagpdf-data.dtx near the csv files for easier maintenance.
% \begin{macrocode}
%<*package>
\prop_const_from_keyval:Nn \c_@@_role_rules_prop
@@ -467,7 +467,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2024-10-27} {0.99g}
,,,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 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-04-12} {0.99b}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2024-10-27} {0.99g}
,,,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/macros/latex/contrib/tagpdf/tagpdf-docelements.tex b/macros/latex/contrib/tagpdf/tagpdf-docelements.tex
new file mode 100644
index 0000000000..c388889aa1
--- /dev/null
+++ b/macros/latex/contrib/tagpdf/tagpdf-docelements.tex
@@ -0,0 +1,2 @@
+\ProvideDocElement[printtype=\textit{struct key},idxtype=key,idxgroup=Structure keys]{Structkeydecl}{structkeydecl}
+\ProvideDocElement[printtype=\textit{setup key},idxtype=key,idxgroup=Setup keys]{Setupkeydecl}{setupkeydecl}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index b1ce874db6..aef94ed20d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2024-10-27} {0.99g}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-debug-generic} {2024-10-27} {0.99g}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
@@ -393,12 +393,12 @@
% \end{macro}
% \begin{macro}{\@@_add_missing_mcs_to_stream:Nn}
-% This is the main command to add mc to the stream. It is therefor
+% This is the main command to add mc to the stream. It is therefore
% guarded by the mc-boolean.
%
% If we aren't in the main stream then processing is a bit more
% complicated because to get at the marks in the box we need to
-% artifically split it and then look at the split marks.
+% artificially split it and then look at the split marks.
%
% First argument is the box to update and the second is the \enquote{stream}.
% In lua mode the command is a no-op.
@@ -573,14 +573,14 @@
% \end{macrocode}
% revert the attribute:
% \begin{macrocode}
- \@@_property_gset:nnnn {tagmcid } { now }
+ \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@g_@@_MCID_abs_int
\tl_set:Ne \l_@@_mc_ref_abspage_tl
{
- \@@_property_ref:enn %3 args
+ \property_ref:enn %3 args
{
mcid-\int_use:N \c@g_@@_MCID_abs_int
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index 9db6cc95fa..7e794c2166 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,10 +46,10 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{implementation}
-% The code is splitted into three parts: code shared by all engines,
+% The code is split into three parts: code shared by all engines,
% code specific to luamode and code not used by luamode.
%
% \section{Marked content code -- luamode code}
@@ -86,11 +86,11 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2024-10-27} {0.99g}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-debug-lua} {2024-10-27} {0.99g}
{part of tagpdf - debugging code related to marking chunks - lua mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
index aeadb889d4..0ba0b26bfb 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -175,13 +175,13 @@
% \end{function}
% \end{documentation}
% \begin{implementation}
-% The code is splitted into three parts: code shared by all engines,
+% The code is split into three parts: code shared by all engines,
% code specific to luamode and code not used by luamode.
% \section{Marked content code -- shared}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2024-10-27} {0.99g}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
@@ -328,7 +328,7 @@
{
\@@_check_if_active_struct:T
{
- \tl_set:Ne \l_@@_tmpa_tl { \@@_property_ref:nnn{tagpdf-#1}{tagmcabs}{} }
+ \tl_set:Ne \l_@@_tmpa_tl { \property_ref:nnn{tagpdf-#1}{tagmcabs}{} }
\tl_if_empty:NTF\l_@@_tmpa_tl
{
\msg_warning:nnn {tag} {mc-label-unknown} {#1}
@@ -365,12 +365,12 @@
\tag_mc_end_push:
\tag_mc_begin:n {artifact=#1}
\group_begin:
- \tag_stop:n{artifact-group}
+ \tag_suspend:n{artifact-group}
}
\cs_set_protected:Npn \tag_mc_artifact_group_end:
{
- \tag_start:n{artifact-group}
+ \tag_resume:n{artifact-group}
\group_end:
\tag_mc_end:
\tag_mc_begin_pop:n{}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
index de239c2db7..ae93943491 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -33,7 +33,7 @@
%</driver>
% \fi
% \title{^^A
-% The \pkg{tagpdf-roles} module\\ Tags, roles and namesspace code ^^A
+% The \pkg{tagpdf-roles} module\\ Tags, roles and namespace code ^^A
% \\ Part of the tagpdf package
% }
%
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-roles-code} {2024-10-27} {0.99g}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
@@ -190,7 +190,7 @@
% \end{variable}
%
% \begin{variable}{\g_@@_role_tags_class_prop}
-% With pdf 2.0 we store the class in the NS dependant props.
+% With pdf 2.0 we store the class in the NS dependent props.
% With pdf <2.0 we store for now the type(s) of a tag in a common
% prop.
% Tags that are rolemapped should get the type from
@@ -750,19 +750,31 @@
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
- \cs_if_exist:NT \chapter
- {
- \prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
- {
- \@@_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
- }
- }
+ \bool_lazy_and:nnT
+ {
+ \cs_if_exist_p:N \chapter
+ }
+ {
+ \cs_if_exist_p:N \c@chapter
+ }
+ {
+ \prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
+ {
+ \@@_role_add_tag:ne {#1}{\use_i:nn #2\c_empty_tl\c_empty_tl}
+ }
+ }
}
}
{
\hook_gput_code:nnn {begindocument}{tagpdf}
{
- \cs_if_exist:NT \chapter
+ \bool_lazy_and:nnT
+ {
+ \cs_if_exist_p:N \chapter
+ }
+ {
+ \cs_if_exist_p:N \c@chapter
+ }
{
\prop_map_inline:cn{g_@@_role_NS_latex-book_prop}
{
@@ -1289,12 +1301,12 @@
tag-namespace=user,
role-namespace=, %so that we can test for it.
#1
- }{@@/tag-role}\l_tmpa_tl
- \tl_if_empty:NF \l_tmpa_tl
+ }{@@/tag-role}\l_@@_tmpa_tl
+ \tl_if_empty:NF \l_@@_tmpa_tl
{
- \exp_args:NNno \seq_set_split:Nnn \l_tmpa_seq { / } {\l_tmpa_tl/}
- \tl_set:Ne \l_@@_role_tag_tmpa_tl { \seq_item:Nn \l_tmpa_seq {1} }
- \tl_set:Ne \l_@@_role_role_tmpa_tl { \seq_item:Nn \l_tmpa_seq {2} }
+ \exp_args:NNno \seq_set_split:Nnn \l_@@_tmpa_seq { / } {\l_@@_tmpa_tl/}
+ \tl_set:Ne \l_@@_role_tag_tmpa_tl { \seq_item:Nn \l_@@_tmpa_seq {1} }
+ \tl_set:Ne \l_@@_role_role_tmpa_tl { \seq_item:Nn \l_@@_tmpa_seq {2} }
}
\tl_if_empty:NT \l_@@_role_role_namespace_tmpa_tl
{
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index 62c9fd1eca..51b7fb5eb4 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% \begin{function}{activate/space (setup-key),interwordspace (deprecated)}
@@ -58,7 +58,7 @@
% This key is deprecated. Use |debug/show=spaces| instead.
% This key works only with luatex and shows with small red
% bars where spaces have been inserted. This is only for debugging and
-% is not completly reliable (and change affect other literals and tagging), so it
+% is not completely reliable (and change affect other literals and tagging), so it
% should be used with care.
% \end{function}
% \end{documentation}
@@ -66,18 +66,19 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-space-code} {2024-10-27} {0.99g}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
% \section{Code for interword spaces}
-% The code is engine/backend dependant. Basically only pdftex and luatex
+% The code is engine/backend dependent. Basically only pdftex and luatex
% support real space chars. Most of the code for luatex which uses attributes
% is in the lua code, here are only the keys.
%
% \begin{macro}{activate/spaces (setup-key),interwordspace (deprecated),show-spaces (deprecated)}
% \begin{macrocode}
%<*package>
+\bool_new:N\l_@@_showspaces_bool
\keys_define:nn { @@ / setup }
{
activate/spaces .choice:,
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index 04ffa900cc..e4405ad92f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -27,6 +27,7 @@
\usepackage{array,booktabs,caption}
\hypersetup{pdfauthor=Ulrike Fischer,
pdftitle=tagpdf-tree module (tagpdf)}
+\input{tagpdf-docelements}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -46,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -95,7 +96,7 @@
% This inserts an annotation in the structure. \meta{object reference}
% is there reference to the annotation. \meta{struct parent number}
% should be the same number as had been inserted with \cs{tag_struct_parent_int:}
-% as |StructParent| value to the dictionary of the annotion.
+% as |StructParent| value to the dictionary of the annotation.
% The command will increase the value of the counter
% used by \cs{tag_struct_parent_int:}.
% \end{function}
@@ -120,10 +121,22 @@
% the third the value. Currently the only keyword is \texttt{ref} which updates
% the Ref key (an array)
% \end{function}
+%
+% \begin{function}{\tag_struct_gput_ref:nnn}
+% \begin{syntax}
+% \cs{tag_struct_gput_ref:nnn}\Arg{structure number}\Arg{keyword}\Arg{value}
+% \end{syntax}
+% This is an user interface to add a Ref key to an
+% existing structure. The target structure doesn't have to exist yet
+% but can be addressed by label, destname or even num.
+% \meta{keyword} is currently either \texttt{label}, \texttt{dest}
+% or \texttt{num}. The value is then either a label name, the name of a destination
+% or a structure number.
+% \end{function}
%
% \section{Public keys}
% \subsection{Keys for the structure commands}
-% \begin{function}{tag (struct-key)}
+% \begin{structkeydecl}{tag}
% This is required. The value of the key is normally one of the
% standard types listed in the main tagpdf documentation.
% It is possible to setup new tags/types.
@@ -132,72 +145,80 @@
% Currently the names spaces |pdf|, |pdf2|, |mathml| and |user| are defined.
% This allows to use a different name space than
% the one connected by default to the tag. But normally this should not be needed.
-% \end{function}
-% \begin{function}{stash (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{stash}
% Normally a new structure inserts itself as a kid
% into the currently active structure. This key prohibits this.
% The structure is nevertheless from now on
% \enquote{the current active structure}
% and parent for following marked content and structures.
-% \end{function}
-% \begin{function}{label (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{label}
% This key sets a label by which
% one can refer to the structure. It is e.g.
% used by \cs{tag_struct_use:n} (where a real label is actually not
% needed as you can only use structures already defined), and by the
% |ref| key (which can refer to future structures).
% Internally the label name will start with \texttt{tagpdfstruct-} and it stores
-% the two attributs |tagstruct| (the structure number) and |tagstructobj| (the
+% the two attributes |tagstruct| (the structure number) and |tagstructobj| (the
% object reference).
-% \end{function}
-% \begin{function}{parent (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{parent}
% By default a structure is added as kid to the currently active structure.
% With the parent key one can choose another parent. The value is a structure number which
% must refer to an already existing, previously created structure. Such a structure
% number can for example be have been stored with \cs{tag_get:n}, but one can also use
% a label on the parent structure and then use
% \cs{property_ref:nn}|{tagpdfstruct-label}{tagstruct}| to retrieve it.
-% \end{function}
-% \begin{function}{title (struct-key),title-o (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{firstkey}
+% If this key is used the structure is added at the left of the kids of
+% the parent structure (if the structure is not stashed).
+% This means that it will be the first kid of the structure
+% (unless some later structure uses the key too).
+% \end{structkeydecl}
+% \begin{structkeydecl}{title,title-o}
% This keys allows to set the dictionary entry
% \texttt{/Title} in the structure object.
% The value is handled as verbatim string and hex encoded.
% Commands are not expanded. |title-o| will expand the value once.
-% \end{function}
+% \end{structkeydecl}
%
-% \begin{function}{alt (struct-key)}
+% \begin{structkeydecl}{alt}
% This key inserts an \texttt{/Alt} value in the dictionary of structure object.
% The value is handled as verbatim string and hex encoded.
% The value will be expanded first once. If it is empty, nothing will happen.
-% \end{function}
-% \begin{function}{actualtext (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{actualtext}
% This key inserts an \texttt{/ActualText} value in the dictionary of structure object.
% The value is handled as verbatim string and hex encoded.
% The value will be expanded first once. If it is empty, nothing will happen.
-% \end{function}
-% \begin{function}{lang (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{lang}
% This key allows to set the language for a structure element. The value should be a bcp-identifier,
% e.g. |de-De|.
-% \end{function}
-% \begin{function}{ref (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{ref}
% This key allows to add references to other structure elements,
% it adds the |/Ref| array to the structure.
% The value should be a comma separated list of structure labels
% set with the |label| key. e.g. |ref={label1,label2}|.
-% \end{function}
-% \begin{function}{E (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{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).
-% \end{function}
-% \begin{function}{AF (struct-key),AFref (struct-key),
-% AFinline (struct-key),AFinline-o (struct-key),texsource,mathml}
+% \end{structkeydecl}
+% \begin{structkeydecl}{AF,AFref,
+% AFinline,AFinline-o,texsource,mathml}
+% These keys handle associated files in the structure element.
+%
% \begin{syntax}
% AF = \meta{object name}\\
% AFref = \meta{object reference}\\
% AF-inline = \meta{text content}\\
% \end{syntax}
-% These keys allows to reference an associated file in the structure element.
+%
% The value \meta{object name} should be the name of an object pointing
% to the \texttt{/Filespec} dictionary as expected by
% |\pdf_object_ref:n| from a current \texttt{l3kernel}.
@@ -209,15 +230,16 @@
% Future versions will perhaps extend this to more mime types, but it is
% still a research task to find out what is really needed.
%
-% |texsource| is a special variant of |AF-inline-o| which embeds the file
-% as |.tex| source with the |/AFrelationship| key set to |/Source|. It also sets the |/Desc| key
-% to a (currently) fix text.
+% |texsource| is a special variant of |AF-inline-o| which embeds the content
+% as |.tex| source with the |/AFrelationship| key set to |/Source|.
+% It also sets the |/Desc| key to a (currently) fix text.
%
-% |mathml| is a special variant of |AF-inline-o| which embeds the file
+% |mathml| is a special variant of |AF-inline-o| which embeds the content
% as |.xml| file with the |/AFrelationship| key set to |/Supplement|.
% It also sets the |/Desc| key to a (currently) fix text.
%
-% The argument of |AF| is an object name referring an embedded file as declared for example with
+% The argument of |AF| is an object name referring an embedded file as declared
+% for example with
% \cs{pdf_object_new:n} or with the l3pdffile module. |AF| expands its argument
% (this allows e.g. to use some variable for automatic numbering)
% and can be used more than once, to associate more than one file.
@@ -231,9 +253,9 @@
% does not check if the reference is valid!}
%
% The inline keys can be used only once per structure. Additional calls are ignored.
-% \end{function}
+% \end{structkeydecl}
%
-% \begin{function}{attribute (struct-key)}
+% \begin{structkeydecl}{attribute}
% This key takes as argument a comma list of attribute names
% (use braces to protect the commas from the external key-val parser)
% and allows to add one or more attribute dictionary entries in
@@ -243,16 +265,17 @@
% \end{verbatim}
% Attribute names and their content must be declared first in \cs{tagpdfsetup}.
%
-% \end{function}
+% \end{structkeydecl}
%
-% \begin{function}{attribute-class (struct-key)}
+% \begin{structkeydecl}{attribute-class}
% This key takes as argument a comma list of attribute class names
% (use braces to protect the commas from the external key-val parser)
% and allows to add one or more attribute classes to the structure object.
%
% Attribute class names and their content
% must be declared first in \cs{tagpdfsetup}.
-% \end{function}
+% \end{structkeydecl}
+%
% \subsection{Setup keys}
% \begin{function}{role/new-attribute (setup-key), newattribute (deprecated)}
% \begin{syntax}
@@ -272,20 +295,20 @@
% \end{verbatim}
%
% \end{function}
-% \begin{function}{root-AF (setup-key)}
+% \begin{setupkeydecl}{root-AF}
% \begin{syntax}
% root-AF = \meta{object name}
% \end{syntax}
% This key can be used in the setup command \cs{tagpdfsetup} and allows
% to add associated files to the root structure. Like |AF| it can be used more than
% once to add more than one file.
-% \end{function}
+% \end{setupkeydecl}
% \end{documentation}
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-struct-code} {2024-10-27} {0.99g}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -323,7 +346,7 @@
% in generic mode it can happen after
% a page break that we have to inject into a structure
% sequence an additional mc after. We will store this additional
-% info in a property. The key is the absolut mc num, the value the pdf directory.
+% info in a property. The key is the absolute mc num, the value the pdf directory.
% \begin{macrocode}
\@@_prop_new:N \g_@@_struct_cont_mc_prop
% \end{macrocode}
@@ -419,7 +442,7 @@
T, %title, value in () or <>
Lang, %language
Alt, % value in () or <>
- E, % abreviation
+ E, % abbreviation
ActualText,
AF, %pdf 2.0, array of dict, associated files
NS, %pdf 2.0, dict, namespace
@@ -442,12 +465,16 @@
\tl_new:N \l_@@_struct_roletag_NS_tl
% \end{macrocode}
% \end{variable}
-% \begin{variable}{\l_@@_struct_key_label_tl}
-% This will hold the label value.
+% \begin{variable}{\g_@@_struct_label_num_prop}
+% This will hold for every structure label the associated
+% structure number. The prop will allow to
+% fill the /Ref key directly at the first compilation if the ref
+% key is used.
% \begin{macrocode}
-\tl_new:N \l_@@_struct_key_label_tl
+\prop_new_linked:N \g_@@_struct_label_num_prop
% \end{macrocode}
% \end{variable}
+
% \begin{variable}{\l_@@_struct_elem_stash_bool}
% This will keep track of the stash status
% \begin{macrocode}
@@ -455,6 +482,15 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\l_@@_struct_addkid_tl}
+% This decides if a structure kid is added at the left or right of the parent.
+% The default is \texttt{right}.
+% \begin{macrocode}
+\tl_new:N \l_@@_struct_addkid_tl
+\tl_set:Nn \l_@@_struct_addkid_tl {right}
+% \end{macrocode}
+% \end{variable}
+
% \subsection{Variables used by tagging code of basic elements}
%
% \begin{variable}{\g_@@_struct_dest_num_prop}
@@ -473,6 +509,7 @@
% This variable contains structures whose Ref key should be updated
% at the end to point to structured related with this destination.
% As this is probably need in other places too, it is not only a toc-variable.
+% TODO: remove after 11/2024 release.
% \begin{macrocode}
\prop_new_linked:N \g_@@_struct_ref_by_dest_prop
% \end{macrocode}
@@ -523,7 +560,7 @@
{ g_@@_struct_#1_prop }{#2}{#3}
%<debug>\prop_gput:cnn { g_@@_struct_debug_#1_prop } {#2} {#3}
}
-\cs_generate_variant:Nn \@@_struct_prop_gput:nnn {nne,nee,nno}
+\cs_generate_variant:Nn \@@_struct_prop_gput:nnn {onn,nne,nee,nno}
%</package|debug>
% \end{macrocode}
% \end{macro}
@@ -696,16 +733,17 @@
/Type \c_space_tl /MCR \c_space_tl
/Pg
\c_space_tl
- \pdf_pageobject_ref:n { \@@_property_ref:enn{mcid-#1}{tagabspage}{1} }
- /MCID \c_space_tl \@@_property_ref:enn{mcid-#1}{tagmcid}{1}
+ \pdf_pageobject_ref:n { \property_ref:enn{mcid-#1}{tagabspage}{1} }
+ /MCID \c_space_tl \property_ref:enn{mcid-#1}{tagmcid}{1}
>>
}
%</package>
% \end{macrocode}
% \begin{macrocode}
%<*package|debug>
-%<package>\cs_new_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2 %#1 structure num, #2 MCID absnum%
-%<debug>\cs_set_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2 %#1 structure num, #2 MCID absnum%
+%<package>\cs_new_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2
+%<debug>\cs_set_protected:Npn \@@_struct_kid_mc_gput_right:nn #1 #2
+%#1 structure num, #2 MCID absnum%
{
\@@_seq_gput_right:ce
{ g_@@_struct_kids_#1_seq }
@@ -733,8 +771,9 @@
% This commands adds a structure as kid. We only need to record the object
% reference in the sequence.
% \begin{macrocode}
-%<package>\cs_new_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct
-%<debug>\cs_set_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2 %#1 num of parent struct, #2 kid struct
+%<package>\cs_new_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2
+%<debug>\cs_set_protected:Npn\@@_struct_kid_struct_gput_right:nn #1 #2
+%%#1 num of parent struct, #2 kid struct
{
\@@_seq_gput_right:ce
{ g_@@_struct_kids_#1_seq }
@@ -747,10 +786,35 @@
%<debug> Struct~#2
%<debug> }
}
-
%<package>\cs_generate_variant:Nn \@@_struct_kid_struct_gput_right:nn {ee}
% \end{macrocode}
% \end{macro}
+% \begin{macro}
+% {
+% \@@_struct_kid_struct_gput_left:nn,\@@_struct_kid_struct_gput_left:ee
+% }
+% This commands adds a structure as kid one the left, so as first
+% kid. We only need to record the object reference in the sequence.
+% \begin{macrocode}
+%<package>\cs_new_protected:Npn\@@_struct_kid_struct_gput_left:nn #1 #2
+%<debug>\cs_set_protected:Npn\@@_struct_kid_struct_gput_left:nn #1 #2
+%%#1 num of parent struct, #2 kid struct
+ {
+ \@@_seq_gput_left:ce
+ { g_@@_struct_kids_#1_seq }
+ {
+ \pdf_object_ref_indexed:nn { @@/struct }{ #2 }
+ }
+%<debug> \seq_gput_left:cn
+%<debug> { g_@@_struct_debug_kids_#1_seq }
+%<debug> {
+%<debug> Struct~#2
+%<debug> }
+ }
+%<package>\cs_generate_variant:Nn \@@_struct_kid_struct_gput_left:nn {ee}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}
% {\@@_struct_kid_OBJR_gput_right:nnn,\@@_struct_kid_OBJR_gput_right:eee}
% At last the command to add an OBJR object. This has to write an object first.
@@ -759,10 +823,11 @@
% object reference
%
% \begin{macrocode}
-%<package>\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3 %#1 num of parent struct,
-%<package> %#2 obj reference
-%<package> %#3 page object reference
+%<package>\cs_new_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3
+%<package>
+%<package>
%<debug>\cs_set_protected:Npn\@@_struct_kid_OBJR_gput_right:nnn #1 #2 #3
+%%#1 num of parent struct,#2 obj reference,#3 page object reference
{
\pdf_object_unnamed_write:nn
{ dict }
@@ -902,39 +967,52 @@
% Basically it does what |\pdfdict_use:n| does.
% This is used a lot so should be rather fast.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_get_dict_content:nN #1 #2 %#1: stucture num
+\cs_new_protected:Npn \@@_struct_get_dict_content:nN #1 #2 %#1: structure num
{
\tl_clear:N #2
\prop_map_inline:cn { g_@@_struct_#1_prop }
{
- \tl_put_right:Ne #2
- {
% \end{macrocode}
% Some keys needs the option to format the value, e.g. add brackets for an
% array, we also need the option to ignore some entries in the properties.
-% \begin{macrocode}
- \cs_if_exist_use:cTF {@@_struct_format_##1:nn}
- {{##1}{##2}}
- {\c_space_tl/##1~##2}
+% \begin{macrocode}
+ \cs_if_exist_use:cTF {@@_struct_format_##1:nnN}
+ {
+ {##1}{##2}#2
}
- }
+ {
+ \tl_put_right:Ne #2 { \c_space_tl/##1~##2 }
+ }
+ }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_struct_format_rolemap:nn,\@@_struct_format_parentrole:nn}
+% \begin{macro}{\@@_struct_format_rolemap:nnN,\@@_struct_format_parentrole:nnN}
% This two entries should not end in the PDF.
% \begin{macrocode}
-\cs_new:Nn\@@_struct_format_rolemap:nn{}
-\cs_new:Nn\@@_struct_format_parentrole:nn{}
+\cs_new:Nn\@@_struct_format_rolemap:nnN{}
+\cs_new:Nn\@@_struct_format_parentrole:nnN{}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\@@_struct_format_Ref:nn}
-% Ref is an array, we store only the content to be able to extend it
-% so the formatting command adds the brackets:
+% \begin{macro}{\@@_struct_format_Ref:nnN}
+% Ref is an array, we store values as a clist of commands that must
+% be executed here, the formatting has to add also brackets.
+%
% \begin{macrocode}
-\cs_new:Nn\__tag_struct_format_Ref:nn{\c_space_tl/#1~[#2]}
+\cs_new_protected:Nn\@@_struct_format_Ref:nnN
+ {
+ \tl_put_right:Nn #3 { ~/#1~[ } %]
+ \clist_map_inline:nn{ #2 }
+ {
+ ##1 #3
+ }
+ \tl_put_right:Nn #3
+ { %[
+ \c_space_tl]
+ }
+ }
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@@_struct_write_obj:n}
@@ -953,7 +1031,8 @@
% \begin{macrocode}
\prop_get:cnNF { g_@@_struct_#1_prop } {P}\l_@@_tmpb_tl
{
- \prop_gput:cne { g_@@_struct_#1_prop } {P}{\pdf_object_ref_indexed:nn { @@/struct }{1}}
+ \prop_gput:cne { g_@@_struct_#1_prop } {P}
+ {\pdf_object_ref_indexed:nn { @@/struct }{1}}
\prop_gput:cne { g_@@_struct_#1_prop } {S}{/Artifact}
\seq_if_empty:cF {g_@@_struct_kids_#1_seq}
{
@@ -1005,8 +1084,9 @@
% \tag_struct_end:
% \end{verbatim}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_insert_annot:nn #1 #2 %#1 object reference to the annotation/xform
- %#2 structparent number
+\cs_new_protected:Npn \@@_struct_insert_annot:nn #1 #2
+ %#1 object reference to the annotation/xform
+ %#2 structparent number
{
\bool_if:NT \g_@@_active_struct_bool
{
@@ -1028,7 +1108,8 @@
#1 %
}
{
- \pdf_pageobject_ref:n { \@@_property_ref:nnn {@tag@objr@page@#2 }{ tagabspage }{1} }
+ \pdf_pageobject_ref:n
+ { \property_ref:nnn {@tag@objr@page@#2 }{ tagabspage }{1} }
}
% add the parent obj number to the parent tree:
\exp_args:Nne
@@ -1037,7 +1118,8 @@
#2
}
{
- \pdf_object_ref_indexed:nn { @@/struct }{ \l_@@_struct_stack_parent_tmpa_tl }
+ \pdf_object_ref_indexed:nn
+ { @@/struct }{ \l_@@_struct_stack_parent_tmpa_tl }
}
% increase the int:
\int_gincr:N \c@g_@@_parenttree_obj_int
@@ -1112,7 +1194,8 @@
\socket_new:nn { tag/struct/tag }{1}
\socket_new_plug:nnn { tag/struct/tag }{ latex-tags }
{
- \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
+ \seq_set_split:Nne \l_@@_tmpa_seq { / }
+ {#1/\prop_item:Ne\g__tag_role_tags_NS_prop{#1}}
\tl_gset:Ne \g_@@_struct_tag_tl { \seq_item:Nn\l_@@_tmpa_seq {1} }
\tl_gset:Ne \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }
\@@_check_structure_tag:N \g_@@_struct_tag_tl
@@ -1120,10 +1203,12 @@
\socket_new_plug:nnn { tag/struct/tag }{ pdf-tags }
{
- \seq_set_split:Nne \l_@@_tmpa_seq { / } {#1/\prop_item:Ne\g_@@_role_tags_NS_prop{#1}}
+ \seq_set_split:Nne \l_@@_tmpa_seq { / }
+ {#1/\prop_item:Ne\g_@@_role_tags_NS_prop{#1}}
\tl_gset:Ne \g_@@_struct_tag_tl { \seq_item:Nn\l_@@_tmpa_seq {1} }
\tl_gset:Ne \g_@@_struct_tag_NS_tl{ \seq_item:Nn\l_@@_tmpa_seq {2} }
- \@@_role_get:VVNN \g_@@_struct_tag_tl\g_@@_struct_tag_NS_tl\l_@@_tmpa_tl\l_@@_tmpb_tl
+ \@@_role_get:VVNN
+ \g_@@_struct_tag_tl \g_@@_struct_tag_NS_tl \l_@@_tmpa_tl \l_@@_tmpb_tl
\tl_gset:Ne \g_@@_struct_tag_tl {\l_@@_tmpa_tl}
\tl_gset:Ne \g_@@_struct_tag_NS_tl{\l_@@_tmpb_tl}
\@@_check_structure_tag:N \g_@@_struct_tag_tl
@@ -1131,24 +1216,32 @@
\socket_assign_plug:nn { tag/struct/tag } {latex-tags}
% \end{macrocode}
-% \begin{macro}
+% \begin{structkeydecl}
% {
-% label (struct-key),
-% stash (struct-key),
-% parent (struct-key),
-% tag (struct-key),
-% title (struct-key),
-% title-o (struct-key),
-% alt (struct-key),
-% actualtext (struct-key),
-% lang (struct-key),
-% ref (struct-key),
-% E (struct-key)
+% label,
+% stash,
+% parent,
+% firstkid,
+% tag,
+% title,
+% title-o,
+% alt,
+% actualtext,
+% lang,
+% ref,
+% E
% }
% \begin{macrocode}
\keys_define:nn { @@ / struct }
{
- label .tl_set:N = \l_@@_struct_key_label_tl,
+ label .code:n =
+ {
+ \prop_gput:Nee\g_@@_struct_label_num_prop
+ {#1}{\int_use:N \c@g_@@_struct_abs_int}
+ \@@_property_record:eV
+ {tagpdfstruct-#1}
+ \c_@@_property_struct_clist
+ },
stash .bool_set:N = \l_@@_struct_elem_stash_bool,
parent .code:n =
{
@@ -1166,7 +1259,8 @@
{ parent~key~ignored }
}
},
- parent .default:n = {-1},
+ parent .default:n = {-1},
+ firstkid .code:n = { \tl_set:Nn \l_@@_struct_addkid_tl {left} },
tag .code:n = % S property
{
\socket_use:nn { tag/struct/tag }{#1}
@@ -1233,19 +1327,77 @@
{ Lang }
{ (#1) }
},
+ }
% \end{macrocode}
-% Ref is an array, the brackets are added through the formatting command.
+% \end{structkeydecl}
+% Ref is rather special as it values are often
+% known only at the end of the document.
+% It therefore stores it values as
+% clist of commands which are executed at the end of the document,
+% when the structure elements are written.
+% \begin{macro}{\@@_struct_Ref_obj:nN,\@@_struct_Ref_label:nN,
+% \@@_struct_Ref_dest:nN,\@@_struct_Ref_num:nN}
+% this commands are helper commands that are stored as clist
+% in the Ref key of a structure. They are executed when the structure
+% elements are written in \cs{@@_struct_write_obj}. They are used
+% in \cs{@@_struct_format_Ref}. They allow to add a Ref by object reference,
+% label, destname and structure number
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_struct_Ref_obj:nN #1 #2 %#1 a object reference
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl#1
+ }
+ }
+
+\cs_new_protected:Npn \@@_struct_Ref_label:nN #1 #2 %#1 a label
+ {
+ \prop_get:NnNTF \g_@@_struct_label_num_prop {#1} \l_@@_tmpb_tl
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl\tag_struct_object_ref:e{ \l_@@_tmpb_tl }
+ }
+ }
+ {
+ \msg_warning:nnn {tag}{struct-Ref-unknown}{Label~'#1'}
+ }
+ }
+\cs_new_protected:Npn \@@_struct_Ref_dest:nN #1 #2 %#1 a dest name
+ {
+ \prop_get:NnNTF \g_@@_struct_dest_num_prop {#1} \l_@@_tmpb_tl
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl\tag_struct_object_ref:e{ \l_@@_tmpb_tl }
+ }
+ }
+ {
+ \msg_warning:nnn {tag}{struct-Ref-unknown}{Destination~'#1'}
+ }
+ }
+\cs_new_protected:Npn \@@_struct_Ref_num:nN #1 #2 %#1 a structure number
+ {
+ \tl_put_right:Ne#2
+ {
+ \c_space_tl\tag_struct_object_ref:e{ #1 }
+ }
+ }
+
+% \end{macrocode}
+% \end{macro}
+% \begin{structkeydecl}{ref,E,}
% \begin{macrocode}
+\keys_define:nn { @@ / struct }
+ {
ref .code:n = % ref property
{
- \tl_clear:N\l_@@_tmpa_tl
\clist_map_inline:on {#1}
{
- \tl_put_right:Ne \l_@@_tmpa_tl
- {~\@@_property_ref:en{tagpdfstruct-##1}{tagstructobj} }
+ \tag_struct_gput:nne
+ {\int_use:N \c@g_@@_struct_abs_int}{ref_label}{ ##1 }
}
- \@@_struct_gput_data_ref:ee
- { \int_use:N \c@g_@@_struct_abs_int } {\l_@@_tmpa_tl}
},
E .code:n = % E property
{
@@ -1261,16 +1413,16 @@
},
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{AF (struct-key), AFref (struct-key),
-% AFinline (struct-key),AFinline-o (struct-key)}
+% \end{structkeydecl}
+%
+% \begin{structkeydecl}{AF, AFref,AFinline,AFinline-o,texsource,mathml}
% keys for the AF keys (associated files). They use commands from l3pdffile!
% The stream variants use txt as extension to get the mimetype.
% TODO: check if this should be configurable. For math we will perhaps need another
% extension.
% AF/AFref is an array and can be used more than once, so we store it in a tl.
% which is expanded.
-% AFinline currently uses the fix extention txt.
+% AFinline currently uses the fix extension txt.
% texsource is a special variant which creates a tex-file, it expects a
% tl-var as value (e.g. from math grabbing)
%
@@ -1314,7 +1466,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2 % #1 struct num #2 object reference
+\cs_new_protected:Npn \@@_struct_add_AF:nn #1 #2
+% #1 struct num #2 object reference
{
\tl_if_exist:cTF
{
@@ -1340,7 +1493,8 @@
{
\pdf_object_if_exist:eTF {#1}
{
- \@@_struct_add_AF:ee { \int_use:N \c@g_@@_struct_abs_int }{\pdf_object_ref:e {#1}}
+ \@@_struct_add_AF:ee
+ { \int_use:N \c@g_@@_struct_abs_int }{\pdf_object_ref:e {#1}}
\@@_struct_prop_gput:nne
{ \int_use:N \c@g_@@_struct_abs_int }
{ AF }
@@ -1397,8 +1551,8 @@
}
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{root-AF (setup-key)}
+% \end{structkeydecl}
+% \begin{setupkeydecl}{root-AF}
% The root structure can take AF keys too, so we provide a key for it.
% This key is used with |\tagpdfsetup|, not in a structure!
% \begin{macrocode}
@@ -1425,7 +1579,7 @@
},
}
% \end{macrocode}
-% \end{macro}
+% \end{setupkeydecl}
% \section{User commands}
% We allow to set a language by default
% \begin{macro}{\l_@@_struct_lang_tl}
@@ -1481,13 +1635,6 @@
\g_@@_struct_tag_tl
\g_@@_struct_tag_NS_tl
\@@_check_structure_has_tag:n { \int_use:N \c@g_@@_struct_abs_int }
- \tl_if_empty:NF
- \l_@@_struct_key_label_tl
- {
- \@@_property_record:eV
- {tagpdfstruct-\l_@@_struct_key_label_tl}
- \c_@@_property_struct_clist
- }
% \end{macrocode}
% The structure number of the parent is either taken from the stack or
% has been set with the parent key.
@@ -1579,6 +1726,7 @@
{ g_@@_struct_ \l_@@_struct_stack_parent_tmpa_tl _prop}
{S}
\l_@@_tmpa_tl
+ \quark_if_no_value:NT\l_@@_tmpa_tl{\tl_set:Nn \l_@@_tmpa_tl{UNKNOWN}}
\msg_warning:nneee
{ tag }
{role-parent-child}
@@ -1612,7 +1760,7 @@
%record this structure as kid:
%\tl_show:N \g_@@_struct_stack_current_tl
%\tl_show:N \l_@@_struct_stack_parent_tmpa_tl
- \@@_struct_kid_struct_gput_right:ee
+ \use:c { @@_struct_kid_struct_gput_ \l_@@_struct_addkid_tl :ee }
{ \l_@@_struct_stack_parent_tmpa_tl }
{ \g_@@_struct_stack_current_tl }
%\prop_show:c { g_@@_struct_\g_@@_struct_stack_current_tl _prop }
@@ -1705,16 +1853,16 @@
\@@_check_if_active_struct:T
{
\prop_if_exist:cTF
- { g_@@_struct_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop } %
+ { g_@@_struct_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{unknown}_prop } %
{
\@@_check_struct_used:n {#1}
%add the label structure as kid to the current structure (can be the root)
\@@_struct_kid_struct_gput_right:ee
{ \g_@@_struct_stack_current_tl }
- { \@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1} }
+ { \property_ref:enn{tagpdfstruct-#1}{tagstruct}{1} }
%add the current structure to the labeled one as parents
\@@_prop_gput:cne
- { g_@@_struct_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
+ { g_@@_struct_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
{ P }
{
\pdf_object_ref_indexed:nn { @@/struct } { \g_@@_struct_stack_current_tl }
@@ -1723,7 +1871,7 @@
% debug code
% \begin{macrocode}
%<debug> \prop_gput:cne
-%<debug> { g_@@_struct_debug_\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
+%<debug> { g_@@_struct_debug_\property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}_prop }
%<debug> { P }
%<debug> {
%<debug> parent~structure:~\g_@@_struct_stack_current_tl\c_space_tl=~
@@ -1735,7 +1883,7 @@
% the global tl-vars:
% \begin{macrocode}
\@@_struct_get_parentrole:eNN
- {\@@_property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}}
+ {\property_ref:enn{tagpdfstruct-#1}{tagstruct}{1}}
\l_@@_tmpa_tl
\l_@@_tmpb_tl
\@@_check_parent_child:VVVVN
@@ -1852,6 +2000,7 @@
\pdf_object_ref_indexed:nn {@@/struct}{ #1 }
}
\cs_generate_variant:Nn \tag_struct_object_ref:n {e}
+%</package>
% \end{macrocode}
%
% \end{macro}
@@ -1863,10 +2012,18 @@
% adjusted to the key in question.
% The first argument is the number of the structure,
% the second a keyword referring to a function,
-% the third the value. Currently the only keyword is \texttt{ref} which updates
-% the Ref key (an array)
-% \begin{macrocode}
-\cs_new_protected:Npn \tag_struct_gput:nnn #1 #2 #3
+% the third the value. Currently the existing keywords are all related
+% to the \texttt{Ref} key (an array).
+% The keyword \texttt{ref} takes as value an explicit object reference to
+% a structure. The keyword \texttt{ref_label} expects as value a label name (from
+% a label set in a \cs{tagstructbegin} command). The keyword \texttt{ref_dest}
+% expects a destination name set with \cs{MakeLinkTarget}. It then will refer to
+% the structure in which this \cs{MakeLinkTarget} was used. At last
+% the keyword \texttt{ref_num} expects a structure number.
+% \begin{macrocode}
+%<base>\cs_new_protected:Npn \tag_struct_gput:nnn #1 #2 #3{}
+%<*package>
+\cs_set_protected:Npn \tag_struct_gput:nnn #1 #2 #3
{
\cs_if_exist_use:cF {@@_struct_gput_data_#2:nn}
{ %warning??
@@ -1879,22 +2036,47 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_struct_gput_data_ref:nn}
+% \begin{macro}{\@@_struct_gput_data_ref_aux:nnn}
% \begin{macrocode}
%<*package>
-\cs_new_protected:Npn \@@_struct_gput_data_ref:nn #1 #2
- % #1 receiving struct num, #2 list of object ref
+\cs_new_protected:Npn \@@_struct_gput_data_ref_aux:nnn #1 #2 #3
+ % #1 receiving struct num, #2 key word #3 value
{
- \prop_get:cnN
- { g_@@_struct_#1_prop }
- {Ref}
- \l_@@_get_tmpc_tl
- \@@_struct_prop_gput:nne
- { #1 }
- { Ref }
- { \quark_if_no_value:NF\l_@@_get_tmpc_tl { \l_@@_get_tmpc_tl\c_space_tl }#2 }
+ \prop_get:cnNTF
+ { g_@@_struct_#1_prop }
+ {Ref}
+ \l_@@_get_tmpc_tl
+ {
+ \tl_put_right:No \l_@@_get_tmpc_tl
+ {\cs:w @@_struct_Ref_#2:nN \cs_end: {#3},}
+ }
+ {
+ \tl_set:No \l_@@_get_tmpc_tl
+ {\cs:w @@_struct_Ref_#2:nN \cs_end: {#3},}
+ }
+ \@@_struct_prop_gput:nno
+ { #1 }
+ { Ref }
+ { \l_@@_get_tmpc_tl }
}
-\cs_generate_variant:Nn \@@_struct_gput_data_ref:nn {ee}
+\cs_new_protected:Npn \@@_struct_gput_data_ref:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{obj}{#2}
+ }
+\cs_new_protected:Npn \@@_struct_gput_data_ref_label:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{label}{#2}
+ }
+\cs_new_protected:Npn \@@_struct_gput_data_ref_dest:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{dest}{#2}
+ }
+\cs_new_protected:Npn \@@_struct_gput_data_ref_num:nn #1 #2
+ {
+ \@@_struct_gput_data_ref_aux:nnn {#1}{num}{#2}
+ }
+
+\cs_generate_variant:Nn \@@_struct_gput_data_ref:nn {ee,no}
% \end{macrocode}
% \end{macro}
% \begin{macro}
@@ -1936,7 +2118,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-attr-code} {2024-10-27} {0.99g}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
@@ -1962,7 +2144,7 @@
\tl_new:N \l_@@_attr_value_tl
\prop_new:N \g_@@_attr_objref_prop %will contain obj num of used attributes
% \end{macrocode}
-% This seq is currently kept for compability with the table code.
+% This seq is currently kept for compatibility with the table code.
% \begin{macrocode}
\seq_new:N\g_@@_attr_class_used_seq
% \end{macrocode}
@@ -2011,7 +2193,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{attribute-class (struct-key)}
+% \begin{structkeydecl}{attribute-class}
% attribute-class has to store the used attribute names so that
% they can be added to the ClassMap later.
% \begin{macrocode}
@@ -2053,8 +2235,8 @@
}
}
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{attribute (struct-key)}
+% \end{structkeydecl}
+% \begin{structkeydecl}{attribute}
% \begin{macrocode}
\keys_define:nn { @@ / struct }
{
@@ -2111,5 +2293,5 @@
}
%</package>
% \end{macrocode}
-% \end{macro}
+% \end{structkeydecl}
% \end{implementation}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index 6319250523..36032d1799 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-tree-code} {2024-10-27} {0.99g}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
@@ -118,7 +118,7 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{viewer/startpage (setup-key)}
+% \begin{macro}{viewer/startstructure (setup-key)}
% We also need an option to setup the start structure. So we setup a key
% which sets the variable to the current structure. This still requires
% hyperref to do most of the job, this should perhaps be changed.
@@ -275,6 +275,10 @@
{
\l_@@_tmpa_tl
}
+% \end{macrocode}
+% Better put S back, see https://github.com/latex3/tagging-project/issues/86
+% \begin{macrocode}
+ \prop_gput:cnn { g_@@_struct_1_prop } {S}{ /StructTreeRoot }
}
% \end{macrocode}
% \end{macro}
@@ -363,11 +367,11 @@
{
%mcid####1
\int_compare:nT
- {\@@_property_ref:enn{mcid-####1}{tagabspage}{-1}=##1} %mcid is on current page
+ {\property_ref:enn{mcid-####1}{tagabspage}{-1}=##1} %mcid is on current page
{% yes
\prop_put:Nee
\l_@@_tmpa_prop
- {\@@_property_ref:enn{mcid-####1}{tagmcid}{-1}}
+ {\property_ref:enn{mcid-####1}{tagmcid}{-1}}
{\prop_item:Nn \g_@@_mc_parenttree_prop {####1}}
}
}
@@ -506,7 +510,7 @@
{
\tl_clear:N \l_@@_tmpa_tl
% \end{macrocode}
-% We process the older sec for compability with the table code.
+% We process the older sec for compatibility with the table code.
% TODO: check if still needed
% \begin{macrocode}
\seq_map_inline:Nn \g_@@_attr_class_used_seq
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index 099cd95299..86cd4aced0 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -33,7 +33,8 @@
%</driver>
% \fi
% \title{^^A
-% The \pkg{tagpdf-user} module\\ Code related to \LaTeX2e user commands and document commands ^^A
+% The \pkg{tagpdf-user} module\\
+% Code related to \LaTeX2e user commands and document commands ^^A
% \\ Part of the tagpdf package
% }
%
@@ -46,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.99b, released 2024-04-12}
+% \date{Version 0.99g, released 2024-10-27}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -265,41 +266,53 @@
% \begin{syntax}
% \cs{tag_socket_use:n} \Arg{socket name}\\
% \cs{tag_socket_use:nn} \Arg{socket name} \Arg{socket argument}\\
+% \cs{tag_socket_use:nn} \Arg{socket name} \Arg{socket argument} \Arg{socket argument}\\
+% \cs{tag_socket_use_expandable:n} \Arg{socket name}\\
% \cs{UseTaggingSocket} \Arg{socket name} \\
% \cs{UseTaggingSocket} \Arg{socket name} \Arg{socket argument}\\
+% \cs{UseTaggingSocket} \Arg{socket name} \Arg{socket argument}\Arg{socket argument}\\
% \end{syntax}
% \end{function}
-
-% The next \LaTeX{} (2024-06-01) will use special sockets for the tagging.
%
-% These sockets will use names starting
-% with \texttt{tagsupport/}. Usually, these sockets have exactly two
-% plugs defined: \texttt{noop} (when no tagging is requested or
-% tagging is not wanted for some reason) and
-% a second plug that enables the tagging. There
-% may be more, e.g., tagging with special debugging, etc., but right
-% now it is usually just on or off.
-%
% 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
-% \cs{UseSocket} except that the socket name is specified without
-% \texttt{tagsupport/}, i.e.,
+% \cs{UseSocket} except that is expects a socket starting with
+% \texttt{tagsupport/} but the socket name is specified without
+% this prefix, i.e.,
% \begin{quote}
% \verb=\UseTaggingSocket{foo}= $\to$
% \verb=\UseSocket{tagsupport/foo}=
-% \end{quote}
-% Beside being slightly shorter, the big advantage is that this way
-% we can change \cs{UseTaggingSocket} to do nothing by switching a boolean
-% instead of changing the plugs of the tagging support sockets back and forth.
+% \end{quote}.
+%
+% Beside being slightly shorter, the big advantage is that this way
+% we can change \cs{UseTaggingSocket} to do nothing by switching a boolean
+% instead of changing the plugs of the tagging support sockets back and forth.
%
-% It is possible to use the tagging support sockets with
-% \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}.
+% 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.
+% 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.
%
-% The L3 programming layer versions \cs{tag_socket_use:n} and
-% \cs{tag_socket_use:nn} are slightly more efficient than
+% When tagging is suspended they all have the same predefined behaviour:
+% The sockets with zero arguments do nothing. The sockets with one argument
+% gobble their argument. The sockets with two arguments
+% will drop their first argument and pass the second unchanged.
+%
+% It is possible to use the tagging support sockets with
+% \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
+% 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}
+% are slightly more efficient than
% \cs{UseTaggingSocket} because they do not have to determine how
% many arguments the socket takes when disabling it.
% \end{documentation}
@@ -309,7 +322,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-user} {2024-10-27} {0.99g}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -408,21 +421,29 @@
% \section{Socket support}
% Until we can be sure that the kernel defines the commands we provide them before
% redefining them:
+% The expandable version will only work correctly after the 2024-11-01 release.
% \begin{macrocode}
%<*base>
\providecommand\tag_socket_use:n[1]{}
\providecommand\tag_socket_use:nn[2]{}
+\providecommand\tag_socket_use:nnn[3]{}
+\providecommand\tag_socket_use_expandable:n[1]{}
+\providecommand\socket_use_expandable:nw [1] {
+ \use:c { __socket_#1_plug_ \str_use:c { l__socket_#1_plug_str } :w }
+}
\providecommand\UseTaggingSocket[1]{}
+\providecommand\UseExpandableTaggingSocket[1]{}
%</base>
% \end{macrocode}
%
-% \begin{macro}{\tag_socket_use:n,\tag_socket_use:nn,\UseTaggingSocket}
+% \begin{macro}{\tag_socket_use:n,\tag_socket_use:nn,\tag_socket_use:nnn,\UseTaggingSocket,
+% \tag_socket_use_expandable:n,\UseExpandableTaggingSocket}
% \begin{macrocode}
%<*package>
-\cs_set_protected:Npn \tag_socket_use:n #1
+\cs_set_protected:Npn \tag_socket_use:n #1
{
\bool_if:NT \l_@@_active_socket_bool
- { \UseSocket {tagsupport/#1} }
+ { \socket_use:n {tagsupport/#1} }
}
% \end{macrocode}
%
@@ -430,22 +451,58 @@
\cs_set_protected:Npn \tag_socket_use:nn #1#2
{
\bool_if:NT \l_@@_active_socket_bool
- { \UseSocket {tagsupport/#1} {#2} }
+ { \socket_use:nn {tagsupport/#1} {#2} }
}
% \end{macrocode}
%
% \begin{macrocode}
+\cs_set_protected:Npn \tag_socket_use:nnn #1#2#3
+ {
+ \bool_if:NT \l_@@_active_socket_bool
+ { \socket_use:nnn {tagsupport/#1} {#2} {#3} }
+ }
+% \end{macrocode}
+% \begin{macrocode}
+\cs_set:Npn \tag_socket_use_expandable:n #1
+ {
+ \bool_if:NT \l_@@_active_socket_bool
+ { \socket_use_expandable:n {tagsupport/#1} }
+ }
+% \end{macrocode}
+% \begin{macrocode}
\cs_set_protected:Npn \UseTaggingSocket #1
{
\bool_if:NTF \l_@@_active_socket_bool
- { \UseSocket{tagsupport/#1} }
+ { \socket_use:nw {tagsupport/#1} }
+ {
+ \int_case:nnF
+ { \int_use:c { c__socket_tagsupport/#1_args_int } }
+ {
+ 0 \prg_do_nothing:
+ 1 \use_none:n
+ 2 \use_ii:nn
+% \end{macrocode}
+% We do not expect tagging sockets with more than one or two
+% arguments, so for now we only provide those.
+% \begin{macrocode}
+ }
+ \ERRORusetaggingsocket
+ }
+ }
+% \end{macrocode}
+
+% \begin{macrocode}
+\cs_set:Npn \UseExpandableTaggingSocket #1
+ {
+ \bool_if:NTF \l_@@_active_socket_bool
+ { \socket_use_expandable:nw {tagsupport/#1} }
{
\int_case:nnF
{ \int_use:c { c__socket_tagsupport/#1_args_int } }
{
0 \prg_do_nothing:
1 \use_none:n
- 2 \use_none:nn
+ 2 \use_ii:nn
% \end{macrocode}
% We do not expect tagging sockets with more than one or two
% arguments, so for now we only provide those.
@@ -848,7 +905,7 @@
}
% \end{macrocode}
% \end{macro}
-% TEMPORARLY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command:
+% TEMPORARY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command:
% \begin{macrocode}
\AddToHook{package/latex-lab-testphase-sec/after}
{
@@ -866,9 +923,9 @@
{\tagmcbegin{tag=Lbl}}
{#1}
}
- \tag_stop:n{hangfrom}
+ \tag_suspend:n{hangfrom}
\hangindent \wd\@tempboxa\noindent
- \tag_start:n{hangfrom}
+ \tag_resume:n{hangfrom}
\tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}
}
}
@@ -976,83 +1033,88 @@
% at some time) and a more sophisticated one that must
% be used if the block code is used.
% It is possible that we will need more variants, so
-% we setup a socket so that the code can be easily switched.
+% 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.
% \begin{macrocode}
-\socket_new:nn {tagsupport/para/begin}{0}
-\socket_new:nn {tagsupport/para/end}{0}
-
-\socket_new_plug:nnn{tagsupport/para/begin}{plain}
+\str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str }
{
- \bool_if:NT \l_@@_para_bool
+ \socket_new:nn {tagsupport/para/begin}{0}
+ \socket_new:nn {tagsupport/para/end}{0}
+
+ \socket_new_plug:nnn{tagsupport/para/begin}{plain}
{
- \bool_if:NF \l_@@_para_flattened_bool
- {
- \@@_gincr_para_main_begin_int:
- \tag_struct_begin:n
+ \bool_if:NT \l_@@_para_bool
+ {
+ \bool_if:NF \l_@@_para_flattened_bool
{
- tag=\l_@@_para_main_tag_tl,
+ \@@_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ 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}
- {
- \bool_if:NT \l_@@_para_bool
+ \@@_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}
{
- \legacy_if:nF { @inlabel }
+ \bool_if:NT \l_@@_para_bool
{
- \@@_check_typeout_v:n
- {==>~ @endpe = \legacy_if:nTF { @endpe }{true}{false} \on@line }
- \legacy_if:nF { @endpe }
- {
- \bool_if:NF \l_@@_para_flattened_bool
- {
- \@@_gincr_para_main_begin_int:
- \tag_struct_begin:n
- {
- tag=\l_@@_para_main_tag_tl,
- attribute-class=\l_@@_para_main_attr_class_tl,
- }
- \@@_para_main_store_struct:
+ \legacy_if:nF { @inlabel }
+ {
+ \@@_check_typeout_v:n
+ {==>~ @endpe = \legacy_if:nTF { @endpe }{true}{false} \on@line }
+ \legacy_if:nF { @endpe }
+ {
+ \bool_if:NF \l_@@_para_flattened_bool
+ {
+ \@@_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ tag=\l_@@_para_main_tag_tl,
+ attribute-class=\l_@@_para_main_attr_class_tl,
+ }
+ \@@_para_main_store_struct:
+ }
}
- }
- \@@_gincr_para_begin_int:
- \@@_check_typeout_v:n {==>~increment~ P \on@line }
- \tag_struct_begin:n
- {
- tag=\l_@@_para_tag_tl
- ,attribute-class=\l_@@_para_attr_class_tl
- }
- \@@_check_para_begin_show:nn {green}{\PARALABEL}
- \tag_mc_begin:n {}
- }
- }
- }
+ \@@_gincr_para_begin_int:
+ \@@_check_typeout_v:n {==>~increment~ P \on@line }
+ \tag_struct_begin:n
+ {
+ tag=\l_@@_para_tag_tl
+ ,attribute-class=\l_@@_para_attr_class_tl
+ }
+ \@@_check_para_begin_show:nn {green}{\PARALABEL}
+ \tag_mc_begin:n {}
+ }
+ }
+ }
% \end{macrocode}
% there was no real difference between the original and
% in the block variant, only a debug message. We therefore
% define only a plain variant.
% \begin{macrocode}
-\socket_new_plug:nnn{tagsupport/para/end}{plain}
- {
- \bool_if:NT \l_@@_para_bool
+ \socket_new_plug:nnn{tagsupport/para/end}{plain}
{
- \@@_gincr_para_end_int:
- \@@_check_typeout_v:n {==>~increment~ /P \on@line }
- \tag_mc_end:
- \@@_check_para_end_show:nn {red}{}
- \tag_struct_end:
- \bool_if:NF \l_@@_para_flattened_bool
- {
- \@@_gincr_para_main_end_int:
- \tag_struct_end:
- }
- }
+ \bool_if:NT \l_@@_para_bool
+ {
+ \@@_gincr_para_end_int:
+ \@@_check_typeout_v:n {==>~increment~ /P \on@line }
+ \tag_mc_end:
+ \@@_check_para_end_show:nn {red}{}
+ \tag_struct_end:
+ \bool_if:NF \l_@@_para_flattened_bool
+ {
+ \@@_gincr_para_main_end_int:
+ \tag_struct_end:
+ }
+ }
+ }
}
% \end{macrocode}
% By default we assign the plain plug:
@@ -1166,7 +1228,7 @@
% \tagpdfparaOff
% }
% This two command switch para mode on and off. |\tagpdfsetup| could be used
-% too but is longer. An alternative is |\tag_tool:n{para=false}|
+% too but is longer. An alternative is |\tag_tool:n{para/tagging=false}|
% \begin{macrocode}
%<base>\newcommand\tagpdfparaOn {}
%<base>\newcommand\tagpdfparaOff{}
@@ -1246,11 +1308,11 @@
\bool_gset_false:N \g_@@_in_mc_bool
}
\tag_mc_begin:n {artifact}
- \tag_stop:n{headfoot}
+ \tag_suspend:n{headfoot}
}
\cs_new_protected:Npn \@@_exclude_headfoot_end:
{
- \tag_start:n{headfoot}
+ \tag_resume:n{headfoot}
\tag_mc_end:
\bool_if:NTF \g_@@_mode_lua_bool
{
@@ -1277,12 +1339,12 @@
}
\tag_struct_begin:n{tag=Artifact,attribute-class=@@/attr/#1}
\tag_mc_begin:n {artifact=#1}
- \tag_stop:n{headfoot}
+ \tag_suspend:n{headfoot}
}
\cs_new_protected:Npn \@@_exclude_struct_headfoot_end:
{
- \tag_start:n{headfoot}
+ \tag_resume:n{headfoot}
\tag_mc_end:
\tag_struct_end:
\bool_if:NTF \g_@@_mode_lua_bool
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index 064490c2c4..eed54ca191 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -21,62 +21,128 @@
% https://github.com/latex3/tagpdf
%
% for those people who are interested.
-%
+%<*driver>
+\DocumentMetadata{}
+\documentclass{l3doc}
+\usepackage{array,booktabs,caption}
+\hypersetup{pdfauthor=Ulrike Fischer,
+ pdftitle=tagpdf (main module)}
+\input{tagpdf-docelements}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
% \fi
+% \title{^^A
+% The \pkg{tagpdf} main module
+% \\ Part of the tagpdf package
+% }
+%
+% \author{^^A
+% Ulrike Fischer\thanks
+% {^^A
+% E-mail:
+% \href{mailto:fischer@troubleshooting-tex.de}
+% {fischer@troubleshooting-tex.de}^^A
+% }^^A
+% }
+%
+% \date{Version 0.99g, released 2024-10-27}
+% \maketitle%
+%
% \begin{documentation}
-% \begin{function}{
-% \tag_stop:, \tag_start:,
-% \tagstop, \tagstart }
+% \begin{function}{\tag_suspend:n, \tag_resume:n,\tag_stop:n, \tag_start:n }%
+% \begin{syntax}
+% \cs{tag_suspend:n}\Arg{label}\\
+% \cs{tag_resume:n}\Arg{label}\\
+% \cs{tag_stop:n}\Arg{label} (\emph{deprecated})\\
+% \cs{tag_start:n}\Arg{label} (\emph{deprecated})
+% \end{syntax}
% We need commands to stop tagging in some places.
% They switches three local booleans and also stop the counting
-% of paragraphs. If they are nested an inner \cs{tag_start:} will not
-% restart tagging.
+% of paragraphs. If they are nested an inner \cs{tag_resume:n} will not
+% restart tagging.
+% \meta{label} is only used in debugging messages to allow to follow the nesting
+% and to identify which code is disabling the tagging.
+% The label is not expanded so can be a single token, e.g. |\caption|.
+% |\tag_suspend:n| and |\tag_resume:n| are the l3-layer variants of
+% |\SuspendTagging| and |\ResumeTagging| and will be provided by the kernel
+% in the next release.
% \end{function}
-%
-% \begin{function}{\tag_stop:n, \tag_start:n }%
-% \begin{syntax}
-% \cs{tag_stop:n}\Arg{label}
-% \cs{tag_start:n}\Arg{label}\\
-% \end{syntax}
-% The commands with argument allow to give a label. This is only used
-% in debugging messages to allow to follow the nesting.
+%
+% \begin{function}{
+% \tag_stop:, \tag_start:,
+% \tagstop, \tagstart }
+% \emph{deprecated} These are variants of the above commands
+% without the debuging level. They are now deprecated and it
+% is recommended to use the kernel command
+% |\SuspendTagging|, |\ResumeTagging|, |\tag_suspend:n| and |\tag_resume:n|
+% instead.
% \end{function}
%
-% \begin{function}{activate/spaces (setup-key)}
+%
+% \begin{setupkeydecl}{activate/spaces}
% |activate/spaces| activates the additional parsing needed for
% interword spaces. It replaces the deprecated key |interwordspace|.
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{activate/mc (setup-key),
-% activate/tree (setup-key),
-% activate/struct (setup-key),
-% activate/all (setup-key),
+% \begin{setupkeydecl}{activate/mc,
% activate-mc (deprecated),
+% }
+% A key to to activate the marked content code. It should be used
+% only in special cases, e.g. for debugging.
+% \end{setupkeydecl}
+%
+% \begin{setupkeydecl}{
+% activate/tree,
% activate-tree (deprecated),
+% }
+% This key activates the code that finalize the
+% various trees. It should be used
+% only in special cases, e.g. for debugging.
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{
+% activate/struct,
% activate-struct (deprecated),
+% }
+% This key activates the code for structures.
+% It should be used
+% only in special cases, e.g. for debugging.
+% \end{setupkeydecl}
+%
+% \begin{setupkeydecl}{
+% activate/all,
% activate-all (deprecated),
% }
-% Keys to activate the various tagging steps.
-% \end{function}
-%\begin{function}{activate/struct-dest (setup-key),no-struct-dest (deprecated)}
+% This is a meta key for the three previous keys
+% and is normally what should be used to activate tagging.
+% \end{setupkeydecl}
+%
+%\begin{setupkeydecl}{activate/struct-dest,no-struct-dest (deprecated)}
% The key allows to suppress the creation of structure destinations
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{debug/log (setup-key)}
+% \begin{setupkeydecl}{debug/log}
% The |debug/log| key takes currently the values |none|, |v|, |vv|, |vvv|, |all|.
% More details are in \texttt{tagpdf-checks}.
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{activate/tagunmarked (setup-key), tagunmarked (deprecated) }
+% \begin{setupkeydecl}{activate/tagunmarked, tagunmarked (deprecated) }
% This key allows to set if (in luamode) unmarked text should be
% marked up as artifact. The initial value is true.
-% \end{function}
+% \end{setupkeydecl}
%
-% \begin{function}{page/tabsorder (setup-key), tabsorder (deprecated)}
+% \begin{setupkeydecl}{activate/softhyphen}
+% This key allows to activates automatic handling of hyphens inserted
+% by hyphenation. It only is used in luamode and replaces hyphens
+% by U+00AD if the font supports this.
+% \end{setupkeydecl}
+%
+% \begin{setupkeydecl}{page/tabsorder, tabsorder (deprecated)}
% This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
% or |none|. Currently this is set more or less globally. More finer control can be
% added if needed.
-% \end{function}
+% \end{setupkeydecl}
%
% \begin{function}{tagstruct,tagstructobj,tagabspage,tagmcabs,tagmcid}
% These are attributes used by the label/ref system.
@@ -87,8 +153,8 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2024-04-12} {0.99b}
- { A package to experiment with pdf tagging }
+\ProvidesExplPackage {tagpdf} {2024-10-27} {0.99g}
+ { LaTeX kernel code for PDF tagging }
\bool_if:nF
{
@@ -113,7 +179,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-debug} {2024-10-27} {0.99g}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -136,7 +202,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdf-base} {2024-10-27} {0.99g}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -171,47 +237,45 @@
% possible, so we define a command which a special in the relevant backends:
% \begin{macrocode}
%<*base>
+\cs_new_protected:Npn \@@_whatsits: {}
\AddToHook{begindocument}
{
\str_case:VnF \c_sys_backend_str
{
- { luatex } { \cs_new_protected:Npn \@@_whatsits: {} }
- { dvisvgm } { \cs_new_protected:Npn \@@_whatsits: {} }
+ { luatex } { \cs_set_protected:Npn \@@_whatsits: {} }
+ { dvisvgm } { \cs_set_protected:Npn \@@_whatsits: {} }
}
{
- \cs_new_protected:Npn \@@_whatsits: {\tex_special:D {} }
+ \cs_set_protected:Npn \@@_whatsits: {\tex_special:D {} }
}
}
%</base>
% \end{macrocode}
-% \subsection{Indexed objects}
-% 2024-04-11: Temporary code! Can be removed after the next expl3 release!
+% \subsection{Patches related to Ref improvement}
+% 2024-09-09: Temporary code. Can be removed when the latex-lab-footnote
+% and latex-lab-toc code have been adapted to the better Ref handling.
% \begin{macrocode}
-\cs_if_free:NT \pdf_object_new_indexed:nn
- {
- \cs_generate_variant:Nn \pdf_object_new:n {e}
- \cs_generate_variant:Nn \pdf_object_write:nnn {enn}
- \cs_new_protected:Npn \pdf_object_new_indexed:nn #1 #2
- {
- \pdf_object_new:e {#1/\int_eval:n{#2}}
- }
- \cs_new_protected:Npn \pdf_object_write_indexed:nnnn #1 #2 #3 #4
- {
- \pdf_object_write:enn {#1/\int_eval:n{#2}}{#3}{#4}
- }
- \cs_generate_variant:Nn \pdf_object_write_indexed:nnnn {nnne}
- \cs_new:Npn\pdf_object_ref_indexed:nn #1 #2
- {
- \pdf_object_ref:e {#1/\int_eval:n{#2}}
- }
- \cs_new:Npn \__kernel_pdf_object_id_indexed:nn #1 #2
- {
- \int_use:c
- { c__pdf_object_ #1/\int_eval:n{#2} _int }
- }
- }
-
+%<*package>
+\AddToHook{package/latex-lab-testphase-new-or-2/after}
+ {
+ \cs_set_protected:Npn \__fnote_gput_ref:nn #1 #2 %#1 the structure number receiving the ref #2
+ {
+ \tag_struct_gput:nnn {#1}{ref_num}{#2}
+ }
+ }
+\AddToHook{package/latex-lab-testphase-toc/after}
+ {
+ \cs_set_protected:Npn \g_@@_struct_ref_by_dest:
+ {
+ \prop_map_inline:Nn\g_@@_struct_ref_by_dest_prop
+ {
+ \tag_struct_gput:nnn {##1}{ref_dest}{##2}
+ }
+ }
+ }
+%</package>
% \end{macrocode}
+%
% \subsection{a LastPage label}
% See also issue \#2 in Accessible-xref
% \begin{macro}{\@@_lastpagelabel:}
@@ -244,6 +308,7 @@
% {
% \l_@@_tmpa_tl,
% \l_@@_tmpb_tl,
+% \l_@@_Ref_tmpa_tl,
% \l_@@_get_tmpc_tl,
% \l_@@_get_parent_tmpa_tl
% \l_@@_get_parent_tmpb_tl
@@ -260,6 +325,7 @@
% \begin{macrocode}
\tl_new:N \l_@@_tmpa_tl
\tl_new:N \l_@@_tmpb_tl
+\tl_new:N \l_@@_Ref_tmpa_tl
\tl_new:N \l_@@_get_tmpc_tl
\tl_new:N \l_@@_get_parent_tmpa_tl
\tl_new:N \l_@@_get_parent_tmpb_tl
@@ -353,6 +419,13 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\g_@@_softhyphen_bool}
+% This boolean controls if the code should try to automatically
+% handle hyphens from hyphenation. It is currently only used in luamode.
+% \begin{macrocode}
+\bool_new:N \g_@@_softhyphen_bool
+% \end{macrocode}
+% \end{variable}
% \section{Variants of l3 commands}
% \begin{macrocode}
\prg_generate_conditional_variant:Nnn \pdf_object_if_exist:n {e}{T,F,TF}
@@ -368,24 +441,10 @@
% \end{macrocode}
%
% \section{Label and Reference commands}
-% To ease transition to properties we setup internal definition. They can be replaced
-% by the property definitions once that is released.
-% %** do it!
-% \begin{macro}{\@@_property_new:nnnn,\@@_property_gset:nnnn,\@@_property_ref:nnn}
-% At first a command to define new properties
-% \begin{macrocode}
- \cs_new_eq:NN \@@_property_new:nnnn \property_new:nnnn
-% \end{macrocode}
-% For the non-shipout code we need also the option to reset property
-% \begin{macrocode}
- \cs_new_eq:NN \@@_property_gset:nnnn \property_gset:nnnn
-% \end{macrocode}
-% The command to reference while giving a local default.
-% \begin{macrocode}
- \cs_new_eq:NN \@@_property_ref:nnn \property_ref:nnn
- \cs_new_eq:NN \@@_property_ref:nn \property_ref:nn
-% \end{macrocode}
-% The command to record
+% The code uses mostly the kernel properties but need a few local variants.
+% \begin{macro}{\@@_property_record:nn}
+% The command to record a property while preserving the spaces similar to the standard
+% \cs{label}.
% \begin{macrocode}
\cs_new_protected:Npn \@@_property_record:nn #1#2
{
@@ -397,8 +456,8 @@
% \end{macrocode}
% And a few variants
% \begin{macrocode}
-\cs_generate_variant:Nn \@@_property_ref:nnn {enn}
-\cs_generate_variant:Nn \@@_property_ref:nn {en}
+\cs_generate_variant:Nn \property_ref:nnn {enn}
+\cs_generate_variant:Nn \property_ref:nn {en}
\cs_generate_variant:Nn \@@_property_record:nn {en,eV}
% \end{macrocode}
% \end{macro}
@@ -409,7 +468,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_property_ref_lastpage:nn #1 #2
{
- \@@_property_ref:nnn {@tag@LastPage}{#1}{#2}
+ \property_ref:nnn {@tag@LastPage}{#1}{#2}
}
% \end{macrocode}
%\end{macro}
@@ -426,21 +485,21 @@
% With mc-chunks we store the absolute page number |tagabspage|,
% the absolute id |tagmcabc|, and the id on the page |tagmcid|.
% \begin{macrocode}
-\@@_property_new:nnnn
+\property_new:nnnn
{ tagstruct } { now }
- {0} { \int_use:N \c@g_@@_struct_abs_int }
-\@@_property_new:nnnn { tagstructobj } { now } {}
+ {1} { \int_use:N \c@g_@@_struct_abs_int }
+\property_new:nnnn { tagstructobj } { now } {}
{
\pdf_object_ref_indexed:nn { @@/struct } { \c@g_@@_struct_abs_int }
}
-\@@_property_new:nnnn
+\property_new:nnnn
{ tagabspage } { shipout }
{0} { \int_use:N \g_shipout_readonly_int }
-\@@_property_new:nnnn { tagmcabs } { now }
+\property_new:nnnn { tagmcabs } { now }
{0} { \int_use:N \c@g_@@_MCID_abs_int }
\flag_new:n { @@/mcid }
-\@@_property_new:nnnn {tagmcid } { shipout }
+\property_new:nnnn {tagmcid } { shipout }
{0} { \flag_height:n { @@/mcid } }
% \end{macrocode}
@@ -468,6 +527,7 @@
\cs_set_eq:NN \@@_seq_new:N \seq_new:N
\cs_set_eq:NN \@@_prop_gput:Nnn \prop_gput:Nnn
\cs_set_eq:NN \@@_seq_gput_right:Nn \seq_gput_right:Nn
+\cs_set_eq:NN \@@_seq_gput_left:Nn \seq_gput_left:Nn
\cs_set_eq:NN \@@_seq_item:cn \seq_item:cn
\cs_set_eq:NN \@@_prop_item:cn \prop_item:cn
\cs_set_eq:NN \@@_seq_show:N \seq_show:N
@@ -475,6 +535,7 @@
% cnx temporary needed for latex-lab-graphic code
\cs_generate_variant:Nn \@@_prop_gput:Nnn { Nen , Nee, Nne , cnn, cen, cne, cno, cnx}
\cs_generate_variant:Nn \@@_seq_gput_right:Nn { Ne , No, cn, ce }
+\cs_generate_variant:Nn \@@_seq_gput_left:Nn { ce }
\cs_generate_variant:Nn \@@_prop_new:N { c }
\cs_generate_variant:Nn \@@_seq_new:N { c }
\cs_generate_variant:Nn \@@_seq_show:N { c }
@@ -486,6 +547,7 @@
% \section{General tagging commands}
%
% \begin{macro}{
+% \tag_suspend:n,\tag_resume:n,
% \tag_stop:,\tag_start:,
% \tag_stop:n,\tag_start:n}
% We need commands to stop tagging in some places.
@@ -494,7 +556,8 @@
% counter. Tagging only is only restarted at the outer level,
% if the current level is 1.
% The commands with argument allow to give a label. This is only used
-% in debugging messages to allow to follow the nesting.
+% in debugging messages to allow to follow the nesting. The label is
+% not expand so can e.g. be a single command token.
%
% \begin{variable}{\l_@@_tag_stop_int}
% When stop/start pairs are nested we do not want the inner
@@ -511,7 +574,7 @@
% \begin{macrocode}
\cs_set_protected:Npn \tag_stop:
{
-%<debug> \msg_note:nne {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }
+%<debug> \msg_note:nne {tag / debug }{tag-suspend}{ \int_use:N \l_@@_tag_stop_int }
\int_incr:N \l_@@_tag_stop_int
\bool_set_false:N \l_@@_active_struct_bool
\bool_set_false:N \l_@@_active_mc_bool
@@ -528,22 +591,24 @@
\bool_set_true:N \l_@@_active_socket_bool
\@@_start_para_ints:
}
-%<debug> \msg_note:nne {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }
+%<debug> \msg_note:nne {tag / debug }{tag-resume}{ \int_use:N \l_@@_tag_stop_int }
}
\cs_set_eq:NN\tagstop\tag_stop:
\cs_set_eq:NN\tagstart\tag_start:
% \end{macrocode}
% \begin{macrocode}
-\cs_set_protected:Npn \tag_stop:n #1
+\cs_set_protected:Npn \tag_suspend:n #1
{
-%<debug> \msg_note:nnee {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }{#1}
+%<debug> \msg_note:nnee {tag / debug }{tag-suspend}
+%<debug> { \int_use:N \l_@@_tag_stop_int }{\exp_not:n{#1}}
\int_incr:N \l_@@_tag_stop_int
\bool_set_false:N \l_@@_active_struct_bool
\bool_set_false:N \l_@@_active_mc_bool
\bool_set_false:N \l_@@_active_socket_bool
\@@_stop_para_ints:
}
-\cs_set_protected:Npn \tag_start:n #1
+\cs_set_eq:NN \tag_stop:n \tag_suspend:n
+\cs_set_protected:Npn \tag_resume:n #1
{
\int_if_zero:nF { \l_@@_tag_stop_int } { \int_decr:N \l_@@_tag_stop_int }
\int_if_zero:nT { \l_@@_tag_stop_int }
@@ -552,9 +617,11 @@
\bool_set_true:N \l_@@_active_mc_bool
\bool_set_true:N \l_@@_active_socket_bool
\@@_start_para_ints:
- }
-%<debug> \msg_note:nnee {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }{#1}
+ }
+%<debug> \msg_note:nnee {tag / debug }{tag-resume}
+%<debug> { \int_use:N \l_@@_tag_stop_int }{\exp_not:n{#1}}
}
+\cs_set_eq:NN \tag_start:n \tag_resume:n
%</package|debug>
%<*base>
\cs_new_protected:Npn \tag_stop:{}
@@ -563,6 +630,11 @@
\cs_new_protected:Npn \tagstart{}
\cs_new_protected:Npn \tag_stop:n #1 {}
\cs_new_protected:Npn \tag_start:n #1 {}
+% \end{macrocode}
+% Until the commands are provided by the kernel we provide them here too
+% \begin{macrocode}
+\cs_set_eq:NN \tag_suspend:n \tag_stop:n
+\cs_set_eq:NN \tag_resume:n \tag_start:n
%</base>
% \end{macrocode}
% \end{macro}
@@ -572,13 +644,13 @@
%
% TODO: the log-levels must be sorted
%
-% \begin{macro}
+% \begin{setupkeydecl}
% {
-% activate/mc (setup-key),
-% activate/tree (setup-key),
-% activate/struct (setup-key),
-% activate/all (setup-key),
-% activate/struct-dest (setup-key),
+% activate/mc,
+% activate/tree,
+% activate/struct,
+% activate/all,
+% activate/struct-dest,
% }
% Keys to (globally) activate tagging.
% |activate/spaces| activates the additional parsing needed for
@@ -606,14 +678,14 @@
activate-all .default:n = true,
no-struct-dest .bool_gset_inverse:N = \g_@@_active_struct_dest_bool,
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{debug/show (setup-key)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{debug/show}
% Subkeys/values are defined in various other places.
% \begin{macrocode}
debug/show .choice:,
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{debug/log (setup-key), debug/uncompress (setup-key), log (deprecated), uncompress (deprecated)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{debug/log, debug/uncompress, log (deprecated), uncompress (deprecated)}
% The |log| takes currently the values |none|, |v|, |vv|, |vvv|, |all|.
% The description of the log levels is in tagpdf-checks.
% \begin{macrocode}
@@ -634,8 +706,8 @@
log .meta:n = {debug/log={#1}},
uncompress .code:n = { \pdf_uncompress: },
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{activate/tagunmarked (setup-key),tagunmarked (deprecated)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{activate/tagunmarked,tagunmarked (deprecated)}
% This key allows to set if (in luamode) unmarked text should be
% marked up as artifact. The initial value is true.
% \begin{macrocode}
@@ -646,8 +718,15 @@
% \begin{macrocode}
tagunmarked .bool_gset:N = \g_@@_tagunmarked_bool,
% \end{macrocode}
-% \end{macro}
-% \begin{macro}{page/tabsorder (setup-key),tabsorder (deprecated)}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{activate/softhyphen}
+% This key activates (in luamode) the handling of soft hyphens.
+% \begin{macrocode}
+ activate/softhyphen .bool_gset:N = \g_@@_softhyphen_bool,
+ activate/softhyphen .initial:n = true,
+% \end{macrocode}
+% \end{setupkeydecl}
+% \begin{setupkeydecl}{page/tabsorder,tabsorder (deprecated)}
% This sets the tabsorder on a page. The values are |row|, |column|, |structure| (default)
% or |none|. Currently this is set more or less globally. More finer control can be
% added if needed.
@@ -668,7 +747,7 @@
tabsorder .meta:n = {page/tabsorder={#1}},
}
% \end{macrocode}
-% \end{macro}
+% \end{setupkeydecl}
% \section{loading of engine/more dependent code}
% \begin{macrocode}
\sys_if_engine_luatex:T
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index a04ba6fc3c..ec39e603a2 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex
index e023ba6d02..e49d605b58 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -16,8 +16,8 @@
}
\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer@package@version{0.99b}
-\def\UlrikeFischer@package@date{2024-04-12}
+\def\UlrikeFischer@package@version{0.99g}
+\def\UlrikeFischer@package@date{2024-10-27}
\makeatother
\documentclass[bibliography=totoc,a4paper]{article}
@@ -90,8 +90,7 @@
\maketitle
-\tagstructbegin{tag=Div}
-\begin{tcolorbox}[colframe=red,before upper=\tagpdfparaOn]
+\begin{tcolorbox}[colframe=red]
This package is not meant for direct use in (normal) documents. It started in 2018 as
a support tool to \emph{research} tagging. It is now the base of the code developed
@@ -100,7 +99,7 @@ in the \pkg{latex-lab} bundle for the Tagged PDF project (i.e., loaded by that c
The package is developed and improved in parallel with the code in the \pkg{latex-lab}
bundle (part of the core \LaTeX{} distribution), the \pkg{pdfmanagement-testphase}
-package (the \LaTeX{} PDF management bundle) and the L3 programming layer (part of of the \LaTeX{} format).
+package (the \LaTeX{} PDF management bundle) and the L3 programming layer (part of the \LaTeX{} format).
That means you must ensure that all these components are up-to-date and in
sync which each other.
@@ -123,7 +122,6 @@ Issues, comments, suggestions can be added as issues to these two github tracker
\leavevmode\llap{or\qquad\qquad} \url{https://github.com/latex3/tagpdf}
\end{tcolorbox}
-\tagstructend
\tagtool{sec-add-grouping=false}
@@ -340,24 +338,27 @@ improvements and new features in the \LaTeX\ kernel, the latex-lab bundle and
the \PDF\ management code and is now much better. Only a few
structures---mostly some from currently unsupported packages--- still need
manual tagging. But sadly the output of the validators don't quite reflect
-the improvements. The documentation uses now \PDF~2.0 and PAC~2024 can't handle
-this, it claims that the file is damaged. The Adobe validator has a bug and
+the improvements. The documentation uses now \PDF~2.0 and while the newest
+PAC~2024 can at least open the file it can not validate properly the file. For example
+it complains about the tabular header cells as it doesn't follow attribute classes.
+The Adobe validator has a bug and
doesn't like the (valid) use of the \texttt{Lbl} tag for the section numbers
(see figure~\ref{fig:adobe}).
-But even if the documentation passed the tests of the validators: as
+But even if the documentation would pass all the tests of the validators: as
mentioned above passing a formal test doesn't mean that the content is really
good and usable. The user commands used for the tagging and also some of the
patches used are still rather crude. So there is lot space for improvement.
-\begin{tcolorbox}[before upper=\tagpdfparaOn]
+\begin{tcolorbox}[]
Be aware that to create the tagged version a current lualatex-dev and a
current version of the pdfmanagment-testphase package is needed.
\end{tcolorbox}
-\includegraphics[alt=PAC 3 report]{pac3}
+\includegraphics[alt=PAC 2024 complains about PDF version]{pac2024-version}
+\includegraphics[alt=PAC 2024 complains about table header cells]{pac2024-report}
\begin{figure}
@@ -506,6 +507,10 @@ The key-val list understands at least the following keys. More keys are defined
least \PrintKeyName{activate/mc} has been used.
The old name of the key |interwordspace| is still supported but deprecated.
+\item[\PrintKeyName{activate/softhyphen}] Boolean. luamode only.
+ The key activates/deactivates the replacing of hard hyphens from hyphenation
+ by soft hyphens. By default this is activated.
+
\item[\PrintKeyName{role/new-tag}] Allows to define new tag names, see
section \ref{sec:new-tag} for a description.
@@ -719,15 +724,12 @@ To tag a \PDF{} three tasks must be carried out:
\begin{figure}[t!]
-\begin{tcolorbox}[before upper=\tagpdfparaOn]
+\begin{tcolorbox}[]
\minisec{Page stream with marked content}
-\tagpdfparaOff
-
-\tagstructbegin{tag=Figure,alt={Illustration of page stream with marked content},attribute=bbox}%
-\tagmcbegin{tag=Figure}%
-\begin{tikzpicture}[baseline=(a.north),node distance=2pt,remember picture]
+\begin{tikzpicture}[baseline=(a.north),node distance=2pt,remember picture,
+alt={Illustration of page stream with marked content}]
\node(start){\ldots~\ldots~\ldots};
\node[draw,base right = of start](a) {mc-chunk 1};
\node[draw,base right = of a](b) {mc-chunk 2};
@@ -735,20 +737,13 @@ To tag a \PDF{} three tasks must be carried out:
\node[draw,base right = of c](d) {mc-chunk 3};
\node[base right = of d] {\ldots~\ldots};
\end{tikzpicture}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
\minisec{Structure}
-\tagpdfparaOff
\newlength\ydistance\setlength\ydistance{-0.8cm}
-\tagstructbegin{tag=Figure,alt={Illustration of structure},attribute=bbox}%
-\tagmcbegin{tag=Figure}%
-\begin{tikzpicture}[remember picture,baseline=(root.north)]
-
+\begin{tikzpicture}[remember picture,baseline=(root.north),alt={Illustration of structure}]
\node[draw,anchor=base west] (root) at (0,0) {Sect (start section)};
\node[draw,anchor=base west] at (0.3,\ydistance) {H (header section)};
\node[draw,anchor=base west](aref) at (0.6,2\ydistance){mc-chunk 1};
@@ -760,17 +755,12 @@ To tag a \PDF{} three tasks must be carried out:
\node[draw,anchor=base west] at (0.3,8\ydistance){/P (end paragraph)};
\node[draw,anchor=base west] at (0,9\ydistance){/Sect (end section)};
\end{tikzpicture}
-
\begin{tikzpicture}[remember picture, overlay]
\draw[->,red](aref)-|(a);
\draw[->,red](bref)-|(b);
\draw[->,red](cref)-|(c);
\draw[->,red](dref)-|(d);
-
\end{tikzpicture}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
\end{tcolorbox}
@@ -1041,7 +1031,7 @@ The key-val list understands the following keys:
marked but not stored in the kid-key of the current structure.
\item[\PrintKeyName{label}] This key sets a label by which you can call
- the marked content later in another structure (if it has been stashed
+ the marked content \emph{later} in another structure (if it has been stashed
with the previous key). Internally the label name will start with
\texttt{tagpdf-}.
@@ -1110,8 +1100,8 @@ the command, as the effect of the begin command ends with a new
\begin{docCommands}
{
- {doc name=tagmcuse},
- {doc name=tag_mc_use:n}
+ {doc name=tagmcuse,doc parameter=\marg{label}},
+ {doc name=tag_mc_use:n,doc parameter=\marg{label}}
}
\end{docCommands}
@@ -1185,10 +1175,10 @@ This (expandable) command returns the values of some variables. Currently, the w
\item \verb+struct_counter+: This returns a number and works also if
only \pkg{tagpdf-base} has been loaded. It gives back the state of
- the absolute structure counter and so number of the last structure
+ the absolute structure counter and so the number of the last structure
that has been created. This can be used to detect if in a piece of
code there are structure commands. Be aware that this is a \LaTeX{}
- counter and so reset in some places.
+ counter and so is reset in some places.
\item \verb+mc_counter+: This returns a number and works also if only
\pkg{tagpdf-base} has been loaded. It gives back the state of the
@@ -1271,7 +1261,7 @@ add the needed code.
command that saves the text internally in a box): If the box is used
directly, there is probably no problem. If the use is later, stash
the marked content and add the needed \verb+\tagmcuse+ directly
- before oder after the box when you use it.
+ before or after the box when you use it.
\item Don't use a saved box with markers twice.
@@ -1285,13 +1275,8 @@ add the needed code.
\begin{figure}
-\tagpdfparaOff
-\tagstructbegin{tag=Figure,alt={Illustration of link annotation structure},attribute=bbox}\tagmcbegin{tag=Figure}
-\tagstop
\input{link-figure-input}
-\tagstart
-\tagmcend\tagstructend
\caption{Structure needed for a link annotation}\label{fig:linkannot}
@@ -1714,22 +1699,27 @@ The key-val list understands the following keys:
content and structures.
\item[\PrintKeyName{label}] This key sets a label by which one can
- refer to the structure. It is e.g. used by
- \cs{tag\_struct\_use:n} (where a real label is actually not needed
- as you can only use structures already defined), and by the |ref|
- key (which can refer to future structures). Internally the label
- name will start with \texttt{tagpdfstruct-} and it stores the two
+ refer to the structure. Currently the key writes a property whose
+ name starts with \texttt{tagpdfstruct-} to the aux-file with the two
attributes \texttt{tagstruct} (the structure number) and
- \texttt{tagstructobj} (the object reference).
+ \texttt{tagstructobj} (the object reference) but also stores the
+ name and the structure number into a prop for use in the current compilation.
+ The label is e.g. used by \cs{tag\_struct\_use:n} and by the |ref|
+ key (which can refer to future structures).
\item[\PrintKeyName{parent}] With the parent key one can choose another
parent. The value is a structure number which must refer to an
already existing, previously created structure. Such a structure
number can have been stored previously with \cs{tag\_get:n}, but one
can also use a label on the parent structure and then use
- \cs{ref\_value:nn}\verb+{tagpdfstruct-label}{tagstruct}+ to retrieve
+ \cs{property\_ref:nn}\verb+{tagpdfstruct-label}{tagstruct}+ to retrieve
it.
+ \item[\PrintKeyName{firstkid}] If this key is used the structure is
+ added at the left of the kids of the parent structure (if the structure is not stashed). This means that it will be the first kid of the structure (unless some
+ later structure uses the key too). This can be needed e.g. for a caption as
+ the PDF reference requires it to be the first or last kid of its structure.
+
\item[\PrintKeyName{alt}] This key inserts an \texttt{/Alt} value in the
dictionary of structure object, see section~\ref{sec:alt}. The value
is handled as verbatim string and hex encoded. The value will be
@@ -1867,7 +1857,9 @@ The key-val list understands the following keys:
structure. The value should be a comma separated list of
structure labels set with the |label| key.
e.g. |ref={label1,label2}|. It can be used more than once in the
- key/value argument and combines the references.
+ key/value argument and combines the references. See below
+ in section~\ref{sec:Refkey} for an extended discussion about the |/Ref|
+ array.
\item[\PrintKeyName{E}] This key sets the |/E| key, the expanded
form of an abbreviation or an acronym (I couldn't think of a
@@ -1892,6 +1884,25 @@ These commands insert a structure previously stashed away as kid into the
currently active structure. A structure should be used only once, if the
structure already has a parent you will get a warning.
+\subsubsection{Updating the \texttt{Ref} key in structures}\label{sec:Refkey}
+
+Structures that cross reference other structures, e.g. citation commands, table of
+content entries, footnote require often a \texttt{Ref} key. \texttt{Ref}
+can be added with the |ref| key of \cs{tagstructbegin} described above
+but as it is a task that often has to be done automatically in code
+there exist also a command that allows to extend the \texttt{Ref} key (and perhaps in future also other keys) later.
+This command allows to add the value, the target structure of the \texttt{Ref} key,
+with four methods: directly as object reference, through a label name set with the |label| key, through a destination name if a \cs{MakeLinkTarget} has been used in
+the target structure---this also works if hyperref has not been loaded---and through
+the structure number, which has been stored e.g. in a label.
+
+\begin{docCommands}
+ {
+ {doc name=tag_struct_gput:nnn,doc parameter=\marg{structurenumber}\marg{keyword}\marg{value}},
+ }\end{docCommands}
+
+The allowed \meta{keywords} are \texttt{ref}, \texttt{ref\_label} \texttt{ref\_dest}
+and \texttt{ref\_num}.
\subsubsection{Root structure}
@@ -2053,36 +2064,49 @@ or the output routine is called.
\begin{docCommands}
{
- {doc name=tag_stop:},
- {doc name=tag_start:},
- {doc name=tagstop},
- {doc name=tagstart},
- {doc name=tag_stop:n,doc parameter=\marg{label}},
- {doc name=tag_start:n,doc parameter=\marg{label}}
+ {doc name=tag_suspend:n,doc parameter=\marg{label}},
+ {doc name=tag_resume:n,doc parameter=\marg{label}}
}
\end{docCommands}
-This commands stop and start tagging in the current group by switching
+These commands suspend and resume tagging in the current group by switching
\emph{local} booleans. They also stop the increasing of the counters which
keep track of paragraphs if the correct wrapper commands are used.
Restarting tagging is normally only needed if groups can't be used and then
-must be done with care: |\tagstart| should normally only restart tagging if
+must be done with care: |\tag_resume:n| should normally only restart tagging if
the corresponding stop command actually stopped tagging. This is implement
through a local counter which keeps track of the level.
-The \meta{label} can be used to identify the command in debugging message.
+The \meta{label} can be used to identify the command in debugging message. The label is not expanded and so can for example be a single command token.
+
+The commands are the L3-layer versions of |\SuspendTagging| and |\ResumeTagging|
+and will be available in the kernel with the 2024 november release.
\begin{taglstlisting}
-\tag_stop:n{outer}
+\tag_suspend:n{\outercommand}
...
- \tag_stop:n{inner}
+ \tag_suspend:n{\innercommand}
...
- \tag_start:n{inner}
+ \tag_resume:n{\innercommand}
...
-\tag_start:n{outer}
+\tag_resume:n{\outercommand}
\end{taglstlisting}
+\begin{docCommands}
+ {
+ {doc name=tag_stop:},
+ {doc name=tag_start:},
+ {doc name=tagstop},
+ {doc name=tagstart},
+ {doc name=tag_stop:n,doc parameter=\marg{label}},
+ {doc name=tag_start:n,doc parameter=\marg{label}}
+ }
+\end{docCommands}
+
+These commands are now deprecated in favor or |\tag_suspend:n| and |\tag_resume:n|
+but are still provided for some time.
+
\subsection{Lazy and automatic tagging}\label{sec:lazy}
@@ -2663,7 +2687,8 @@ already mentioned there are more requirements:
is normally not a problem. With pdflatex it could need additional
\verb+\pdfglyphtounicode+ commands.
- \item Hard and soft hyphen must be distinct.
+ \item Hard and soft hyphen must be distinct. In luamode this is now handled through
+ the \texttt{activate/softhyphen} key. For pdftex no solution is known.
\item Spaces between words should be space glyphs and not only a
horizontal movement. See section~\ref{sec:spacechars}.
@@ -2925,7 +2950,7 @@ command.
\texttt{root-AF}) has been added. This allow e.g. to add a css-file
which is be used if the \PDF\ is converted to html.
-\item First steps have been done to adapt the package to planed changes
+\item First steps have been done to adapt the package to planned changes
in \LaTeX{}: The command \cs{DocumentMetadata} will be added to the
format and will take over the role of \cs{DeclareDocumentMetadata}
from \pkg{pdfmanagement-testphase} and additionally will also load
@@ -3043,7 +3068,11 @@ cases building the structure should now need only two or three
compilations. The new code requires a current pdfmanagement-testphase and
is then used automatically if the new engines are detected.
-\subsection{}
+\subsection{Changes in version 0.99f}
+
+Deprecated |\tag_start:|, |\tag_stop:|, |\tag_stop:n| and
+|\tag_start:n| in favor of |\tag_suspend:n| and |\tag_resume:n|.
+
\printbibliography[heading=bibintoc]
@@ -3063,10 +3092,7 @@ examples and remarks easier to understand.
\item[postfix notation] \PDF{} uses in various places postfix
notation. This means that the operator is behind its arguments:
-\tagpdfparaOff
-
-\tagstructbegin{tag=Figure,alt={Illustration of postfix notation},attribute=bbox}\tagmcbegin{tag=Figure}
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {18};
\node[arg,right=of a1.east](a2) {0};
\node[operator,right= of a2.east](c) {obj};
@@ -3074,7 +3100,7 @@ examples and remarks easier to understand.
\draw[->] (c.south) --++(0,-2mm) -| (a2);
\end{tikzpicture}
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {18};
\node[arg,right=of a1.east](a2) {0};
\node[operator,right= of a2.east](c) {R};
@@ -3083,7 +3109,7 @@ examples and remarks easier to understand.
\end{tikzpicture} (a reference (operator R) to an object
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {1};
\node[arg,right = of a1.east](a2) {0};
\node[arg,right = of a2.east](a3) {0};
@@ -3099,18 +3125,14 @@ examples and remarks easier to understand.
\draw[->] (c.south) --++(0,-2mm) -|(a1);
\end{tikzpicture}
-\begin{tikzpicture}[baseline=(c.base)]
+\begin{tikzpicture}[baseline=(c.base),alt={Illustration of postfix notation}]
\node[arg](a1) {/P};
\node[arg,right = of a1.east](a2) {<</MCID 0>>};
\node[operator,right = of a2.east](c) {BDC};
\draw[->] (c.south) --++(0,-2mm) -| (a1);
\draw[->] (c.south) --++(0,-2mm) -| (a2);
\end{tikzpicture}
-\tagmcend\tagstructend
-
-
-\tagpdfparaOn
\item[Names] \PDF{} knows a sort of variable called a
\enquote{name}. Names start with a slash and may include any regular
@@ -3154,19 +3176,13 @@ examples and remarks easier to understand.
\mbox{\texttt{[0 15 0 R (hello) <</Type /X>> [1 2 3]]}}
-\tagpdfparaOff
-
- \tagstructbegin{tag=Figure,alt={Illustration of array},attribute=bbox}\tagmcbegin{tag=Figure}
- \begin{tikzpicture}[baseline=(c.base)]
+ \begin{tikzpicture}[baseline=(c.base),alt={Illustration of array}]
\node[arg](a1) {0};
\node[arg,right = of a1.east](a2) {15 0 R};
\node[arg,right = of a2.east](a3) {(hello)};
\node[arg,right = of a3.east](a4) {<</Type /X>>};
\node[arg,right = of a4.east](a5) {[1 2 3]};
\end{tikzpicture}
-\tagmcend\tagstructend
-
-\tagpdfparaOn
\item[Dictionaries] Dictionaries are enclosed by double angle
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index 38a5f0196d..463790565c 100644
--- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
+++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
@@ -1,5 +1,5 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2024-04-12} {0.99b}
+\ProvidesExplPackage {tagpdfdocu-patches} {2024-10-27} {0.99g}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
@@ -33,7 +33,7 @@
\else
\addpenalty\@secpenalty\addvspace{1.5ex}%
\fi
- {\tagpdfsetup{paratag=H10}\parindent \z@
+ {\tagpdfsetup{para/maintag=P,para/tag=Strong}\parindent \z@
\setlength{\parfillskip}{\z@ plus 1fil}%
\raggedright\normalfont\bfseries\nobreak
\nobreak\interlinepenalty \@M #1\par\nobreak%
@@ -82,17 +82,13 @@
% }
\ExplSyntaxOff
-% ======== tikzpicture ==========
-% TODO this needs some investigation: it messes up the stack if one add paraOff
-
-\AddToHook{env/tikzpicture/begin}{}
%======== tcolorbox ========
% We switch of paratagging at the begin and reenable it locally in before upper.
% the before upper setting is dangerous as it can be overwritten by
% users. So a more stable hook is needed.
% we force also a \par and add a div structure, to avoid clashes with the block
-% tagging code. This needs revisting!
+% tagging code. This needs revisiting!
\AddToHook{env/tcolorbox/before}{\par\tagstructbegin{tag=Div}}
\AddToHook{env/tcolorbox/begin}{\tagpdfparaOff \tcbset{before upper=\tagpdfparaOn}}
@@ -138,22 +134,6 @@
% ======= footnote ========
% done in testphase code
-% ======= bibliography ========
-% biblatex. Creates some empty mc-chunks.
-% no internal patches, but redefining begentry/finentry is not safe.
-% better hook is needed.
-
-
-\def\blx@endbibliography{%
- \csuse{blx@endenv@\blx@theenv}%
- \blx@noitem
- \blx@locallabelwidth@finish
- \endgroup
- \blx@bibnote\blx@thepostnote
-% \endgroup
- \expandafter\endgroup\if@endpe\@doendpe\fi
-}
-
% ====== hyperref ========
% this should probably go into tagpdf, but it is related to
% problem of pdf strings and context ....
@@ -167,30 +147,147 @@
\let\tagstructend\relax
}}{}
-%====== picture =======
+%====== tikz picture =======
+% first draft to tag. The main problem is to handle paragraphs. One
+\ExplSyntaxOn
+\cs_new_protected:Npn\__tag_tikz_savepos:n #1
+ {
+ \tex_savepos:D
+ \tikz@resetexpandcount%
+ \tikz@scan@one@point\pgfutil@firstofone(current~bounding~box.north~east)\relax
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \property_record:nn{#1}{xpos,ypos,abspage}
+ \property_record:nn{#1-tr}{pgfx,pgfy}
+ \tikz@scan@one@point\pgfutil@firstofone(current~bounding~box.south~west)\relax
+ \pgf@pos@transform{\pgf@x}{\pgf@y}%
+ \property_record:nn{#1-bl}{pgfx,pgfy}
+ \tex_savepos:D
+ }
+\cs_generate_variant:Nn \__tag_tikz_savepos:n {e}
+
+\NewProperty{pgfx}{now}{0}
+ {
+ \dim_compare:nNnTF {\dim_abs:n {\pgf@x}} > {15999pt}
+ { 0 }
+ { \dim_to_decimal_in_sp:n{\pgf@x} }
+ }
+\NewProperty{pgfy}{now}{0}
+ {
+ \dim_compare:nNnTF {\dim_abs:n {\pgf@y}} > {15999pt}
+ { 0 }
+ { \dim_to_decimal_in_sp:n{\pgf@y} }
+ }
+
+\cs_new_protected:Npn \__tag_tikz_getbbox:
+ {
+ \int_gincr:N\g__tag_graphic_int
+ \tl_set:Ne\l__tag_graphic_currentlabel_tl {__tag_graphic_\int_use:N \g__tag_graphic_int}
+ \tl_gset:Ne\g__tag_graphic_lx_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{xpos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-bl}{pgfx}{0}sp
+ }
+ }
+ \tl_gset:Ne\g__tag_graphic_ly_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{ypos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-bl}{pgfy}{0}sp
+ }
+ }
+ \tl_gset:Ne\g__tag_graphic_ux_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{xpos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-tr}{pgfx}{0}sp
+ }
+ }
+ \tl_gset:Ne\g__tag_graphic_uy_tl
+ {
+ \dim_to_decimal_in_bp:n
+ { \property_ref:een {\l__tag_graphic_currentlabel_tl}{ypos}{0}sp
+ + \property_ref:een {\l__tag_graphic_currentlabel_tl-tr}{pgfy}{0}sp
+ }
+ }
+ }
-% PAC3 complained that the BBox is missing, so we are cheating for now
-% and add a fix size.
-\tagpdfsetup
- {
- newattribute =
- {bbox}{/O /Layout /BBox [0 0 100 100]}
+\cs_new_protected:Npn \__tag_graphic_tikz_begin_picture:
+ {
+ \tag_mc_end_push:
+ \bool_if:NTF \l__tag_graphic_artifact_bool
+ { \tagmcbegin{artifact} }
+ {
+ \__tag_tikz_getbbox:
+ \tagstructbegin{tag=Figure,alt=\l__tag_graphic_alt_tl}\tagmcbegin{}
+ \__tag_prop_gput:cne
+ { g__tag_struct_\int_eval:n {\c@g__tag_struct_abs_int}_prop }
+ { A }
+ {
+ <<
+ /O /Layout /BBox~
+ [
+ \g__tag_graphic_lx_tl\c_space_tl
+ \g__tag_graphic_ly_tl\c_space_tl
+ \g__tag_graphic_ux_tl\c_space_tl
+ \g__tag_graphic_uy_tl
+ ]
+ >>
+ }
+ \bool_if:NT\l__tag_graphic_debug_bool
+ {
+ \__tag_graphic_show_bbox:VVVVne
+ \g__tag_graphic_lx_tl
+ \g__tag_graphic_ly_tl
+ \g__tag_graphic_ux_tl
+ \g__tag_graphic_uy_tl
+ {red}
+ {\int_use:N\g__tag_graphic_int}
+ }
+ }
+ \SuspendTagging{tikz}
}
-% ======= maketitle
-
-\renewcommand\maketitle{%
- \tagstructbegin{tag=Title}
- \begin{center}%
- \let\thanks\footnote
- \makeatletter
- \huge \@title \par
- \vskip .5em
- \@author \par
- \vskip 1em%
- \@date \par
- \end{center}%
- \tagstructend}
+\cs_new_protected:Npn \__tag_graphic_tikz_end_picture:
+ {
+ \ResumeTagging{tikz}\tagmcend
+ \bool_if:NF \l__tag_graphic_artifact_bool
+ {
+ \tagstructend
+ \__tag_tikz_savepos:e {__tag_graphic_\int_use:N \g__tag_graphic_int}
+ }
+ \tag_mc_begin_pop:n{}
+ }
+
+\tikzset
+ {
+ every~picture/.style=
+ {
+ artifact,
+ execute~at~begin~picture=\__tag_graphic_tikz_begin_picture:,
+ execute~at~end~picture=\__tag_graphic_tikz_end_picture:
+ }
+ }
+\AddToHook{env/tikzpicture/before}{\leavevmode}
+
+\tikzset
+ {
+ alt/.code=
+ {
+ \bool_set_false:N \l__tag_graphic_artifact_bool
+ \tl_set:Nn \l__tag_graphic_alt_tl{#1}
+ }
+ }
+\tikzset
+ {
+ artifact/.code=
+ \bool_set_true:N \l__tag_graphic_artifact_bool
+ }
+
+\ExplSyntaxOff
+
+
+
\endinput
diff --git a/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex b/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex
index 2484a42020..a02411c31f 100644
--- a/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex
+++ b/macros/latex/contrib/tagpdf/tagpdfsetup-keys.tex
@@ -1,5 +1,5 @@
%% Overview over tagpdfsetup keys
-%% The keys are split in a number of key pathes.
+%% The keys are split in a number of key paths.
\tagpdfsetup{table/header-rows=1}
\begin{tabular}{lllll}
\toprule
@@ -12,7 +12,8 @@ new key name & old key name & value &type & defined in \\\midrul
activate & activate & boolean &meta & tagpdf \\
activate/all & activate-all & boolean &meta & tagpdf\\
-activate/mc & activate-mc & boolean &bool & tagpdf\\
+activate/mc & activate-mc & boolean &bool & tagpdf\\
+activate/softhyphen & --- & boolean &bool & tagpdf \\
activate/spaces & interwordspace & boolean &code & tagpdf-space\\
activate/struct & activate-struct & boolean &bool & tagpdf\\
activate/struct-dest & no-struct-dest&boolean &bool & tagpdf\\