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.md8
-rw-r--r--macros/latex/contrib/tagpdf/ex-AF-file.pdf106
-rw-r--r--macros/latex/contrib/tagpdf/ex-alt-actualtext.pdfbin42249 -> 34295 bytes
-rw-r--r--macros/latex/contrib/tagpdf/ex-attribute.pdf80
-rw-r--r--macros/latex/contrib/tagpdf/ex-formula-problem.pdf68
-rw-r--r--macros/latex/contrib/tagpdf/ex-list.pdf152
-rw-r--r--macros/latex/contrib/tagpdf/ex-mc-manual-para-split-obsolete.pdf46
-rw-r--r--macros/latex/contrib/tagpdf/ex-softhyphen.pdf68
-rw-r--r--macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf60
-rw-r--r--macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf94
-rw-r--r--macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf90
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx10
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx30
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1639998 -> 1646817 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.tex6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx20
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx8
-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.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx85
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx131
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx118
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.ins2
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin1094883 -> 1085167 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex2172
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty62
29 files changed, 2050 insertions, 1404 deletions
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index 989f3e4c0a..21be5e7a7d 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,7 +1,7 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.98q
-Packagedate: 2023/11/19
-Author: Ulrike Fischer
+Packageversion: 0.98r
+Packagedate: 2023/12/18
+Author: Ulrike Fischer, LaTeX Project Team
## License
The tagpdf package may be modified and distributed under the terms and conditions of the
@@ -43,4 +43,4 @@ where they can be found.
## Issues, comments, etc
-https://github.com/u-fischer/tagpdf
+https://github.com/latex3/tagpdf
diff --git a/macros/latex/contrib/tagpdf/ex-AF-file.pdf b/macros/latex/contrib/tagpdf/ex-AF-file.pdf
index 7a3510dce2..0467680bb7 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
%ÌÕÁÔÅØÐÄÆ
23 0 obj
-<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20231119133347Z) /Size 151 /CheckSum (45E3979306E2D6608CA47CED1BB11C85) >> /Length 151 >>
+<< /Subtype /application#2Fx-tex/Type /EmbeddedFile /Params<</ModDate (D:20231218165304+01'00') /Size 151 /CheckSum (9C8ECF305917FA946D95ABE1EE87EFE1) >> /Length 151 >>
stream
%% LaTeX2e file `example-input-file.tex'
%% generated by the `filecontents' environment
-%% from source `ex-AF-file' on 2023/11/19.
+%% from source `ex-AF-file' on 2023/12/18.
%%
Additional info!
@@ -15,7 +15,7 @@ endobj
<< /Type /Filespec /AFRelationship /Unspecified /F <FEFF006500780061006D0070006C0065002D0069006E007000750074002D00660069006C0065002E007400650078> /UF <FEFF006500780061006D0070006C0065002D0069006E007000750074002D00660069006C0065002E007400650078> /EF<</F 23 0 R/UF 23 0 R>> >>
endobj
26 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231119) >> /Length 19 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231218) >> /Length 19 >>
stream
Bär with teh shirt
endstream
@@ -24,7 +24,7 @@ endobj
<< /Type /Filespec /AFRelationship /Supplement /F <FEFF007400610067002D0041004600660069006C00650031002E007400780074> /UF <FEFF007400610067002D0041004600660069006C00650031002E007400780074> /EF<</F 26 0 R/UF 26 0 R>> >>
endobj
29 0 obj
-<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231119) >> /Length 4 >>
+<< /Subtype /text#2Fplain/Type /EmbeddedFile /Params<</ModDate (D:20231218) >> /Length 4 >>
stream
Duck
endstream
@@ -33,7 +33,7 @@ endobj
<< /Type /Filespec /AFRelationship /Supplement /F <FEFF007400610067002D0041004600660069006C00650032002E007400780074> /UF <FEFF007400610067002D0041004600660069006C00650032002E007400780074> /EF<</F 29 0 R/UF 29 0 R>> >>
endobj
32 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11362 >>
+<< /Type /Metadata /Subtype /XML /Length 11382 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -242,17 +242,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:34:46Z</rdf:li>
+ <rdf:li>2023-12-18T16:53:27+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>2023-11-19T13:34:46Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:34:46Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:34:46Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:53:27+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:53:27+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:53:27+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:38d5a844-2217-4081-87cc-b2129dc357a6</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:093e8ef6-098e-4201-8f10-5dbf8a2fe8b2</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:0e8072c7-0780-4492-8b11-fb55665e5017</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -350,7 +350,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/inline/2022) /RoleMapNS 19 0 R >>
endobj
20 0 obj
-<< /Type /Namespace /NS (data:,D85A321F-C9AB-5DDD-AE5F-6AFFFA790903) >>
+<< /Type /Namespace /NS (data:,2E18371-2178-CD86-EAAA-9D751F70709C) >>
endobj
7 0 obj
[ 8 0 R 10 0 R 12 0 R 14 0 R 16 0 R 18 0 R 20 0 R ]
@@ -452,60 +452,60 @@ endobj
<< /Type /Catalog /Pages 37 0 R /MarkInfo 38 0 R/Lang (de-DE)/Metadata 32 0 R/StructTreeRoot 5 0 R >>
endobj
47 0 obj
-<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231119133446Z)/ModDate (D:20231119133446Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165327+01'00')/ModDate (D:20231218165327+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 48
0000000002 65535 f
-0000013686 00000 n
+0000013712 00000 n
0000000003 00000 f
0000000004 00000 f
0000000009 00000 f
-0000016242 00000 n
-0000013769 00000 n
-0000015665 00000 n
-0000013980 00000 n
+0000016267 00000 n
+0000013795 00000 n
+0000015690 00000 n
+0000014006 00000 n
0000000011 00000 f
-0000014048 00000 n
+0000014074 00000 n
0000000013 00000 f
-0000014118 00000 n
+0000014144 00000 n
0000000021 00000 f
-0000014881 00000 n
-0000014199 00000 n
-0000015159 00000 n
-0000014988 00000 n
-0000015467 00000 n
-0000015266 00000 n
-0000015576 00000 n
+0000014907 00000 n
+0000014225 00000 n
+0000015185 00000 n
+0000015014 00000 n
+0000015493 00000 n
+0000015292 00000 n
+0000015602 00000 n
0000000000 00000 f
-0000015733 00000 n
+0000015758 00000 n
0000000020 00000 n
-0000000376 00000 n
-0000015846 00000 n
-0000000667 00000 n
-0000000822 00000 n
-0000015978 00000 n
-0000001056 00000 n
-0000001196 00000 n
-0000016110 00000 n
-0000001430 00000 n
-0000013623 00000 n
-0000013488 00000 n
-0000012882 00000 n
-0000019980 00000 n
-0000020334 00000 n
-0000013733 00000 n
-0000013826 00000 n
-0000013943 00000 n
-0000016347 00000 n
-0000018796 00000 n
-0000016533 00000 n
-0000019017 00000 n
-0000020134 00000 n
-0000020396 00000 n
-0000020514 00000 n
+0000000382 00000 n
+0000015871 00000 n
+0000000673 00000 n
+0000000828 00000 n
+0000016003 00000 n
+0000001062 00000 n
+0000001202 00000 n
+0000016135 00000 n
+0000001436 00000 n
+0000013649 00000 n
+0000013514 00000 n
+0000012908 00000 n
+0000020005 00000 n
+0000020359 00000 n
+0000013759 00000 n
+0000013852 00000 n
+0000013969 00000 n
+0000016372 00000 n
+0000018821 00000 n
+0000016558 00000 n
+0000019042 00000 n
+0000020159 00000 n
+0000020421 00000 n
+0000020539 00000 n
trailer
-<< /Size 48 /Root 46 0 R /Info 47 0 R /ID [ <3C4C2E49156D77AD5FF589962A81127A> <3C4C2E49156D77AD5FF589962A81127A> ] >>
+<< /Size 48 /Root 46 0 R /Info 47 0 R /ID [ <A4888D7EDBF2265F1E4F3942A5101D8C> <A4888D7EDBF2265F1E4F3942A5101D8C> ] >>
startxref
-20725
+20762
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf b/macros/latex/contrib/tagpdf/ex-alt-actualtext.pdf
index 6989f675ac..19b62f6c22 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 5e4f359b39..3fae0d8e3c 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 11364 >>
+<< /Type /Metadata /Subtype /XML /Length 11384 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -216,17 +216,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:37:28Z</rdf:li>
+ <rdf:li>2023-12-18T16:54:32+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>2023-11-19T13:37:28Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:37:28Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:37:28Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:54:32+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:54:32+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:54:32+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:7a9cf910-1c19-429a-8f24-339c62d8a57f</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:f082e4cc-de88-4d9c-84ff-78390061b22e</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:ac67207c-46f2-43f7-8717-d9fb86bb4927</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -449,51 +449,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.17.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20231119133728Z)/ModDate (D:20231119133728Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/Title (Title)/CreationDate (D:20231218165432+01'00')/ModDate (D:20231218165432+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 39
0000000002 65535 f
-0000012825 00000 n
+0000012845 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014944 00000 n
-0000012908 00000 n
-0000013227 00000 n
+0000014964 00000 n
+0000012928 00000 n
+0000013247 00000 n
0000000000 00000 f
-0000013932 00000 n
-0000014017 00000 n
-0000014109 00000 n
-0000014193 00000 n
-0000014283 00000 n
+0000013952 00000 n
+0000014037 00000 n
+0000014129 00000 n
+0000014213 00000 n
+0000014303 00000 n
0000000020 00000 n
0000000071 00000 n
-0000014412 00000 n
-0000014552 00000 n
-0000014636 00000 n
-0000014726 00000 n
-0000014835 00000 n
+0000014432 00000 n
+0000014572 00000 n
+0000014656 00000 n
+0000014746 00000 n
+0000014855 00000 n
0000000132 00000 n
-0000012738 00000 n
-0000012596 00000 n
-0000011586 00000 n
-0000017284 00000 n
-0000017638 00000 n
-0000012872 00000 n
-0000012972 00000 n
-0000013190 00000 n
-0000013806 00000 n
-0000015062 00000 n
-0000016240 00000 n
-0000015139 00000 n
-0000015213 00000 n
-0000016476 00000 n
-0000017438 00000 n
-0000017700 00000 n
-0000017818 00000 n
+0000012758 00000 n
+0000012616 00000 n
+0000011606 00000 n
+0000017304 00000 n
+0000017658 00000 n
+0000012892 00000 n
+0000012992 00000 n
+0000013210 00000 n
+0000013826 00000 n
+0000015082 00000 n
+0000016260 00000 n
+0000015159 00000 n
+0000015233 00000 n
+0000016496 00000 n
+0000017458 00000 n
+0000017720 00000 n
+0000017838 00000 n
trailer
-<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <75FAFAFFF317C04961B178649521EB4A> <75FAFAFFF317C04961B178649521EB4A> ] >>
+<< /Size 39 /Root 37 0 R /Info 38 0 R /ID [ <87A67E5AF52178AFD399D665CB3CE11A> <87A67E5AF52178AFD399D665CB3CE11A> ] >>
startxref
-18043
+18075
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-formula-problem.pdf b/macros/latex/contrib/tagpdf/ex-formula-problem.pdf
index b135d8e44f..a1ee76c724 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 11370 >>
+<< /Type /Metadata /Subtype /XML /Length 11390 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -239,17 +239,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:38:51Z</rdf:li>
+ <rdf:li>2023-12-18T16:55:04+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>2023-11-19T13:38:51Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:38:51Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:38:51Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:55:04+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:55:04+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:55:04+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:8eb2ce1d-b2ec-440a-8bc2-73733eb3eeb0</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:6f499452-8e28-414b-8dc5-c9e0e9473e77</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:a6776950-c564-4a23-89bd-1070861bab80</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -425,46 +425,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.17.0)/Creator (LaTeX)/CreationDate (D:20231119133851Z)/ModDate (D:20231119133851Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165504+01'00')/ModDate (D:20231218165504+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 34
0000000002 65535 f
-0000012796 00000 n
+0000012816 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014359 00000 n
-0000012879 00000 n
-0000013117 00000 n
+0000014379 00000 n
+0000012899 00000 n
+0000013137 00000 n
0000000000 00000 f
-0000013696 00000 n
-0000013803 00000 n
-0000013909 00000 n
+0000013716 00000 n
+0000013823 00000 n
+0000013929 00000 n
0000000637 00000 n
0000000502 00000 n
0000000020 00000 n
-0000018443 00000 n
-0000018797 00000 n
-0000014021 00000 n
-0000014127 00000 n
+0000018463 00000 n
+0000018817 00000 n
+0000014041 00000 n
+0000014147 00000 n
0000000724 00000 n
-0000012709 00000 n
-0000012574 00000 n
-0000012184 00000 n
-0000012843 00000 n
-0000012949 00000 n
-0000013080 00000 n
-0000014460 00000 n
-0000017216 00000 n
-0000014661 00000 n
-0000014737 00000 n
-0000017452 00000 n
-0000018597 00000 n
-0000018866 00000 n
-0000018984 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
trailer
-<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <C8449D2A8DF9E8F15C6E4A9A73EF1D4E> <C8449D2A8DF9E8F15C6E4A9A73EF1D4E> ] >>
+<< /Size 34 /Root 32 0 R /Info 33 0 R /ID [ <7DF556227FCAB9E10CB341987B6AE040> <7DF556227FCAB9E10CB341987B6AE040> ] >>
startxref
-19195
+19227
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-list.pdf b/macros/latex/contrib/tagpdf/ex-list.pdf
index fb26522f3b..43dfe42bf8 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 11359 >>
+<< /Type /Metadata /Subtype /XML /Length 11379 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:40:08Z</rdf:li>
+ <rdf:li>2023-12-18T16:55:36+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>2023-11-19T13:40:08Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:40:08Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:40:08Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:55:36+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:55:36+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:55:36+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:4c749825-1de7-414c-879f-29e4d0bef66e</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:19435395-436e-4e73-8ea2-775846824f23</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:48712e9e-58ec-4ad8-87e8-3a42043a5fe0</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -653,85 +653,85 @@ endobj
<< /Type /Catalog /Pages 54 0 R /MarkInfo 55 0 R/Lang (en-US)/Metadata 48 0 R/StructTreeRoot 5 0 R >>
endobj
72 0 obj
-<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231119134008Z)/ModDate (D:20231119134008Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165536+01'00')/ModDate (D:20231218165536+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 73
0000000002 65535 f
-0000013492 00000 n
+0000013512 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000019029 00000 n
-0000013575 00000 n
-0000014414 00000 n
+0000019049 00000 n
+0000013595 00000 n
+0000014434 00000 n
0000000000 00000 f
-0000015210 00000 n
-0000015311 00000 n
-0000015387 00000 n
-0000015463 00000 n
-0000015550 00000 n
-0000015657 00000 n
-0000015747 00000 n
-0000015857 00000 n
-0000015941 00000 n
-0000016029 00000 n
-0000016152 00000 n
-0000016242 00000 n
-0000016352 00000 n
-0000016436 00000 n
-0000016524 00000 n
-0000016647 00000 n
-0000016734 00000 n
-0000016845 00000 n
-0000016935 00000 n
-0000017045 00000 n
-0000017129 00000 n
-0000017217 00000 n
-0000017340 00000 n
-0000017430 00000 n
-0000017540 00000 n
-0000017624 00000 n
-0000017712 00000 n
-0000017835 00000 n
-0000017922 00000 n
-0000018037 00000 n
-0000018127 00000 n
-0000018237 00000 n
-0000018321 00000 n
-0000018409 00000 n
-0000018532 00000 n
-0000018622 00000 n
-0000018733 00000 n
-0000018817 00000 n
-0000018905 00000 n
+0000015230 00000 n
+0000015331 00000 n
+0000015407 00000 n
+0000015483 00000 n
+0000015570 00000 n
+0000015677 00000 n
+0000015767 00000 n
+0000015877 00000 n
+0000015961 00000 n
+0000016049 00000 n
+0000016172 00000 n
+0000016262 00000 n
+0000016372 00000 n
+0000016456 00000 n
+0000016544 00000 n
+0000016667 00000 n
+0000016754 00000 n
+0000016865 00000 n
+0000016955 00000 n
+0000017065 00000 n
+0000017149 00000 n
+0000017237 00000 n
+0000017360 00000 n
+0000017450 00000 n
+0000017560 00000 n
+0000017644 00000 n
+0000017732 00000 n
+0000017855 00000 n
+0000017942 00000 n
+0000018057 00000 n
+0000018147 00000 n
+0000018257 00000 n
+0000018341 00000 n
+0000018429 00000 n
+0000018552 00000 n
+0000018642 00000 n
+0000018753 00000 n
+0000018837 00000 n
+0000018925 00000 n
0000000020 00000 n
-0000013393 00000 n
-0000013251 00000 n
-0000011469 00000 n
-0000029156 00000 n
-0000022204 00000 n
-0000029510 00000 n
-0000013539 00000 n
-0000013695 00000 n
-0000014377 00000 n
-0000015006 00000 n
-0000019147 00000 n
-0000021106 00000 n
-0000019279 00000 n
-0000019353 00000 n
-0000021340 00000 n
-0000022355 00000 n
-0000022552 00000 n
-0000027691 00000 n
-0000022888 00000 n
-0000023011 00000 n
-0000027927 00000 n
-0000029310 00000 n
-0000029572 00000 n
-0000029690 00000 n
+0000013413 00000 n
+0000013271 00000 n
+0000011489 00000 n
+0000029176 00000 n
+0000022224 00000 n
+0000029530 00000 n
+0000013559 00000 n
+0000013715 00000 n
+0000014397 00000 n
+0000015026 00000 n
+0000019167 00000 n
+0000021126 00000 n
+0000019299 00000 n
+0000019373 00000 n
+0000021360 00000 n
+0000022375 00000 n
+0000022572 00000 n
+0000027711 00000 n
+0000022908 00000 n
+0000023031 00000 n
+0000027947 00000 n
+0000029330 00000 n
+0000029592 00000 n
+0000029710 00000 n
trailer
-<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <F1BDDA4E8C7F976DD737665B4BE7A55C> <F1BDDA4E8C7F976DD737665B4BE7A55C> ] >>
+<< /Size 73 /Root 71 0 R /Info 72 0 R /ID [ <5E4774C3791D95301ACD19EAD1CFC0CF> <5E4774C3791D95301ACD19EAD1CFC0CF> ] >>
startxref
-29901
+29933
%%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 22cba55cba..978f983adf 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 11384 >>
+<< /Type /Metadata /Subtype /XML /Length 11404 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -243,17 +243,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:41:18Z</rdf:li>
+ <rdf:li>2023-12-18T16:56:05+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>2023-11-19T13:41:18Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:41:18Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:41:18Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:56:05+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:56:05+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:56:05+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:c33d64b4-96ec-4e48-8f27-0b3edc831547</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:2f590883-d839-4051-8d17-22e16f4ed267</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:1595e56f-70f8-4474-867a-1ae2b3cd7f64</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>2</prism:pageCount>
</rdf:Description>
@@ -413,12 +413,12 @@ endobj
<< /Type /Catalog /Pages 14 0 R /Lang (en-US)/Metadata 15 0 R >>
endobj
25 0 obj
-<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231119134118Z)/ModDate (D:20231119134118Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165605+01'00')/ModDate (D:20231218165605+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 26
0000000002 65535 f
-0000016834 00000 n
+0000016854 00000 n
0000000003 00000 f
0000000004 00000 f
0000000005 00000 f
@@ -427,24 +427,24 @@ xref
0000000008 00000 f
0000000000 00000 f
0000002976 00000 n
-0000016628 00000 n
+0000016648 00000 n
0000003094 00000 n
0000000020 00000 n
-0000023455 00000 n
-0000023809 00000 n
+0000023475 00000 n
+0000023829 00000 n
0000003181 00000 n
-0000016747 00000 n
-0000014655 00000 n
-0000016881 00000 n
-0000022004 00000 n
-0000017188 00000 n
-0000017263 00000 n
-0000022240 00000 n
-0000023609 00000 n
-0000023877 00000 n
-0000023958 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
trailer
-<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <DA491642949C7CF65190DA24A01CA523> <DA491642949C7CF65190DA24A01CA523> ] >>
+<< /Size 26 /Root 24 0 R /Info 25 0 R /ID [ <D3C598AB7A053A3DD44A24FFA696E407> <D3C598AB7A053A3DD44A24FFA696E407> ] >>
startxref
-24169
+24201
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-softhyphen.pdf b/macros/latex/contrib/tagpdf/ex-softhyphen.pdf
index 0e83e98465..19a7add1f5 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 11365 >>
+<< /Type /Metadata /Subtype /XML /Length 11385 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:42:28Z</rdf:li>
+ <rdf:li>2023-12-18T16:56:31+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>2023-11-19T13:42:28Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:42:28Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:42:28Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:56:31+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:56:31+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:56:31+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:aa82e685-4098-469d-861c-3c45dfc700c7</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:85ed99f7-c19c-476d-812a-bd2591f00049</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:ca29539e-9ba0-41f7-86f8-6cc5a9e4611e</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -393,43 +393,43 @@ endobj
<< /Type /Catalog /Pages 19 0 R /MarkInfo 20 0 R/Lang (en-US)/Metadata 14 0 R/StructTreeRoot 5 0 R >>
endobj
30 0 obj
-<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231119134228Z)/ModDate (D:20231119134228Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165631+01'00')/ModDate (D:20231218165631+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 31
0000000002 65535 f
-0000012343 00000 n
+0000012363 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000013721 00000 n
-0000012426 00000 n
-0000012644 00000 n
+0000013741 00000 n
+0000012446 00000 n
+0000012664 00000 n
0000000000 00000 f
-0000013236 00000 n
-0000013329 00000 n
-0000013415 00000 n
-0000013525 00000 n
-0000013611 00000 n
+0000013256 00000 n
+0000013349 00000 n
+0000013435 00000 n
+0000013545 00000 n
+0000013631 00000 n
0000000020 00000 n
-0000012256 00000 n
-0000012121 00000 n
-0000011475 00000 n
-0000017670 00000 n
-0000018034 00000 n
-0000012390 00000 n
-0000012476 00000 n
-0000012607 00000 n
-0000013822 00000 n
-0000016470 00000 n
-0000013976 00000 n
-0000014150 00000 n
-0000016710 00000 n
-0000017829 00000 n
-0000018096 00000 n
-0000018214 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
+0000014170 00000 n
+0000016730 00000 n
+0000017849 00000 n
+0000018116 00000 n
+0000018234 00000 n
trailer
-<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <D3BABA5B4BFA89297AB18B331256197C> <D3BABA5B4BFA89297AB18B331256197C> ] >>
+<< /Size 31 /Root 29 0 R /Info 30 0 R /ID [ <BF19B56A876C85685B4226B9DA446ACA> <BF19B56A876C85685B4226B9DA446ACA> ] >>
startxref
-18425
+18457
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf b/macros/latex/contrib/tagpdf/ex-spaceglyph-listings.pdf
index 2f48f2d9c9..a0eb729bb6 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 11374 >>
+<< /Type /Metadata /Subtype /XML /Length 11394 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:43:31Z</rdf:li>
+ <rdf:li>2023-12-18T16:56:58+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>2023-11-19T13:43:31Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:43:31Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:43:31Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:56:58+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:56:58+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:56:58+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:acdc2435-bf29-4e54-8d09-1c9b6dc32038</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:8582b1db-9189-4c8e-8ae1-f5cb4bfcb2e8</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:715fe598-2cf7-4804-8ee9-3614435f190c</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -354,39 +354,39 @@ endobj
<< /Type /Catalog /Pages 15 0 R /MarkInfo 16 0 R/Lang (en-US)/Metadata 10 0 R/StructTreeRoot 5 0 R >>
endobj
26 0 obj
-<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231119134331Z)/ModDate (D:20231119134331Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165658+01'00')/ModDate (D:20231218165658+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 27
0000000002 65535 f
-0000011990 00000 n
+0000012010 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000012865 00000 n
-0000012073 00000 n
-0000012212 00000 n
+0000012885 00000 n
+0000012093 00000 n
+0000012232 00000 n
0000000000 00000 f
-0000012791 00000 n
+0000012811 00000 n
0000000020 00000 n
-0000011903 00000 n
-0000011768 00000 n
-0000011484 00000 n
-0000015048 00000 n
-0000015402 00000 n
-0000012037 00000 n
-0000012104 00000 n
-0000012175 00000 n
-0000012966 00000 n
-0000014032 00000 n
-0000013021 00000 n
-0000013096 00000 n
-0000014268 00000 n
-0000015202 00000 n
-0000015464 00000 n
-0000015582 00000 n
+0000011923 00000 n
+0000011788 00000 n
+0000011504 00000 n
+0000015068 00000 n
+0000015422 00000 n
+0000012057 00000 n
+0000012124 00000 n
+0000012195 00000 n
+0000012986 00000 n
+0000014052 00000 n
+0000013041 00000 n
+0000013116 00000 n
+0000014288 00000 n
+0000015222 00000 n
+0000015484 00000 n
+0000015602 00000 n
trailer
-<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <535CC97264842307626DA15720B24663> <535CC97264842307626DA15720B24663> ] >>
+<< /Size 27 /Root 25 0 R /Info 26 0 R /ID [ <4B690D51D73DA114967668E465C7FF2E> <4B690D51D73DA114967668E465C7FF2E> ] >>
startxref
-15793
+15825
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf b/macros/latex/contrib/tagpdf/ex-structure-obsolete.pdf
index 8df7f2b594..9f8c7a0b6f 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 11373 >>
+<< /Type /Metadata /Subtype /XML /Length 11393 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:44:38Z</rdf:li>
+ <rdf:li>2023-12-18T16:57:26+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>2023-11-19T13:44:38Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:44:38Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:44:38Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:57:26+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:57:26+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:57:26+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:bf5e4a2b-cfa9-4fc5-878c-8f9d2ee95445</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:abdf394d-d275-41e8-891c-758451157aaf</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:62157a53-a4aa-4084-8ca4-634237e85781</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -526,56 +526,56 @@ endobj
<< /Type /Catalog /Pages 26 0 R /MarkInfo 27 0 R/Lang (en-US)/Metadata 20 0 R/StructTreeRoot 5 0 R >>
endobj
43 0 obj
-<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231119134438Z)/ModDate (D:20231119134438Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165726+01'00')/ModDate (D:20231218165726+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 44
0000000002 65535 f
-0000012777 00000 n
+0000012797 00000 n
0000000003 00000 f
0000000004 00000 f
0000000008 00000 f
-0000014913 00000 n
-0000012860 00000 n
-0000013209 00000 n
+0000014933 00000 n
+0000012880 00000 n
+0000013229 00000 n
0000000000 00000 f
-0000013801 00000 n
-0000013886 00000 n
-0000013984 00000 n
-0000014092 00000 n
-0000014200 00000 n
-0000014289 00000 n
-0000014379 00000 n
-0000014489 00000 n
-0000014601 00000 n
-0000014691 00000 n
-0000014801 00000 n
+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
0000000020 00000 n
-0000012678 00000 n
-0000012543 00000 n
-0000011483 00000 n
-0000022996 00000 n
-0000019762 00000 n
-0000023344 00000 n
-0000012824 00000 n
-0000012938 00000 n
-0000013172 00000 n
-0000015014 00000 n
-0000018493 00000 n
-0000015263 00000 n
-0000015338 00000 n
-0000018729 00000 n
-0000019916 00000 n
-0000020116 00000 n
-0000021884 00000 n
-0000020253 00000 n
-0000020329 00000 n
-0000022118 00000 n
-0000023147 00000 n
-0000023406 00000 n
-0000023524 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
trailer
-<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <B5110F0AAF2E81EBF9F9713BBB5D01A2> <B5110F0AAF2E81EBF9F9713BBB5D01A2> ] >>
+<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <80C0A77C79EE32C1370ED68B014C304B> <80C0A77C79EE32C1370ED68B014C304B> ] >>
startxref
-23735
+23767
%%EOF
diff --git a/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf b/macros/latex/contrib/tagpdf/ex-tagpdf-template.pdf
index 49a61608f7..eff5cf7637 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
%ÌÕÁÔÅØÐÄÆ
27 0 obj
-<< /Type /Metadata /Subtype /XML /Length 11370 >>
+<< /Type /Metadata /Subtype /XML /Length 11390 >>
stream
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -210,17 +210,17 @@ stream
</dc:language>
<dc:date>
<rdf:Seq>
- <rdf:li>2023-11-19T13:45:45Z</rdf:li>
+ <rdf:li>2023-12-18T16:57:56+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>2023-11-19T13:45:45Z</xmp:CreateDate>
- <xmp:ModifyDate>2023-11-19T13:45:45Z</xmp:ModifyDate>
- <xmp:MetadataDate>2023-11-19T13:45:45Z</xmp:MetadataDate>
+ <xmp:CreateDate>2023-12-18T16:57:56+01:00</xmp:CreateDate>
+ <xmp:ModifyDate>2023-12-18T16:57:56+01:00</xmp:ModifyDate>
+ <xmp:MetadataDate>2023-12-18T16:57:56+01:00</xmp:MetadataDate>
<xmpMM:DocumentID>uuid:f320abfc-f6ab-4d12-8719-d176f4d947cf</xmpMM:DocumentID>
- <xmpMM:InstanceID>uuid:554307d8-161f-4125-8cf2-e74ed08aeef3</xmpMM:InstanceID>
+ <xmpMM:InstanceID>uuid:045226fb-45fe-4620-820d-0c52be3f32d6</xmpMM:InstanceID>
<prism:complianceProfile>three</prism:complianceProfile>
<prism:pageCount>1</prism:pageCount>
</rdf:Description>
@@ -309,7 +309,7 @@ endobj
<< /Type /Namespace /NS (https://www.latex-project.org/ns/inline/2022) /RoleMapNS 19 0 R >>
endobj
20 0 obj
-<< /Type /Namespace /NS (data:,28278A81-B193-36BC-AB45-5B2A3A37DCBF) >>
+<< /Type /Namespace /NS (data:,7C21117D-8985-8D15-E095-29CE1B6DCBC2) >>
endobj
7 0 obj
[ 8 0 R 10 0 R 12 0 R 14 0 R 16 0 R 18 0 R 20 0 R ]
@@ -401,56 +401,56 @@ endobj
<< /Type /Catalog /Pages 32 0 R /MarkInfo 33 0 R/Lang (en-US)/Metadata 27 0 R/StructTreeRoot 5 0 R >>
endobj
43 0 obj
-<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231119134545Z)/ModDate (D:20231119134545Z) /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
+<< /Producer (luahbtex-1.17.0)/Creator (LaTeX)/CreationDate (D:20231218165756+01'00')/ModDate (D:20231218165756+01'00') /Trapped /False /PTEX.FullBanner (This is LuaHBTeX, Version 1.17.0 (TeX Live 2023)) >>
endobj
xref
0 44
0000000002 65535 f
-0000011912 00000 n
+0000011932 00000 n
0000000003 00000 f
0000000004 00000 f
0000000009 00000 f
-0000014525 00000 n
-0000011995 00000 n
-0000013953 00000 n
-0000012268 00000 n
+0000014545 00000 n
+0000012015 00000 n
+0000013973 00000 n
+0000012288 00000 n
0000000011 00000 f
-0000012336 00000 n
+0000012356 00000 n
0000000013 00000 f
-0000012406 00000 n
+0000012426 00000 n
0000000021 00000 f
-0000013169 00000 n
-0000012487 00000 n
-0000013447 00000 n
-0000013276 00000 n
-0000013755 00000 n
-0000013554 00000 n
-0000013864 00000 n
+0000013189 00000 n
+0000012507 00000 n
+0000013467 00000 n
+0000013296 00000 n
+0000013775 00000 n
+0000013574 00000 n
+0000013884 00000 n
0000000000 00000 f
-0000014021 00000 n
-0000014118 00000 n
-0000014205 00000 n
-0000014292 00000 n
-0000014391 00000 n
+0000014041 00000 n
+0000014138 00000 n
+0000014225 00000 n
+0000014312 00000 n
+0000014411 00000 n
0000000020 00000 n
-0000011849 00000 n
-0000011714 00000 n
-0000011480 00000 n
-0000017131 00000 n
-0000017485 00000 n
-0000011959 00000 n
-0000012036 00000 n
-0000012168 00000 n
-0000012205 00000 n
-0000014647 00000 n
-0000016088 00000 n
-0000014734 00000 n
-0000016309 00000 n
-0000017285 00000 n
-0000017547 00000 n
-0000017665 00000 n
+0000011869 00000 n
+0000011734 00000 n
+0000011500 00000 n
+0000017151 00000 n
+0000017505 00000 n
+0000011979 00000 n
+0000012056 00000 n
+0000012188 00000 n
+0000012225 00000 n
+0000014667 00000 n
+0000016108 00000 n
+0000014754 00000 n
+0000016329 00000 n
+0000017305 00000 n
+0000017567 00000 n
+0000017685 00000 n
trailer
-<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <AF44F9C7C6A6589FC30798F138DF5EB8> <AF44F9C7C6A6589FC30798F138DF5EB8> ] >>
+<< /Size 44 /Root 42 0 R /Info 43 0 R /ID [ <B9D89BA811B99E1C236CEFC67C3CB974> <B9D89BA811B99E1C236CEFC67C3CB974> ] >>
startxref
-17876
+17908
%%EOF
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index d02333ad24..a257c70058 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-11-19} {0.98q}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-12-18} {0.98r}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98q", --TAGVERSION
- date = "2023-11-19", --TAGDATE
+ version = "0.98r", --TAGVERSION
+ date = "2023-12-18", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index 9b4de607d4..80d865405d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -313,7 +313,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -1030,7 +1030,7 @@
% \begin{macrocode}
\msg_new:nnn { tag / debug } {struct-begin}
{
- Struct~\tag_get:n{struct_num}~begin~#1~with~options:~\tl_to_str:n{#2}~[\msg_line_context:]
+ Struct~\tag_get:n{struct_num}~begin~#1~with~options:~\tl_to_str:n{#2}~\\[\msg_line_context:]
}
\msg_new:nnn { tag / debug } {struct-end}
{
@@ -1088,7 +1088,27 @@
}
}
}
-
+% \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.
+% \begin{macrocode}
+\msg_new:nnn { tag / debug } {tag-stop}
+ {
+ \int_if_zero:nTF
+ {#1}
+ {Tagging~stopped}
+ {Tagging~(not)~stopped~(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}
+ {
+ \int_if_zero:nTF
+ {#1}
+ {Tagging~restarted}
+ {Tagging~(not)~restarted}\\
+ level:~\int_eval:n{#1+1}~==>~#1\tl_if_empty:nF{#2}{,~label:~#2}~[\msg_line_context:]
+ }
% \end{macrocode}
% \begin{macrocode}
%</debug>
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index 04c8e495d1..f222571021 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 700a538812..b483b96974 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.tex
@@ -1,8 +1,8 @@
\iffalse meta-comment
-% File: tagpdf.dtx
+% File: tagpdf-code.tex
- Copyright (C) 2019-2020 Ulrike Fischer
+ Copyright (C) 2019-2023 Ulrike Fischer
It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -18,7 +18,7 @@
The development version of the bundle can be found at
- https://github.com/u-fischer/tagpdf
+ https://github.com/latex3/tagpdf
for those people who are interested.
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
index 6803d0c280..350b5d645f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -60,7 +60,7 @@
% It lists the new tag, the rolemap and the namespace of the rolemap.
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-12-18} {0.98r}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -92,7 +92,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-12-18} {0.98r}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -108,7 +108,7 @@ subparagraph, H6,pdf2,
% loaded.
% \begin{macrocode}
%<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-12-18} {0.98r}
%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
chapter, Span, pdf2,
section, Span, pdf2,
@@ -122,7 +122,7 @@ P, Span, pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-12-18} {0.98r}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -190,7 +190,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-12-18} {0.98r}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
Document,Document,pdf2,D,
Part,Part,pdf2,G,
@@ -246,7 +246,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-12-18} {0.98r}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -481,7 +481,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-12-18} {0.98r}
,,,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,∅,∅
@@ -536,7 +536,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} {2023-11-19} {0.98q}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-12-18} {0.98r}
,,,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-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index ff030a6c6e..510cd0efe5 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-12-18} {0.98r}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-12-18} {0.98r}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index c3454bb45d..c387249c4c 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{implementation}
% The code is splitted into three parts: code shared by all engines,
@@ -86,11 +86,11 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-12-18} {0.98r}
{tagpdf - mc code only for the luamode }
%</luamode>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-lua} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-debug-lua} {2023-12-18} {0.98r}
{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 169b9f900c..7732ee2eea 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -181,7 +181,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-12-18} {0.98r}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
@@ -364,12 +364,14 @@
{
\tag_mc_end_push:
\tag_mc_begin:n {artifact=#1}
- \tag_stop_group_begin:
+ \group_begin:
+ \tag_stop:n{artifact-group}
}
\cs_set_protected:Npn \tag_mc_artifact_group_end:
{
- \tag_stop_group_end:
+ \tag_start: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 bd97e8d7d4..38d6840b8d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index f4bfab5418..8421ceba69 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-space-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index 9f839f8bc0..4808cccece 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -175,7 +175,7 @@
% (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}
+% AFinline (struct-key),AFinline-o (struct-key),texsource,mathml}
% \begin{syntax}
% AF = \meta{object name}\\
% AFref = \meta{object reference}\\
@@ -194,7 +194,12 @@
% 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|.
+% 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
+% 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
% \cs{pdf_object_new:n} or with the l3pdffile module. |AF| expands its argument
@@ -264,7 +269,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -1225,25 +1230,28 @@
\cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2
% #1 content, #2 extension
{
- \group_begin:
- \int_gincr:N \g_@@_struct_AFobj_int
- \pdffile_embed_stream:neN
- {#1}
- {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
- \l_@@_tmpa_tl
- \@@_struct_add_AF:ee
- { \int_use:N \c@g_@@_struct_abs_int }
- { \l_@@_tmpa_tl }
- \@@_struct_prop_gput:nne
- { \int_use:N \c@g_@@_struct_abs_int }
- { AF }
- {
- [
- \tl_use:c
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
- ]
- }
- \group_end:
+ \tl_if_empty:nF{#1}
+ {
+ \group_begin:
+ \int_gincr:N \g_@@_struct_AFobj_int
+ \pdffile_embed_stream:neN
+ {#1}
+ {tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
+ \l_@@_tmpa_tl
+ \@@_struct_add_AF:ee
+ { \int_use:N \c@g_@@_struct_abs_int }
+ { \l_@@_tmpa_tl }
+ \@@_struct_prop_gput:nne
+ { \int_use:N \c@g_@@_struct_abs_int }
+ { AF }
+ {
+ [
+ \tl_use:c
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
+ ]
+ }
+ \group_end:
+ }
}
\cs_generate_variant:Nn \@@_struct_add_inline_AF:nn {on}
@@ -1293,16 +1301,19 @@
},
AFref .code:n = % AF property
{
- \@@_struct_add_AF:ee { \int_use:N \c@g_@@_struct_abs_int }{#1}
- \@@_struct_prop_gput:nne
- { \int_use:N \c@g_@@_struct_abs_int }
- { AF }
- {
- [
- \tl_use:c
- { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
- ]
- }
+ \tl_if_empty:eF {#1}
+ {
+ \@@_struct_add_AF:ee { \int_use:N \c@g_@@_struct_abs_int }{#1}
+ \@@_struct_prop_gput:nne
+ { \int_use:N \c@g_@@_struct_abs_int }
+ { AF }
+ {
+ [
+ \tl_use:c
+ { g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
+ ]
+ }
+ }
},
,AFinline .code:n =
{
@@ -1315,6 +1326,7 @@
,texsource .code:n =
{
\group_begin:
+ \pdfdict_put:nnn { l_pdffile/Filespec } {Desc}{(TeX~source)}
\pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Source }
\@@_struct_add_inline_AF:on {#1}{tex}
\group_end:
@@ -1322,6 +1334,7 @@
,mathml .code:n =
{
\group_begin:
+ \pdfdict_put:nnn { l_pdffile/Filespec } {Desc}{(mathml~representation)}
\pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Supplement }
\@@_struct_add_inline_AF:on {#1}{xml}
\group_end:
@@ -1602,7 +1615,7 @@
\cs_set_protected:Npn \tag_struct_end:n #1
{
-%<debug>\@@_debug_struct_end_check:n{#1}
+%<debug> \@@_check_if_active_struct:T{\@@_debug_struct_end_check:n{#1}}
\tag_struct_end:
}
%</package|debug>
@@ -1850,7 +1863,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index 37fc53b644..df1f50fdd4 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-12-18} {0.98r}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index 704a2f769d..5f1a72a3e8 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -18,7 +18,7 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%<*driver>
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98q, released 2023-11-19}
+% \date{Version 0.98r, released 2023-12-18}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -159,7 +159,7 @@
% \end{function}
%
% \section{Extension commands}
-% The following commands and code parts are not core command of tagpdf.
+% The following commands and code parts are not core commands of tagpdf.
% They either provide work-arounds for missing functionality elsewhere,
% or do a first step to apply tagpdf commands to document commands.
%
@@ -250,7 +250,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-user} {2023-12-18} {0.98r}
{tagpdf - user commands}
%</header>
% \end{macrocode}
@@ -346,7 +346,91 @@
% \end{macrocode}
% \end{macro}
%
+% \section{Socket support}
+% The next \LaTeX{} 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.,
+% \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.
+%
+% 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}.
+%
+% The L3 programming layer versions \cs{tag_socket_use:n} and
+% \cs{tag_socket_use:nn} are slightly more efficient than
+% \cs{UseTaggingSocket} because they do not have to determine how
+% many arguments the socket takes when disabling it.
+%
+% Until we can be sure that the kernel defines the commands we provide them before
+% redefining them:
+% \begin{macrocode}
+%<*base>
+\providecommand\tag_socket_use:n[1]{}
+\providecommand\tag_socket_use:nn[2]{}
+\providecommand\UseTaggingSocket[1]{}
+%</base>
+% \end{macrocode}
%
+% \begin{macro}{\tag_socket_use:n,\tag_socket_use:nn,\UseTaggingSocket}
+% \begin{macrocode}
+%<*package>
+\cs_set_protected:Npn \tag_socket_use:n #1
+ {
+ \bool_if:NT \l_@@_active_socket_bool
+ { \UseSocket {tagsupport/#1} }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_protected:Npn \tag_socket_use:nn #1#2
+ {
+ \bool_if:NT \l_@@_active_socket_bool
+ { \UseSocket {tagsupport/#1} {#2} }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_set_protected:Npn \UseTaggingSocket #1
+ {
+ \bool_if:NTF \l_@@_active_socket_bool
+ { \UseSocket{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
+% \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
+ }
+ }
+%</package>
+% \end{macrocode}
+% \end{macro}
%
% \section{Debugging}
% \begin{macro}{\ShowTagging}
@@ -550,22 +634,17 @@
% \end{macro}
%
% \section{Commands to extend document commands}
-% The following commands and code parts are not core command of tagpdf.
+% The following commands and code parts are not core commands of tagpdf.
% They either provide work-arounds for missing functionality elsewhere,
% or do a first step to apply tagpdf commands to document commands.
% This part should be regularly revisited to check if the code should go to a
% better place or can be improved.
%
-% \subsection{new ref system}
-% Until l3ref is in the kernel, we provide a definition for \cs{newlabeldata} in
-% the aux-file to avoid errors if a document switches between tagging and non-tagging.
% \begin{macrocode}
-%<base>\AddToHook{begindocument}
-%<base> {\immediate\write\@mainaux{\string\providecommand\string\newlabeldata[2]{}}}
%<*package>
% \end{macrocode}
% \subsection{Document structure}
-% \begin{macro}{\g_@@_root_default_tl,activate (setup-key)}
+% \begin{macro}{\g_@@_root_default_tl,activate (setup-key),activate-socket (setup-key)}
% \begin{macrocode}
\tl_new:N\g_@@_root_default_tl
\tl_gset:Nn\g_@@_root_default_tl {Document}
@@ -574,11 +653,12 @@
\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf}{\tagstructend}
\keys_define:nn { @@ / setup}
- {
+ {
+ activate-socket .bool_set:N = \l_@@_active_socket_bool,
activate .code:n =
{
\keys_set:nn { @@ / setup }
- { activate-mc,activate-tree,activate-struct }
+ { activate-mc,activate-tree,activate-struct,activate-socket }
\tl_gset:Nn\g_@@_root_default_tl {#1}
},
activate .default:n = Document
@@ -586,24 +666,22 @@
% \end{macrocode}
% \end{macro}
+%
% \subsection{Structure destinations}
-% In TeXlive 2022 pdftex and luatex will offer support for structure destinations.
-% The pdfmanagement has already backend support. We activate them if the
-% prerequisites are there: structures should be activated,
-% the code in the pdfmanagement must be there.
+% Since TeXlive 2022 pdftex and luatex offer support for structure destinations
+% and the pdfmanagement has backend support for. We activate them if
+% structures are actually created.
% Structure destinations are actually PDF 2.0 only but they don't harm in
% older PDF and can improve html export.
% \begin{macrocode}
\AddToHook{begindocument/before}
{
- \bool_lazy_all:nT
- {
- { \g_@@_active_struct_dest_bool }
- { \g_@@_active_struct_bool }
- { \cs_if_exist_p:N \pdf_activate_structure_destination: }
- }
+ \bool_lazy_and:nnT
+ { \g_@@_active_struct_dest_bool }
+ { \g_@@_active_struct_bool }
{
- \tl_set:Nn \l_pdf_current_structure_destination_tl { _@@/struct/\g_@@_struct_stack_current_tl }
+ \tl_set:Nn \l_pdf_current_structure_destination_tl
+ { _@@/struct/\g_@@_struct_stack_current_tl }
\pdf_activate_structure_destination:
}
}
@@ -643,11 +721,10 @@
% \l_@@_para_main_tag_tl}
% At first some variables.
% \begin{macrocode}
-\bool_new:N \l_@@_para_bool
%</package>
%<base>\bool_new:N \l_@@_para_flattened_bool
+%<base>\bool_new:N \l_@@_para_bool
%<*package>
-\bool_new:N \l_@@_para_show_bool
\int_new:N \g_@@_para_begin_int
\int_new:N \g_@@_para_end_int
\int_new:N \g_@@_para_main_begin_int
@@ -721,7 +798,7 @@
% \end{macrocode}
% \end{macro}
%
-% TEMPORARLY FIX (2023-11-17). Until latex-lab is update we must adapt a sec command:
+% TEMPORARLY FIX (2023-11-17). Until latex-lab is updated we must adapt a sec command:
% \begin{macrocode}
\AddToHook{package/latex-lab-testphase-sec/after}
{
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index 907f466a43..37de4d9927 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -18,27 +18,19 @@
%
% The development version of the bundle can be found at
%
-% https://github.com/u-fischer/tagpdf
+% https://github.com/latex3/tagpdf
%
% for those people who are interested.
%
% \fi
% \begin{documentation}
-% \begin{function}{\ref_value:nnn}
-% This is a temporary definition which will be removed once properties have been
-% released. It allows to locally set a default value if the label or the attribute
-% doesn't exist.
-% \begin{syntax}
-% \cs{ref_value:nnn}\Arg{label}\Arg{attribute}\Arg{fallback default}
-% \end{syntax}
-% \end{function}
-%
-% \begin{function}{ \tag_stop_group_begin:, \tag_stop_group_end:,
+% \begin{function}{
% \tag_stop:, \tag_start:,
% \tagstop, \tagstart }
% We need commands to stop tagging in some places.
-% They simply switches the two local booleans. The grouping commands
-% can be used to group the effect.
+% 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.
% \end{function}
%
% \begin{function}{\tag_stop:n, \tag_start:n }%
@@ -46,9 +38,8 @@
% \cs{tag_stop:n}\Arg{label}
% \cs{tag_start:n}\Arg{label}\\
% \end{syntax}
-% This commands are intended as a pair. The start command
-% will only restart tagging if the previous stop command
-% with the same label actually stopped tagging.
+% The commands with argument allow to give a label. This is only used
+% in debugging messages to allow to follow the nesting.
% \end{function}
%
% \begin{function}{activate-space (setup-key)}
@@ -93,7 +84,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf} {2023-12-18} {0.98r}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -119,7 +110,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-debug} {2023-12-18} {0.98r}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -142,7 +133,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdf-base} {2023-12-18} {0.98r}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
@@ -281,7 +272,7 @@
% }
% These booleans should help to control the global behaviour of tagpdf.
% Ideally it should more or less do nothing if all are false.
-% The space-boolean controles the interword space code,
+% The space-boolean controls the interword space code,
% the mc-boolean activates \cs{tag_mc_begin:n},
% the tree-boolean activates writing the finish code and the pdfmanagement related
% commands, the struct-boolean activates the storing of the structure data.
@@ -306,7 +297,8 @@
% \begin{variable}
% {
% \l_@@_active_mc_bool,
-% \l_@@_active_struct_bool
+% \l_@@_active_struct_bool,
+% \l_@@_active_socket_bool
% }
% These booleans should help to control the \emph{local} behaviour of tagpdf.
% In some cases it could e.g. be necessary to stop tagging completely.
@@ -317,6 +309,7 @@
\bool_set_true:N \l_@@_active_mc_bool
\bool_new:N \l_@@_active_struct_bool
\bool_set_true:N \l_@@_active_struct_bool
+\bool_new:N \l_@@_active_socket_bool
% \end{macrocode}
% \end{variable}
%
@@ -378,7 +371,7 @@
\cs_generate_variant:Nn \@@_property_record:nn {en,eV}
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\@@_property_ref_lastpage:nn}
% A command to retrieve the lastpage label, this will be adapted when there
% is a proper, kernel lastpage label.
@@ -456,68 +449,83 @@
\cs_generate_variant:Nn \@@_seq_new:N { c }
\cs_generate_variant:Nn \@@_seq_show:N { c }
\cs_generate_variant:Nn \@@_prop_show:N { c }
+%</package>
% \end{macrocode}
% \end{macro}
%
% \section{General tagging commands}
%
-% \begin{macro}{\tag_stop_group_begin:,
-% \tag_stop_group_end:,
+% \begin{macro}{
% \tag_stop:,\tag_start:,
% \tag_stop:n,\tag_start:n}
% We need commands to stop tagging in some places.
-% This simply switches the two local booleans.
-% In some cases tagging should only restart, if
-% it actually was stopped before. For this it is possible
-% to label a stop.
+% They switch local booleans and also stop the counting of paragraphs.
+% The commands keep track of the nesting with a local
+% 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.
+%
+% \begin{variable}{\l_@@_tag_stop_int}
+% When stop/start pairs are nested we do not want the inner
+% start command to restart tagging. To control this we use a
+% local int: The stop command will increase it. The starting
+% will decrease it and only restart tagging, if it is zero.
+% This will replace the label version.
+% \begin{macrocode}
+%<*package|debug>
+%<package>\int_new:N \l_@@_tag_stop_int
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macrocode}
-\cs_new_protected:Npn \tag_stop_group_begin:
- {
- \group_begin:
- \bool_set_false:N \l_@@_active_struct_bool
- \bool_set_false:N \l_@@_active_mc_bool
- \@@_stop_para_ints:
- }
-\cs_set_eq:NN \tag_stop_group_end: \group_end:
\cs_set_protected:Npn \tag_stop:
{
+%<debug> \msg_note:nnx {tag / debug }{tag-stop}{ \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
+ \bool_set_false:N \l_@@_active_socket_bool
\@@_stop_para_ints:
}
\cs_set_protected:Npn \tag_start:
{
- \bool_set_true:N \l_@@_active_struct_bool
- \bool_set_true:N \l_@@_active_mc_bool
- \@@_start_para_ints:
+ \int_if_zero:nF { \l_@@_tag_stop_int } { \int_decr:N \l_@@_tag_stop_int }
+ \int_if_zero:nT { \l_@@_tag_stop_int }
+ {
+ \bool_set_true:N \l_@@_active_struct_bool
+ \bool_set_true:N \l_@@_active_mc_bool
+ \bool_set_true:N \l_@@_active_socket_bool
+ \@@_start_para_ints:
+ }
+%<debug> \msg_note:nnx {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }
}
\cs_set_eq:NN\tagstop\tag_stop:
\cs_set_eq:NN\tagstart\tag_start:
-\prop_new:N\g_@@_state_prop
+% \end{macrocode}
+% \begin{macrocode}
\cs_set_protected:Npn \tag_stop:n #1
{
- \tag_if_active:TF
- {
- \bool_set_false:N \l_@@_active_struct_bool
- \bool_set_false:N \l_@@_active_mc_bool
- \@@_stop_para_ints:
- \prop_gput:Nnn \g_@@_state_prop { #1 }{ 1 }
- }
- {
- \prop_gremove:Nn \g_@@_state_prop { #1 }
- }
+%<debug> \msg_note:nnxx {tag / debug }{tag-stop}{ \int_use:N \l_@@_tag_stop_int }{#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
{
- \prop_gpop:NnN \g_@@_state_prop {#1}\l_@@_tmpa_tl
- \quark_if_no_value:NF \l_@@_tmpa_tl
+ \int_if_zero:nF { \l_@@_tag_stop_int } { \int_decr:N \l_@@_tag_stop_int }
+ \int_if_zero:nT { \l_@@_tag_stop_int }
{
\bool_set_true:N \l_@@_active_struct_bool
\bool_set_true:N \l_@@_active_mc_bool
+ \bool_set_true:N \l_@@_active_socket_bool
\@@_start_para_ints:
- }
+ }
+%<debug> \msg_note:nnxx {tag / debug }{tag-start}{ \int_use:N \l_@@_tag_stop_int }{#1}
}
-%</package>
+%</package|debug>
%<*base>
\cs_new_protected:Npn \tag_stop:{}
\cs_new_protected:Npn \tag_start:{}
@@ -541,7 +549,7 @@
% activate-tree (setup-key),
% activate-struct (setup-key),
% activate-all (setup-key),
-% no-struct-dest (setup-key)
+% no-struct-dest (setup-key),
% }
% Keys to (globally) activate tagging.
% |activate-space| activates the additional parsing needed for
diff --git a/macros/latex/contrib/tagpdf/tagpdf.ins b/macros/latex/contrib/tagpdf/tagpdf.ins
index 64c3b40a23..f0b7ac2284 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.ins
+++ b/macros/latex/contrib/tagpdf/tagpdf.ins
@@ -20,7 +20,7 @@ The released version of this bundle is available from CTAN.
The development version of the bundle can be found at
- https://github.com/u-fischer/tagpdf
+ https://github.com/latex3/tagpdf
for those people who are interested.
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index 960f814e6b..9d6e7130e9 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 8f46499e71..d39cd227fc 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -11,16 +11,17 @@
{
% comment the following line to compile an untagged documentation:
testphase=phase-III,
- pdfversion=2.0,lang=en-UK,pdfstandard=a-4,
+ pdfversion=2.0,lang=en-UK,pdfstandard=a-4,pdfstandard=ua-2
%uncompress
}
\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer@package@version{0.98q}
-\def\UlrikeFischer@package@date{2023-11-19}
+\def\UlrikeFischer@package@version{0.98r}
+\def\UlrikeFischer@package@date{2023-12-18}
\makeatother
\documentclass[bibliography=totoc,a4paper]{article}
+
\usepackage{geometry}
\usepackage[english]{babel}
@@ -34,13 +35,9 @@
\addbibresource{tagpdf.bib}
\usepackage[noparboxrestore]{marginnote}
-\makeatletter
-\renewcommand*{\mn@parboxrestore}{\tagpdfparaOff}%
-\makeatother
\reversemarginpar
\usepackage{tcolorbox}
-%think later ...
\usepackage{tikz}
\usetikzlibrary{positioning}
@@ -61,11 +58,7 @@
\makeatletter \def\lst@visiblespace{\lst@ttfamily{\char32}{\char32}}\makeatother
-\tagpdfsetup{
- tabsorder=structure,
- %log=v
- %show-spaces
- }
+\tagpdfsetup{tabsorder=structure}
\usepackage[pdfdisplaydoctitle=true]{hyperref}
@@ -75,16 +68,12 @@
colorlinks}
\tcbuselibrary{documentation}
-%less space between docCommand
-\tcbset{nosep/.style={doc raster command={raster after skip=-10pt}}}
\definecolor{Definition}{rgb}{0,0.2,0.6}
\newcommand\PrintKeyName[1]{\textsf{#1}}
\newcommand\pkg[1]{\texttt{#1}}
\newcommand\DescribeKey[1]{\texttt{#1}}
-%\newcommand\cs[1]{\texttt{\textbackslash #1}}
-%\usepackage{ydoc-desc} %hm hyperref ist ein Problem ...
-
+%tagging patches:
\usepackage{tagpdfdocu-patches}
\newcommand\PDF{PDF}
@@ -98,40 +87,29 @@
\begin{document}
-\tagstructbegin{tag=Title}
-\begin{center}%
-\let\thanks\footnote
-\makeatletter
-\huge \@title \par
-\vskip .5em
-\@author \par
-\vskip 1em%
-\@date \par
-\end{center}%
-\tagstructend
-
-
-
-
+\maketitle
\tagstructbegin{tag=Div}
\begin{tcolorbox}[colframe=red,before upper=\tagpdfparaOn]
-This package is not meant for normal use in a document. It is on one mainly a tool to \emph{research}
-tagging. On the other side it is the base of the code developed in the \texttt{latex-lab} bundle for the
-Tagged PDF project \url{https://www.latex-project.org/publications/indexbytopic/pdf/}.
+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
+in the \pkg{latex-lab} bundle for the Tagged PDF project (i.e., loaded by that code)
+\url{https://www.latex-project.org/publications/indexbytopic/pdf/}.
-The package develops together with the code in the \texttt{latex-lab} bundle, in the
-\LaTeX{} format, in the \texttt{pdfmanagement-testphase} package (the \LaTeX{} PDF management bundle)
-and the L3 programming layer.
-That means you should ensure that all these components are up-to-date and in sync which each
-other.
+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).
+That means you must ensure that all these components are up-to-date and in
+sync which each other.
-This package quite probably contains bugs. It is in parts
-quite slow as the code currently prefers readability over speed.
-At some time it will disappear when the code has been integrated into the \LaTeX{} format.
+This package quite probably still contains some bugs. It is in some parts quite slow because
+the code currently prefers readability over speed. At some point in the future its code will
+be integrated into the \LaTeX{} format and then this package will disappear.
-This package can still change in an incompatible way.
+Because of its function as a research and development tool it is
+important to understand that this package can still change in
+incompatible ways from one version to the next.
You need some knowledge about \TeX, \PDF{} and perhaps even lua to use it.
@@ -140,9 +118,8 @@ You need some knowledge about \TeX, \PDF{} and perhaps even lua to use it.
Issues, comments, suggestions can be added as issues to these two github tracker:
\medskip
-\centering
-\url{https://github.com/latex3/tagging-project}\par
-\url{https://github.com/u-fischer/tagpdf}
+\centering \url{https://github.com/latex3/tagging-project}\par
+\leavevmode\llap{or\qquad\qquad} \url{https://github.com/latex3/tagpdf}
\end{tcolorbox}
\tagstructend
@@ -157,88 +134,130 @@ Issues, comments, suggestions can be added as issues to these two github tracker
\section{Introduction}
-Since many years the creation of accessible, tagged \PDF{}-files with \LaTeX\ which conform to the PDF/UA standard has been on the agenda of \TeX-meetings. Many people agree that this is important and Ross Moore has done quite some work on it. There is also a TUG-mailing list and a web page \parencite{tugaccess} dedicated to this theme.
-
-In my opinion missing were means to \emph{experiment} with tagging and accessibility. Means to try out, how difficult it is to tag some structures, means to try out, how much tagging is really needed (standards and validators don't need to be right \ldots), means to test what else is needed so that a \PDF{} works e.g. with a screen reader, means to try out how core \LaTeX\ commands behave if tagging is used. Without such experiments it is in my opinion
-quite difficult to get a feeling about what has to be done, which kernel changes are needed, how packages should be adapted.
-
-This package was developed to close this gap by offering \emph{core} commands to tag a \PDF{}%
-\footnote{In case you don't know what this means: there will be some explanations later on.}.
-My hope was that the knowledge gained by the use of this package will at the end
-allow to decide if and how code to do tagging should be part of the \LaTeX\ kernel.
-
-
-The code has been written so that it can be added as module to the \LaTeX{} kernel itself if it turns out to be usable.
-It therefore avoid to patch commands from other packages and is also not an aim of the package to develop such patches. While at the end changes to various commands in many classes and packages will be needed to get tagged \PDF{} files
-these changes should be done by the class, package and document writers themselves using a sensible API provided by the kernel and not by some external package that adds patches everywhere and would need constant maintenance -- one only need to look at packages like tex4ht or bidi or hyperref to see how difficult and sometimes fragile this is.
-
-The package is now a part of the Tagged PDF project and triggered already various changes in the LaTeX kernel and the engines: There is a new PDF management,
-the new para hooks allows to automatically tag paragraphs, after changes in the output routine
-page breaks and header and footer are handled correctly, the engines support
-now structure destinations. More changes are in the latex-lab bundle and can be loaded through testphase keys.
-
-I'm sure that tagpdf still has bugs. Bugs reports, suggestions and comments can be added to the issue tracker on github. \url{https://github.com/u-fischer/tagpdf}.
+For many years the creation of accessible, tagged \PDF{}-files with \LaTeX\
+that conform to the PDF/UA standard has been on the agenda of \TeX-meetings.
+Many people agree that this is important and Ross Moore has done quite some
+work on it. There is also a TUG-mailing list and a web page
+\parencite{tugaccess} dedicated to this topic.
+
+In my opinion missing were means to \emph{experiment} with tagging and
+accessibility. Means to try out, how difficult it is to tag some structures,
+means to try out, how much tagging is really needed (standards and validators
+don't need to be right \ldots), means to test what else is needed so that a
+\PDF{} works e.g. with a screen reader, means to try out how core \LaTeX\
+commands behave if tagging is used. Without such experiments it is in my
+opinion quite difficult to get a feeling about what has to be done, which
+kernel changes are needed, and how packages should be adapted.
+
+This package was developed to close this gap by offering \emph{core} commands
+to tag a \PDF{}\footnote{In case you don't know what this means: there will
+be some explanations later on.}. My hope was that the knowledge gained by the
+use of this package would in the end allow to decide if and how code to do
+tagging should become part of the \LaTeX\ kernel.
+
+
+The code has been written so that it can be added as module to the \LaTeX{}
+kernel itself if it turns out to be usable. It therefore avoid to patch
+commands from other packages. It was also not an aim of the package to
+develop patches to directly enable tagging in other packages. While in the end changes to various commands in many
+classes and packages will be needed to automatically get tagged \PDF{} files, these changes
+should be done by class, package and document writers themselves using a
+sensible API provided by the kernel and not by some external package that
+adds patches everywhere and would need constant maintenance --- one only need
+to look at packages like \pkg{tex4ht} or \pkg{bidi} or \pkg{hyperref} to see how difficult and
+sometimes fragile this is.
+
+The package is now a part of the Tagged PDF project and triggered already
+various changes in the \LaTeX\ kernel and the engines: There is a new PDF
+management, the new para hooks allows to automatically tag paragraphs, after
+changes in the output routine page breaks and header and footer are handled
+correctly, the engines now support structure destinations. More changes are
+in the latex-lab bundle and can be loaded through \texttt{testphase} keys.
+
+I'm sure that tagpdf still has bugs. Bugs reports, suggestions and comments
+can be added to the issue tracker on github either
+\url{https://github.com/latex3/tagpdf} or
+\url{https://github.com/latex3/tagging-project}.
Please also check the github site and latex-lab for new examples and improvements.
\subsection{Tagging and accessibility}
-While the package is named \texttt{tagpdf} the goal is also \emph{accessible} \PDF{}-files. Tagging is \emph{one} (the most difficult) requirement for accessibility but there are others. I will mention some later on in this documentation, and -- if sensible -- I will also try to add code, keys or tips for them.
+While the package is named \pkg{tagpdf} the goal is also \emph{accessible}
+\PDF{}-files. Tagging is \emph{one} (the most difficult) requirement for
+accessibility but there are others. I will mention some later on in this
+documentation, and -- if sensible -- I will also try to add code, keys or
+tips for them.
-So the name of the package is a bit wrong. As excuse I can only say that it is shorter and easier to pronounce.
+So the name of the package is a bit wrong. As excuse I can only say that it
+is short and easy to pronounce (and of course, it was always meant to be temporary).
\subsection{Engines and modes}
-The package works theoretically with all engines,
-but the xelatex and the latex-dvips-route are basically untested tested and they also don't support
-real space glyphs so I don't recommend them.
-lualatex is the most powerful and safe modus and should be used for new documents, it is slower than pdflatex but requires less compilations to get tagging. pdflatex works ok and can be used for legacy documents; it needs more compilations to resolve all cross references needed for the tagging.
+ Theoretically, the package works with all engines, but the xelatex and the
+latex-dvips-route are basically untested and they also don't support real
+space glyphs so I don't recommend them. lualatex is the most powerful and
+safe modus and should be used for new documents, it is slower than pdflatex
+but requires less compilations. pdflatex works ok and can be used for legacy
+documents; it needs more compilations to resolve all cross references needed
+for the tagging.
The package has two modes: the \emph{generic mode} which should work in
theory with every engine and the \emph{lua mode} which works only with
lualatex and (since version 0.98k) with dvilualatex.
-I implemented the generic mode first. Mostly because my \TeX\ skills are much better than my lua skills and I wanted to get the \TeX\ side right before starting to fight with attributes and node traversing.
+I implemented the generic mode first. Mostly because my \TeX\ skills are much
+better than my lua skills and I wanted to get the \TeX\ side right before
+starting to fight with attributes and node traversing.
-While the generic mode is not bad and I spent quite some time to get it working I nevertheless think that the lua mode is the future and the only one that will be usable for larger documents. \PDF{} is a page orientated format and so the ability of luatex to manipulate pages and nodes after the \TeX-processing is really useful here. Also with luatex characters are normally already given as unicode.
+While the generic mode is not bad and I spent quite some time to get it
+working I nevertheless think that the lua mode is the future and the only one
+that will be usable for larger documents. \PDF{} is a page orientated format
+and so the ability of luatex to manipulate pages and nodes after the
+\TeX-processing has finished is really useful here. Also with luatex characters are
+normally already given as Unicode.
-The package uses quite a lot labels (in generic mode more than with luamode). At the begin it relied on the \pkg{zref} package, but switched now to a new experimental implementation for labels. The drawback of the new method is that they don't give yet good rerun messages if they have changed. I advise to use the \pkg{rerunfilecheck} package as a intermediate work-around and when using pdflatex compile
-at best at least once or twice more often then normal.
+The package uses quite a lot labels (in generic mode more than with luamode).
+It is now based on the property module of the \LaTeX{} kernel. This module
+provides expandable references but the drawback is that (right now) they don't always give
+good rerun messages if they have changed. I advise to use the
+\pkg{rerunfilecheck} package as a intermediate work-around and when using
+pdflatex compile at least once or twice more often then normal.
\subsection{References and target PDF version}
My main reference for the first versions of this package was the free
-reference for \PDF{} 1.7. \parencite{pdfreference} and so the first versions
-of the package implemented only \PDF{} 1.7.
+reference for \PDF{} 1.7. \parencite{pdfreference} and so they implemented
+only support for \PDF{} 1.7.
-In 2018 \PDF{} 2.0. has been released. The reference can be bought at no cost
-through the PDF association.
+In 2018 \PDF{} 2.0. has been released. The reference can now be bought at no
+cost through the PDF association.
\PDF{} 2.0 has a number of features that are really needed for good tagging:
it knows more structure types, it allows to add associated files to
-structures---these are small, embedded files which can for example contain
-the mathML or source code of an equation---, it knows structure destinations
+structures---these are small, embedded files that can, for example, contain
+the mathML or source code of an equation---, it knows structure destinations,
which allows to link to a structure.
-
-\PDF{}~2.0 features are currently (mid 2023) not well supported by
+\PDF{}~2.0 features are currently (end of 2023) not well supported by
\PDF~consumer. No PDF viewer (including Acrobat) for example can handle name
-spaces and associated files. PAC~3 even crashes if one tries to load a \PDF{}
-2.0 file, and pdftk will create a \PDF{}~1.0 from it.
+spaces and associated files. The PDF Accessibility Checker (PAC) even crashes
+if one tries to load a \PDF{} 2.0 file, and pdftk will create a \PDF{}~1.0
+from it.
Nevertheless \LaTeX{} targets \PDF{} 2.0, tagpdf has added support for
-associated files, for name spaces and other \PDF{} 2.0 features tagpdf and we
-recommend to use \PDF{} 2.0 if possible and then to complain to the PDF{}
-consumer if something doesn't work.
+associated files, for name spaces and other \PDF{} 2.0 features. We recommend
+to use \PDF{} 2.0 if possible and then to complain to the PDF{} consumer if
+something doesn't work.
The package doesn't try to suppress all 2.0 features if an older \PDF{}
version is produced. It normally doesn't harm if a \PDF{} contains keys
unknown in its version and it makes the code faster and easier to maintain if
-there aren't too many tests and code pathes; so for example associated files
+there aren't too many tests and code paths; so for example associated files
will always be added. But tests could be added in case this leads to
-incompabilities.
+incompatibilities.
\subsection{Validation}
@@ -253,22 +272,23 @@ incompabilities.
e.g. if a chunk is opened on one page but closed
on the next page or if the document isn't compiled often enough.
-\item One must check how good the requirements of the PDF/UA standard are
- followed \emph{formally}\footnote{The PDF/UA-2 standard for \PDF~2.0
- will hopefully be released in 2023}.
+\item One must check how good the PDF follows requirements of standards
+ like PDF/UA \emph{formally}\footnote{The PDF/UA-2 standard for \PDF~2.0
+ will hopefully be released begin of 2024.}.
\item
One must check how good the accessibility is \emph{practically}.
\end{itemize}
-Syntax validation and formal standard validation can be done with preflight
-of the (non-free) adobe acrobat. It can also be done also with the free
-\PDF{} Accessibility Checker (PAC~2021) \parencite{pac3}. There is also the
-validator veraPDF \parencite{verapdf}. A rather new and quite useful tool is
-\enquote{Next Generation PDF} \parencite{ngpdf}, a browser application which
-converts a tagged PDF to html, allows to inspect its structure and also to
-edit the structure.
+Syntax validation and formal standard validation can be done for example with
+preflight of the (non-free) Adobe Acrobat. It can also be done also with the
+free \PDF{} Accessibility Checker (PAC~2021) \parencite{pac3}. There is also
+the validator veraPDF \parencite{verapdf}. A rather new and quite useful tool
+is \enquote{Next Generation PDF} \parencite{ngpdf}, a browser application
+which converts a tagged PDF to html, allows to inspect its structure and also
+to edit the structure. For PDF~2.0 files there is also a checker based on the
+Arlington model from veraPDF.
Practical validation is naturally the more complicated part.
It needs screen reader, users which actually knows how to handle them,
@@ -283,18 +303,15 @@ don't like the list structure \texttt{L}.
It is also possible that validators contradict: that the one says everything is okay,
while the other complains.
-
-
\subsection{Examples wanted!}
-
-To make the package usable examples are needed:
-examples that demonstrate how various structures can be tagged and which patches are needed,
-examples for the test suite, examples that demonstrates problems.
+To make the package usable examples are needed: examples that demonstrate how
+various structures can be tagged and which patches are needed, examples for
+the test suite, examples that demonstrates problems.
\begin{tcolorbox}
-Feedback, contribuations and corrections are welcome!
+Feedback, contributions and corrections are welcome!
\end{tcolorbox}
@@ -303,248 +320,6 @@ so that uncompressed \PDF{} are created and the internal objects and
structures can be inspected and be compared by the l3build checks.%
-\section{Changes}
-
-This section lists only important changes. More can be found in the \texttt{CHANGELOG.MD} and by checking the git commits.
-
-\subsection{Changes in 0.3}
-
-
-In this version I improved the handling of alternative and actual text. See section~\ref{sec:alt}. This change meant that the package relies on the module \texttt{l3str-convert}.
-
-I no longer try to (pdf-)escape the tag names: it is a bit unclear how to do it at best with luatex. This will perhaps later change again.
-
-
-\subsection{Changes in 0.5}
-
-
-I added code to handle attributes and attribute classes, see section~\ref{sec:attributes} and corrected a small number of code errors.
-
-I added code to add \enquote{real} space glyphs to the \PDF{}, see section \ref{sec:spacechars}.
-
-
-
-\subsection{Changes in 0.6}
-
-
-\textbf{Breaking change!} The attributes used in luamode to mark the MC-chunks are no longer set globally. I thought that global attributes would make it easier to tag, but it only leads to problem when e.g. header and footer are inserted. So from this version on the attributes are set locally and the effect of a \verb+\tagmcbegin+ ends with the current group. This means that in some cases more \verb+\tagmcbegin+ are needed and this affected some of the examples, e.g. the patching commands for sections with KOMA. On the other side it means that quite often one can omit the \verb+\tagmcend+ command.
-
-
-\subsection{Changes in version 0.61}
-
-\begin{itemize}
-\item internal code adaptions to expl3 changes.
-\item dropped the compresslevel key -- probably not needed.
-\end{itemize}
-
-
-\subsection{Changes in version 0.8}
-
-\begin{itemize}
-\item As a first step to include the code proper in the \LaTeX\ kernel the module name has changed from \texttt{uftag} to \texttt{tag}. The commands starting with |\uftag| will stay valid for some time but then be deprecated.
-
-\item \textbf{Breaking change!} The argument of \texttt{newattribute} option should no longer add the dictionary bracket \verb+<<..>>+, they are added by the code.
-
-
-\item \textbf{Breaking change!} The package now requires the new PDF management as provided for now by the package \pkg{pdfmanagement-testphase}. \pkg{pdfmanagement-testphase},
-prepares the ground for better support for tagged PDF in \LaTeX{}.
-It is part of a larger project to automatically generate tagged PDF \url{https://www.latex-project.org/news/2020/11/30/tagged-pdf-FS-study/}
-
-\item Support to add associated files to structures has been added with new keys \texttt{AF}, \texttt{AFinline} and \texttt{AFinline-o}.
-
-\item \textbf{Breaking change!} The support for other 8-bit input encodings has been removed.
-utf8 is now the required encoding.
-
-\item The keys |lang|, |ref| and |E| have been added for structures.
-
-\item The new hooks of LaTeX are used to tagged many paragraphs automatically. The small red numbers around paragraphs in the documentation show them in action. The main problem here is not to tag a paragraph, but to avoid to tag too many: paragraphs pop up in many places.
-\end{itemize}
-
-\subsection{Changes in version 0.81}
-
-\begin{itemize}
-\item Hook code to tag links (URI and GoTo type) have been added. So normally they should simply work if tagging
-is activated.
-
-\item Commands and keys to allow automatic paragraph tagging have been added. See section~\ref{sec:paratagging}.
-As can be seen in this documentation the code works quite good already, but one should be aware that \enquote{paragraphs} can appear in many places and sometimes there are even more paragraph begin than ends.
-
-\item A key to test if local or global setting of the mc-attributes in luamode is more sensible, see \ref{sec:global-local} for more details.
-
-\item New commands to store and reset mc-tags.
-
-\item PDF 2.0 namespaces are now supported.
-\end{itemize}
-
-\subsection{Changes in version 0.82}
-
-A command |\tag_if_active:TF| to test if tagging is active has been added. This allow external packages to write conditional code.
-
-The commands |\tag_struct_parent_int:| and |\tag_struct_insert_annot:nn| have been added. They allow to
-add annotations to the structure.
-
-
-\subsection{Changes in version 0.83}
-
-|\tag_finish_structure:| has been removed, it is no longer a public command.
-
-\subsection{Changes in version 0.90}
-
-\begin{itemize}
-\item Code has been cleaned up and better documented.
-
-\item \textbf{More engines supported} The generic mode of \pkg{tagpdf} now works
-(theoretically, it is not much tested) with all engines supported
-by the \PDF\ management.
-So compilations with Xe\LaTeX{} or with dvips should work. But it should be noted that
-these engines and backends don't support the |interspaceword| option. With Xe\LaTeX{} it is perhaps possible
-implement something with |\XeTeXinterchartoks|, but for the dvips route I don't see an option (apart from lots
-of manual macros everywhere).
-\item \textbf{MC-attributes are global again} In\sidenote{Breaking change!} version 0.6 the attributes used in
-luamode to mark the MC-chunks were no longer set globally. This avoided a number of problems with header and footer
-and background material, but further tests showed that it makes it difficult to correctly mark things like
-links which have to interrupt the current marking code---the attributes couldn't easily escape groups added by
-users. See section~\ref{sec:global-local} for more details.
-\item \textbf{key global-mc removed:} Due to the changes in the attribute keys this key is not longer needed.
-\item \textbf{key check-tags removed:} It doesn't fit. Checks are handled over the logging level.
-\item |\tagpdfget| has been removed, use the expl3 version if needed.
-\item The show commands |\showtagpdfmcdata|, |\showtagpdfattributes|, |\showtagstack| have been removed and replaced
-by a more flexible command |\ShowTagging|.
-\item The commands |\tagmcbegin| and |\tagmcend| no longer ignore following spaces or remove earlier one. While this
-is nice in some places, it also ate spaces in places where this wasn't expected. From now on both commands behave exactly
-like the expl3 versions.
-\item The lua-code to add real space glyphs has been separated from the tagging code. This means that |interwordspace| now
-works also if tagging is not active.
-\item The key |activate| has been added, it open the first structure, see below.
-\end{itemize}
-
-\subsection{Changes in version 0.92}
-
-\begin{itemize}
-\item support for page breaks in pdftex has been added, see section~\ref{sec:splitpara},
-
-
-\item header and footer are tagged as artifacts automatically, see section~\ref{sec:header-footer}.
-
-\item keys \texttt{alttext-o} and \texttt{actualtext-o} has been removed. \texttt{alttext} and \texttt{actualtext}
-will now expand once.
-
-\end{itemize}
-
-
-
-
-\subsection{Changes in version 0.93}
-
-\begin{itemize}
-\item Support for associated files in the root element (key \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 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 the pdf management code. This will simplify the documents
-as it will no longer be needed to load the package.
-
-\item The package has now support for \enquote{structure destinations}.
-This is a new type of destinations in \PDF~2.0.
-For pdftex and luatex this requires new binaries. They will be included
-in texlive 2022, miktex already has the new pdftex, the new luatex will probably follow soon.
-
-\item The commands \cs{tagpdfifluatexT}, \cs{tagpdfifluatexTF} has been removed \cs{tagpdfifpdftexT},
-
-\end{itemize}
-
-\subsection{Changes in version 0.94}
-
-In this version a small package, \pkg{tagpdf-base} has been added. It provides
-no-op versions of the main expl3 user commands for packages that want to support
-tagging but can't be sure if the \pkg{tagpdf} package has been loaded.
-
-\subsection{Changes in version 0.95}
-
-Small bug fixes.
-
-\subsection{Changes in version 0.96}
-
-\begin{itemize}
-\item The \texttt{alttext} key has been renamed to \texttt{alt}, the other key name exists as alias.
-
-\item The new command |\tag_struct_object_ref:n| allows to
- create the object reference of a structure.
-
-\item a new key \texttt{parent} has been added
- to allow structures to choose their parent structure.
-
-\item a new option \texttt{paratag} allows to change the tag name used for the
- automatically tagged paragraphs.
-
-\item the commands |\tag_start:|, |\tag_stop:|, |\tag_stop:n| and |\tag_start:n| allow
- to stop and start tagging (for example in trial typesetting).
-
-\item Small bug fixes.
-\end{itemize}
-
-\subsection{Changes in version 0.98}
-
-\begin{itemize}
-\item The declarations of tag namespaces have been externalized and are now
-read from files when \pkg{tagpdf} is loaded.
-
-\item The \PDF{} format (and some of the standards) declare various parent-child rules for
-structure tags. A first step to implement this rules and check if they are fullfilled have
-been done. More information can be found in section~\ref{sec:parent-child}.
-
-\item As a side effect of the new rule checking, the requirements for new tags
- have been tightened: Adding a new tag with add-new-tag now requires that the target role is
- defined. Unknown roles error.
-
-\item |\tagmcbegin| no longer requires that a tag is set, instead if will pick up
-the tag name from the surrounding structure.
-
-\item Structure destination are now created also with \PDF \textless\,2.0. They shouldn't harm and
-can improve the html export.
-
-\end{itemize}
-
-\subsection{Changes in version 0.98a}
-Small bug fixes in code and documentation.
-
-\subsection{Changes in version 0.98b}
-The main change is from now on every structure has an ID and an IDtree is
-added. The ID of a structure can be retrieved with |\tag_get:n|
-see~\ref{sec:retrieve}.
-
-
-\subsection{Changes in version 0.98e}
-
-\begin{itemize}
-\item The main change is that the automatic paratagging uses now a two-level structure. This accompanies development
-in the LaTeX github inthe \texttt{latex-lab} package regarding the tagging of blocks like lists or verbatim.
-See~\ref{sec:paratagging} and also \texttt{latex-lab-block-tagging.dtx} for more background.
-
-\item The command |tag_struct_end:n| has been add to improve debugging.
-\end{itemize}
-
-\subsection{Changes in version 0.98k}
-
-The luamode has been adapted and now allows also the compilation with
-dvilualatex. By default it will insert specials for \texttt{dvips} into the
-dvi. But be aware that \texttt{dvips} can normally not be used as it can't
-handle open type fonts, and extended version would be needed which isn't in
-texlive yet. It is also possible to use \texttt{dvipdfmx} as backend (which
-already has support for open type fonts), for this you need to use
-\texttt{backend=dvipdfmx} in the \cs{DocumentMetadata} command. Real space
-chars will work, but are currently not taken from the current font. This will
-be improved in the next luaotfload version. The compilation with dvilualatex
-is not much tested yet.
-
-\subsection{Changes in version 0.98l}
-
-In 2023 the primitives to write literal code into the pdf have been extended in all engines
-and now allow to delay the expansion of their argument to the shipout. This made it possible to greatly simplify and speed up the code used in generic mode to number the MC-chunks. In most 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{Proof of concept: the tagging of the documentation itself}
@@ -554,25 +329,30 @@ complain, but PAC~3 wanted alternative text for all links (no idea why) and
so I put everywhere simple text like \enquote{link} and \enquote{ref}. The
links to footnotes gave warnings, so I disabled them. I used types from the
\PDF{} version 1.7, mostly as I had no idea what should be used for code in
-2.0. Margin notes were simply wrong \ldots
+2.0. Margin notes were simply wrong and there were tagging commands
+everywhere \ldots
The tagging has been improved and automated over time in sync with
-improvements and new features in the LaTeX kernel and the \PDF\ management
-code and is now much better. Sadly the output of the validators don't quite
-reflect the improvements. The documentation uses now \PDF~2.0 and PAC~3
-can't handle this, it claims that the file is damaged. 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}).
-
+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~3 can't handle
+this, it claims that the file is damaged. 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 mentioned above passing a formal test doesn't mean that the content is really good and usable. I have a lot doubts that the code parts are really readable. The bibliography and the references must be improved. 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.
+But even if the documentation passed 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]
-Be aware that to create the tagged version a current lualatex-dev and a current version of the pdfmanagment-testphase package is needed.
+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}
@@ -590,9 +370,9 @@ about the \texttt{Lbl} use}\label{fig:adobe}\par
The package requires the new PDF management. With a current \LaTeX{} (2022-06-01 or newer)
the PDF management is loaded if you use the \cs{DocumentMetadata} command before \cs{documentclass}.
-The \texttt{tagpdf} package can then be loaded and activated by using the \texttt{testphase} key. The exact behaviour of
+The \pkg{tagpdf} package can then be loaded and activated by using the \texttt{testphase} key. The exact behavior of
the \texttt{testphase} key is documented in \texttt{documentmetadata-support-doc.pdf} which
-is part of the \texttt{latex-lab} bundle.
+is part of the \pkg{latex-lab} bundle.
Various parts of the code differentiate between \PDF{} version 2.0 and lower versions. If
\PDF{} 2.0 is wanted it is required to set the version early in the \cs{DocumentMetadata}
@@ -618,7 +398,7 @@ When loading \pkg{tagpdf} through the \texttt{testphase} keys, it is automatical
To deactivate it while still retaining all the other new code from the latex-lab testphase files,
use in the preamble |\tagpdfsetup{activate-all=false}|. You can additionally also deactivate the
paratagging and the interword space code.
-To suppress the loading of the package alltogether you can try
+To suppress the loading of the package altogether you can try
\begin{taglstlisting}
\makeatletter
@@ -630,19 +410,25 @@ To suppress the loading of the package alltogether you can try
\minisec{Loading as package needs activation!}
-It is not recommended anymore, but the package can also be loaded normally with |\usepackage|
-(but it is
-still required to use \cs{DocumentMetadata} to load the \PDF\ management) but
-it will then -- apart from loading more packages and defining a lot of things -- not do much. You will have to \emph{activate} it with \verb+\tagpdfsetup+.
+It is not recommended anymore, but the package can also be loaded
+normally with |\usepackage| (but it is still required to
+use \cs{DocumentMetadata} to load the \PDF\ management) but it will
+then -- apart from loading more packages and defining a lot of things
+-- not do much. You will have to \emph{activate} it
+with \verb+\tagpdfsetup+.
-The \PDF\ management loaded with \cs{DocumentMetadata} will in any case load \texttt{tagpdf-base} a
-small package that provides no-op versions of the main tagging commands.
+The \PDF\ management loaded with \cs{DocumentMetadata} will in any
+case load \pkg{tagpdf-base} a small package that provides no-op
+versions of the main tagging commands.
-Most commands do nothing if tagging is not activated, but in case a test is needed a command (with the usual p,T,F variants) is provided:
+Most commands do nothing if tagging is not activated, but in case a
+test is needed a command (with the usual p,T,F variants) is provided:
\begin{docCommand}{tag_if_active:TF}{}\end{docCommand}
-The check is true only if \emph{everything} is activated. In all other cases (including if tagging has been stopped locally) it will be false.
+The check is true only if \emph{everything} is activated. In all other
+cases (including if tagging has been stopped locally) it will be
+false.
\subsection{Modes and package options}
@@ -650,11 +436,16 @@ The check is true only if \emph{everything} is activated. In all other cases (in
%TODO think about tagging of the keys. Aside? Header?
-The package has two different modes: The \textbf{generic mode} works (in theory, currently only fully tested with pdflatex) probably with all engines, the \textbf{lua mode} only with lualatex. The differences between both modes will be described later. The mode can be set with package options:
+The package has two different modes: The \textbf{generic mode} works
+(in theory, currently only fully tested with pdflatex) probably with
+all engines, the \textbf{lua mode} only with lualatex. The differences
+between both modes will be described later. The mode can be set with
+package options:
\DescribeKey{luamode}
-This is the default mode. It will use the generic mode if the document is processed with pdflatex and the lua mode with lualatex.
+This is the default mode. It will use the generic mode if the document
+is processed with pdflatex and the lua mode with lualatex.
\DescribeKey{genericmode}
@@ -666,77 +457,140 @@ This will force the generic mode for all engines.
\begin{docCommand}{tagpdfsetup}{\marg{key-val-list}}\end{docCommand}
-This command setups the general behaviour of the package.
+This command setups the general behavior of the package.
The command should be normally used only in the preamble
(for a few keys it could also make sense to change them in the document).
The key-val list understands the following keys:
\begin{description}
-\item[\PrintKeyName{activate-all}]
- Boolean, initially false. Activates everything, that's normally the sensible thing to do.
-\item [\PrintKeyName{activate}] Like |activate-all|, \emph{additionally} is opens at begin document
-a structure with |\tagstructbegin| and closes it at end document. The key accepts as value a tag name which is used as the tag of the structure.
-The default value is |Document|.
-\item[\PrintKeyName{activate-mc}]
- Boolean, initially false. Activates the code related to marked content.
-\item[\PrintKeyName{activate-struct}]
- Boolean, initially false. Activates the code related to structures. Should be used only if \PrintKeyName{activate-mc} has been used too.
-\item[\PrintKeyName{no-struct-dest}]
- Starting with version 0.93 \pkg{tagpdf} will create automatically structure destinations (see section~\ref{sec:struct-dest} if \pkg{hyperref} is used, if
- the engine supports it and if the pdf version is 2.0. With this key this can be suppressed.
-\item[\PrintKeyName{activate-tree}]
-Boolean, initially false. Activates the code related to trees. Should be used only if the two other keys has been used too.
-\item[\PrintKeyName{add-new-tag}]
- Allows to define new tag names, see section \ref{sec:new-tag} for a description.
-\item[\PrintKeyName{interwordspace}]
- Choice key, possible values are \PrintKeyName{true}/""\PrintKeyName{on} and \PrintKeyName{false}/\PrintKeyName{off}. The key activates/deactivates the insertion of space glyphs, see section~\ref{sec:spacechars}. In the luamode it only works if at least \PrintKeyName{activate-mc} has been used.
-
-\item[\PrintKeyName{log}]
- Choice key, possible values \PrintKeyName{none}, \PrintKeyName{v}, \PrintKeyName{vv}, \PrintKeyName{vvv}, \PrintKeyName{all}. Setups the log level. Changing the value affects currently mostly the luamode: \enquote{higher} values gives more messages in the log. The current levels and messages have been setup in a quite ad-hoc manner and will need improvement.
-\item[\PrintKeyName{newattribute}]
- This key takes two arguments and declares an attribute. See \ref{sec:attributes}.
-\item[\PrintKeyName{show-spaces}]
-
-Boolean.\sidenote{luamode}
-That's a debug option, it helps in lua mode to see where space glyph will be inserted if \PrintKeyName{interwordspace} is activated.
-
-\item[\PrintKeyName{paratagging}] Boolean. This activate/deactivates the automatic tagging of paragraphs, see
- \ref{sec:paratagging} for more background.
- It uses the \texttt{para/begin} and \texttt{para/end} hooks of the newest \LaTeX{} version (2021-05-01).
- With more tagging support conditions will be added, that means the code is bound to change! Paragraphs can appear in many unexpected places and the code can easily break, so there is also an option to see where such paragraphs are:
-
-\item[\PrintKeyName{paratagging-show}] Boolean. This activate/deactivates small red and green numbers in the places where the paratagging hook code is used.
-
-\item[\PrintKeyName{paratag}] String. This key changes the second tag used by the paratagging code. The default tag is \texttt{text}, a \LaTeX{} specific tag that is role mapped to \texttt{P}. A useful local setting here can be \texttt{NonStruct}, which creates a structure \enquote{without meaning}. For local changes it is recommended
- to use the newer \cs{tagtool} command described below instead of \cs{tagpdfsetup}.
-
-\item[\PrintKeyName{tabsorder}]
- Choice key, possible values are \PrintKeyName{row}, \PrintKeyName{column}, \PrintKeyName{structure}, \PrintKeyName{none}. This decides if a \verb+/Tabs+ value is written to the dictionary of the page objects. Not really needed for tagging itself, but one of the things you probably need for accessibility checks. So I added it. Currently the tabsorder is the same for all pages. Perhaps this should be changed \ldots.
-\item[\PrintKeyName{tagunmarked}]
- Boolean,\sidenote{luamode} initially true. When this boolean is true, the lua code will try to mark everything that has not been marked yet as an artifact. The benefit is that one doesn't have to mark up every deco rule oneself. The danger is that it perhaps marks things that shouldn't be marked -- it hasn't been tested yet with complicated documents containing annotations etc. See also section~\ref{sec:lazy} for a discussion about automatic tagging.
-\item[\PrintKeyName{uncompress}]
- Sets both the \PDF{} compresslevel and the \PDF{} objcompresslevel to 0 and so allows to inspect the \PDF{}.
+\item[\PrintKeyName{activate-all}] Boolean, initially false. Activates
+ everything, that's normally the sensible thing to do.
+
+\item [\PrintKeyName{activate}] Like |activate-all|,
+ \emph{additionally} is opens at begin document a structure with
+ |\tagstructbegin| and closes it at end document. The key accepts as
+ value a tag name which is used as the tag of the structure. The
+ default value is |Document|.
+
+\item[\PrintKeyName{activate-mc}] Boolean, initially false. Activates
+ the code related to marked content.
+
+\item[\PrintKeyName{activate-struct}] Boolean, initially
+ false. Activates the code related to structures. Should be used only
+ if \PrintKeyName{activate-mc} has been used too.
+
+\item[\PrintKeyName{no-struct-dest}] Starting with version 0.93
+ \pkg{tagpdf} will create automatically structure destinations (see
+ section~\ref{sec:struct-dest} if \pkg{hyperref} is used, if the
+ engine supports it and if the pdf version is 2.0. With this key this
+ can be suppressed.
+
+\item[\PrintKeyName{activate-tree}] Boolean, initially
+ false. Activates the code related to trees. Should be used only if
+ the two other keys has been used too.
+
+\item[\PrintKeyName{add-new-tag}] Allows to define new tag names, see
+ section \ref{sec:new-tag} for a description.
+
+\item[\PrintKeyName{interwordspace}] Choice key, possible values are
+ \PrintKeyName{true}/""\PrintKeyName{on} and
+ \PrintKeyName{false}/\PrintKeyName{off}. The key
+ activates/deactivates the insertion of space glyphs, see
+ section~\ref{sec:spacechars}. In the luamode it only works if at
+ least \PrintKeyName{activate-mc} has been used.
+
+\item[\PrintKeyName{log}] Choice key, possible values
+ \PrintKeyName{none}, \PrintKeyName{v}, \PrintKeyName{vv},
+ \PrintKeyName{vvv}, \PrintKeyName{all}. Setups the log level.
+ Changing the value affects currently mostly the luamode:
+ \enquote{higher} values gives more messages in the log. The current
+ levels and messages have been setup in a quite ad-hoc manner and
+ will need improvement.
+
+\item[\PrintKeyName{newattribute}] This key takes two arguments and
+ declares an attribute. See \ref{sec:attributes}.
+
+\item[\PrintKeyName{show-spaces}] Boolean.\sidenote{luamode} That's a
+ debug option, it helps in lua mode to see where space glyph will be
+ inserted if \PrintKeyName{interwordspace} is activated.
+
+\item[\PrintKeyName{paratagging}] Boolean. This activate/deactivates
+ the automatic tagging of paragraphs, see \ref{sec:paratagging} for
+ more background. It uses the \texttt{para/begin} and
+ \texttt{para/end} hooks of the newest \LaTeX{} version (2021-05-01).
+ With more tagging support conditions will be added, that means the
+ code is bound to change! Paragraphs can appear in many unexpected
+ places and the code can easily break, so there is also an option to
+ see where such paragraphs are:
+
+\item[\PrintKeyName{paratagging-show}] Boolean. This
+ activate/deactivates small red and green numbers in the places where
+ the paratagging hook code is used.
+
+\item[\PrintKeyName{paratag}] String. This key changes the second tag
+ used by the paratagging code. The default tag is \texttt{text}, a
+ \LaTeX{} specific tag that is role mapped to \texttt{P}. A useful
+ local setting here can be \texttt{NonStruct}, which creates a
+ structure \enquote{without meaning}. For local changes it is
+ recommended to use the newer \cs{tagtool} command described below
+ instead of \cs{tagpdfsetup}.
+
+\item[\PrintKeyName{tabsorder}] Choice key, possible values are
+ \PrintKeyName{row}, \PrintKeyName{column}, \PrintKeyName{structure},
+ \PrintKeyName{none}. This decides if a \verb+/Tabs+ value is
+ written to the dictionary of the page objects. Not really needed for
+ tagging itself, but one of the things you probably need for
+ accessibility checks. So I added it. Currently the tabsorder is the
+ same for all pages. Perhaps this should be changed \ldots.
+
+\item[\PrintKeyName{tagunmarked}] Boolean,\sidenote{luamode} initially
+ true. When this boolean is true, the lua code will try to mark
+ everything that has not been marked yet as an artifact. The benefit
+ is that one doesn't have to mark up every deco rule oneself. The
+ danger is that it perhaps marks things that shouldn't be marked --
+ it hasn't been tested yet with complicated documents containing
+ annotations etc. See also section~\ref{sec:lazy} for a discussion
+ about automatic tagging.
+
+\item[\PrintKeyName{uncompress}] Sets both the \PDF{} compresslevel
+ and the \PDF{} objcompresslevel to 0 and so allows to inspect the
+ \PDF{}.
\end{description}
-\begin{docCommand}[nosep]{tagtool}{\marg{key-val}}\end{docCommand}
-\begin{docCommand}{tag_tool:n}{\marg{key-val}}\end{docCommand}
+\begin{docCommands}
+ {
+ {doc name=tagtool,doc parameter=\marg{key-val}},
+ {doc name=tag_tool:n,doc parameter=\marg{key-val}}
+ }
+\end{docCommands}
-The tagging of document elements require a variety of small commands. This command
-will unify them under a common interface. This is work-in-progress and syntax and implementation
-can change! While the argument looks like a key-val \emph{list} (and currently is actually one),
-this should not be relied on. Instead only
-one argument should be used as the implementation will change to improve the speed. Currently the following
-arguments are supported
+The tagging of document elements requires a variety of small
+commands. This command will unify them under a common interface. This
+is work-in-progress and syntax and implementation can change! While
+the argument looks like a key-val \emph{list} (and currently is
+actually one), this should not be relied on. Instead only one argument
+should be used as the implementation will change to improve the
+speed. Currently the following arguments are supported
\begin{description}
-\item[\PrintKeyName{para}] Boolean. It will replace the \cs{tagpdfparaOn} and \cs{tagpdfparaOff} command.
-\item[\PrintKeyName{unittag}] String. It allows to change the outer tag used in the following automatically tagged paragraphs. The setting is local.
-\item[\PrintKeyName{paratag}] String. It allows to change the inner tag used in the following automatically tagged paragraphs. The setting is local.
-\item[\PrintKeyName{para-flattened}] Boolean. If set it will suppress the outer structure in the automatic paratagging.
-This should be applied to the start and end hook in the same way! The setting is local.
+\item[\PrintKeyName{para}] Boolean. It will replace the
+ \cs{tagpdfparaOn} and \cs{tagpdfparaOff} command.
+
+\item[\PrintKeyName{unittag}] String. It allows to change the outer
+ tag used in the following automatically tagged paragraphs. The
+ setting is local.
+
+\item[\PrintKeyName{paratag}] String. It allows to change the inner
+ tag used in the following automatically tagged paragraphs. The
+ setting is local.
+
+\item[\PrintKeyName{para-flattened}] Boolean. If set it will suppress
+ the outer structure in the automatic paratagging. This should be
+ applied to the start and end hook in the same way! The setting is
+ local.
\end{description}
@@ -745,7 +599,10 @@ This should be applied to the start and end hook in the same way! The setting is
\section{Tagging}
-pdf is a page orientated graphic format. It simply puts ink and glyphs at various coordinates on a page. A simple stream of a page can look like this\footnote{The appendix contains some remarks about the syntax of a \PDF{} file}:
+PDF is a page orientated graphic format. It simply puts ink and glyphs
+at various coordinates on a page. A simple stream of a page can look
+like this\footnote{The appendix contains some remarks about the syntax
+of a \PDF{} file}:
\begin{taglstlisting}[columns=fixed]
stream
@@ -812,8 +669,8 @@ To tag a \PDF{} three tasks must be carried out:
\item \textbf{The tree management}:\sidenote{tree-task} At last the
structure must be written into the \PDF{}. For every structure an
object of type \texttt{StructElem} must be created and flushed with
- keys for the parents and the kids. A parenttree must be created to get
- a reference from the mc-chunks to the parent structure. A rolemap must
+ keys for the parents and the kids. A parent tree must be created to get
+ a reference from the mc-chunks to the parent structure. A role map must
be written. And a number of dictionary entries. All this is hopefully
done automatically and correctly by the package \ldots.
@@ -1026,7 +883,7 @@ This sounds easy. But there are quite a number of traps, mostly with pdfLaTeX:
again a number of compilations until it really settles down again.
Internal references are especially problematic here, as the first
compilation typically creates a non-link |??|, and only the second
- inserts the structure and the new mc. When the reference system in LaTeX
+ inserts the structure and the new mc. When the reference system in \LaTeX\
will be extended, care will be taken to ensure that already the dummy
text builds a chunk. Until then the advice is to first compile the
document and resolve all cross-reference and to activate tagging only at
@@ -1035,7 +892,7 @@ This sounds easy. But there are quite a number of traps, mostly with pdfLaTeX:
\item There exist environments which process their content more than once
-- examples are \texttt{align} and \texttt{tabularx}.
- So one has to check for doublettes and holes in the counting system.
+ So one has to check for doublets and holes in the counting system.
\item \PDF{} is a page oriented format. And this means that the start and
@@ -1049,15 +906,16 @@ This sounds easy. But there are quite a number of traps, mostly with pdfLaTeX:
While in generic mode the commands insert the literals directly and so have
all the problems described above the lua mode works quite differently: The
-tagging commands don't insert literals but set some \emph{attributes} which
-are attached to all the following nodes. When the page is shipped out some
-lua code is called which wanders through the shipout box and injects the
-literals at the places where the attributes changes.
+tagging commands don't insert literals but set some (global)
+\emph{attributes} which are attached to all the following nodes. When the
+page is shipped out some lua code is called which wanders through the shipout
+box and injects the literals at the places where the attributes changes.
-This means that quite a number of problems mentioned above are not relevant for the lua mode:
+This means that quite a number of problems mentioned above are not relevant
+for the lua mode:
\begin{enumerate}
-\item Pagebreaks between start and end of the marker are
+\item Page breaks between start and end of the marker are
\emph{not} a problem. So you can mark a complete paragraph. If a pagebreak
occur directly after an start marker or before an end marker this can lead to
empty chunks in the \PDF{} and so bloat up \PDF{} a bit, but this is imho not
@@ -1084,14 +942,21 @@ executed on the same page as the begin command. So think carefully how to
place them. For strategies how to handle paragraphs that split over pages see
subsection~\ref{sec:splitpara}.
-\begin{docCommand}[nosep]{tagmcbegin}{\marg{key-val-list}}\end{docCommand}
-\begin{docCommand}{tag_mc_begin:n}{\marg{key-val-list}}\end{docCommand}
+\begin{docCommands}
+ {
+ {doc name=tagmcbegin,doc parameter={\marg{key-val-list}}},
+ {doc name=tag_mc_begin:n,doc parameter={\marg{key-val-list}}}
+ }
+ \end{docCommands}
These commands insert the begin of the marked content code in the \PDF{}.
They don't start a paragraph. \emph{They don't start a group}. Such markers
should not be nested. The command will warn you if this happens.
+In the generic mode the commands insert literals. These are whatsits and so
+can affect spacing. In lua mode they set an attribute \emph{globally}.
+
The key-val list understands the following keys:
\begin{description}
@@ -1126,7 +991,7 @@ The key-val list understands the following keys:
quite clear if this is a serious problem.
The\sidenote{lua mode only} lua mode will mark up everything unmarked as
- \texttt{artifact=notype}. You can suppress this behaviour by setting the
+ \texttt{artifact=notype}. You can suppress this behavior by setting the
tagpdfsetup key \texttt{tagunmarked} to false. See section
\ref{ssec:setup}.
@@ -1168,7 +1033,7 @@ The key-val list understands the following keys:
which has been removed). If the value is empty, nothing will happen.
That means that you can do something like in the following listing and
- and it will insert \verb+X+ (hex encoded) in the \PDF{}.
+ it will insert \verb+X+ (hex encoded) in the \PDF{}.
\begin{taglstlisting}
@@ -1189,8 +1054,12 @@ The key-val list understands the following keys:
\end{description}
-\begin{docCommand}[nosep]{tagmcend}{}\end{docCommand}
-\begin{docCommand}{tag_mc:end}{}\end{docCommand}
+\begin{docCommands}
+ {
+ {doc name=tagmcend},
+ {doc name=tag_mc:end}
+ }
+\end{docCommands}
These commands insert the end code of the marked content. They don't end a
group and it doesn't matter if they are in another group as the starting
@@ -1200,8 +1069,12 @@ the command, as the effect of the begin command ends with a new
\verb+\tagmcbegin+ anyway.
-\begin{docCommand}[nosep]{tagmcuse}{}\end{docCommand}
-\begin{docCommand}{tag_mc_use:n}{}\end{docCommand}
+\begin{docCommands}
+ {
+ {doc name=tagmcuse},
+ {doc name=tag_mc_use:n}
+ }
+\end{docCommands}
These commands allow you to record a marked content that you stashed away
@@ -1209,8 +1082,11 @@ into the current structure. Be aware that a marked content can be used only
once -- the command will warn you if you try to use it a second time.
-\begin{docCommand}[nosep]{tag_mc_end_push:}{}\end{docCommand}
-\begin{docCommand}{tag_mc_begin_pop:n}{\marg{key-val-list}}\end{docCommand}
+\begin{docCommands}
+ {
+ {doc name=tag_mc_end_push:},
+ {doc name=tag_mc_begin_pop:n,doc parameter=\marg{key-val-list}}
+ }\end{docCommands}
If there is an open mc chunk,
the first command ends it and pushes its tag on a stack. If there is no
@@ -1221,8 +1097,11 @@ definitions so there is only an expl3 version. Perhaps other content of the mc-d
-\begin{docCommand}[nosep]{tagmcifinTF}{\marg{true code}\marg{false code}}\end{docCommand}
-\begin{docCommand}{tag_mc_if_in:TF}{\marg{true code}\marg{false code}}\end{docCommand}
+\begin{docCommands}
+ {
+ {doc name=tagmcifinTF,doc parameter=\marg{true code}\marg{false code}},
+ {doc name=tag_mc_if_in:TF,doc parameter=\marg{true code}\marg{false code}}
+ }\end{docCommands}
These commands check if a marked content is currently open and allows you to e.g. add the end marker if yes.
@@ -1235,10 +1114,12 @@ In \emph{lua mode} it tests if the mc-attribute is currently unset. You can't te
\begin{docCommand}{tag_mc_reset_box:N}{\marg{box}}\end{docCommand}
-In lua mode this command will process the given box and reset all mc related attributes in the box to the current values.
-This means that if the box is used all its contents will be a kid of the current structure.
-This should (probably) only be used on boxes which don't contain tagging commands.
-See below section~\ref{sec:savebox} for more details.
+In lua mode this command will process the given box and reset all mc
+related attributes in the box to the current values. This means that
+if the box is used all its contents will be a kid of the current
+structure. This should (probably) only be used on boxes which don't
+contain tagging commands. See below section~\ref{sec:savebox} for
+more details.
\subsubsection{Retrieving data} \label{sec:retrieve}
@@ -1246,25 +1127,51 @@ With more elaborate tagging the need arise to retrieve and store current data.
\begin{docCommand}{tag_get:n}{\marg{key word}}\end{docCommand}
-This (expandable) command give back some variables. Currently the working key words are
+This (expandable) command returns the values of some variables. Currently, the working key words are
\begin{itemize}
\item \verb+mc_tag+: the tag name of the current mc-chunk
\item \verb+struct_tag+: the tag name of the current structure
-\item \verb+struct_id+: The ID of the current structure. This is a string and is returned including parentheses.
-\item \verb+struct_num+: This returns a number and works also if only \pkg{tagpdf-base} has been loaded, but then doesn't give the same output: if \pkg{tagpdf} is loaded and tagging is active, \verb+struct_num+ gives the number of currently active structure, so it reverts to the parent number if a structure is closed. If only \pkg{tagpdf-base} is loaded nesting of structure is not tracked and so the command gives back the number of the last structure that has been created.
-\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 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.
-\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 absolute mc-counter and so number of the last mc-chunk that has been created. This can be used to detect if in a piece of code there are mc-commands.
+
+\item \verb+struct_id+: The ID of the current structure. This is a
+ string and is returned including parentheses.
+
+\item \verb+struct_num+: This returns a number and works also if only
+ \pkg{tagpdf-base} has been loaded, but then doesn't give the same
+ output: if \pkg{tagpdf} is loaded and tagging is active,
+ \verb+struct_num+ gives the number of currently active structure, so
+ it reverts to the parent number if a structure is closed. If only
+ \pkg{tagpdf-base} is loaded nesting of structure is not tracked and
+ so the command gives back the number of the last structure that has
+ been created.
+
+\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
+ 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.
+
+\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
+ absolute mc-counter and so number of the last mc-chunk that has been
+ created. This can be used to detect if in a piece of code there are
+ mc-commands.
\end{itemize}
\subsubsection{Luamode: global or not global -- that is the question}\label{sec:global-local}
-In\sidenote{Luamode mode only} luamode the mc-commands set and unset an attribute to mark the nodes. One can view such an attribute like a font change or a color: they affect all following chars and glue nodes until stopped.
+In\sidenote{Luamode mode only} luamode the mc-commands set and unset an
+attribute to mark the nodes. One can view such an attribute like a font
+change or a color: they affect all following chars and glue nodes until
+stopped.
-From version 0.6 to 0.82 the attributes were set locally.
-This had the advantage that the attributes didn't spill over in area where they are not wanted like the header and footer or the background pictures.
-But it had the disadvantage that it was difficult for an inner structure to correctly interrupt the outer
-mc-chunk if it can't control the group level. For example this didn't work due to the grouping inserted by the user:
+From version 0.6 to 0.82 the attributes were set locally. This had the
+advantage that the attributes didn't spill over in area where they are not
+wanted like the header and footer or the background pictures. But it had the
+disadvantage that it was difficult for an inner structure to correctly
+interrupt the outer mc-chunk if it can't control the group level. For example
+this didn't work due to the grouping inserted by the user:
\begin{taglstlisting}
\tagstructbegin{tag=P}
@@ -1321,11 +1228,20 @@ add the needed code.
\begin{itemize}
\item Mark commands inside floats should work fine (but need perhaps some compilation rounds in generic mode).
-\item In case you want to use it inside a \verb+\savebox+ (or some 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.
+\item In case you want to use it inside a \verb+\savebox+ (or some
+ 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.
\item Don't use a saved box with markers twice.
-\item If boxes are unboxed you will have to analyze the \PDF{} to check if everything is ok.
-\item If you use complicated structures and commands (breakable boxes like the one from tcolorbox, multicol, many footnotes) you will have to check the \PDF{}.
+
+\item If boxes are unboxed you will have to analyze the \PDF{} to
+ check if everything is ok.
+
+\item If you use complicated structures and commands (breakable boxes
+ like the one from \pkg{tcolorbox}, \pkg{multicol}, many footnotes)
+ you will have to check the \PDF{}.
\end{itemize}
@@ -1355,7 +1271,7 @@ they only contain information which are meant to visually guide the reader and s
the structure. This means that normally they should be tagged as artifacts. The PDF reference offers
here a rather large number of options here to describe different versions of \enquote{ignore this}.
Typically the header and footer should get the type \texttt{Pagination} and this types has a number of subtypes like
-Header, Footer, PageNum. It is not yet known if any technology actually make use of this info.
+Header, Footer, PageNum. It is not yet known if any technology actually makes use of this info.
But they can also contain meaningful content, for example an address. In such cases the content
should be added to the structure (where?) but even if this address is
@@ -1365,8 +1281,10 @@ providing support for header and footers.
For now tagpdf added some first support for automatically tagging:
Starting with version 0.92 header and footer are by default automatically marked up as (simple) artifacts.
-With the key \PrintKeyName{exclude-header-footer} the behaviour can be changed: The value \texttt{false} disables the
-automatic tagging, the value \texttt{pagination} add additionally an \texttt{/Artifact} structure with the attribute \texttt{/Pagination}.
+With the key \PrintKeyName{exclude-header-footer} the behavior can be
+changed: The value \texttt{false} disables the automatic tagging, the
+value \texttt{pagination} add additionally an \texttt{/Artifact}
+structure with the attribute \texttt{/Pagination}.
If some additional markup (or even a structure) is wanted, something like this should be used (here with
@@ -1385,38 +1303,59 @@ the syntax of the \pkg{fancyhdr} package) to close the open mc-chunk and restart
\subsubsection{Links and other annotations}\label{sec:link+annot}
-Annotations (like links or form field annotations) are objects associated with a geometric region of the page rather than with a particular object in its content stream. Any connection between a link or a form field and the text is based solely on visual appearance (the link text is in the same region, or there is empty space for the form field annotation) rather than on an explicitly specified association.
-
-To connect such a annotation with the structure and so with surrounding or underlying text a specific structure has to be added, see \ref{fig:linkannot}:
-The annotation is added to a structure element as an object reference. It is not referenced directly but through an intermediate object of type OBJR. To the dictionary of the annotation a \texttt{/StructParent} entry must be added, the value is a number which is then
-used in the ParentTree to define a relationship between the annotation and the parent structure element.
+Annotations (like links or form field annotations) are objects
+associated with a geometric region of the page rather than with a
+particular object in its content stream. Any connection between a link
+or a form field and the text is based solely on visual appearance (the
+link text is in the same region, or there is empty space for the form
+field annotation) rather than on an explicitly specified association.
+
+To connect such a annotation with the structure and so with
+surrounding or underlying text a specific structure has to be added,
+see \ref{fig:linkannot}: The annotation is added to a structure
+element as an object reference. It is not referenced directly but
+through an intermediate object of type OBJR. To the dictionary of the
+annotation a \texttt{/StructParent} entry must be added, the value is
+a number which is then used in the ParentTree to define a relationship
+between the annotation and the parent structure element.
To support this, \pkg{tagpdf} offers currently two commands
\begin{docCommand}{tag_struct_parent_int:}{}\end{docCommand}
-This insert the current value of a global counter used to track such objects. It can be used to add the \texttt{/StructParent} value to
-the annotation dictionary.
+This insert the current value of a global counter used to track such
+objects. It can be used to add the \texttt{/StructParent} value to the
+annotation dictionary.
\begin{docCommand}{tag_struct_insert_annot:nn}{\marg{object reference}\marg{struct parent number}}\end{docCommand}
-This will insert the annotation described by the object reference into the current structure by creating the OBJR object. It will
-also add the necessary entry to the parent tree and increase the global counter referred to by |\tag_struct_parent_int:|.
-It does nothing if (structure) tagging is not activated.
-
-Attention! As the second command increases the global counter at the end it changes the value given back by the first.
-That means that if nesting is involved care must be taken that the correct numbers is used. This should be easy to fulfil for most annotations, as there are boxes.
-There the second command should at best be used directly behind the annotation and it can make use of |\tag_struct_parent_int:|. For links nesting is theoretically possible, and it
-could be that future versions need more sophisticated handling here.
-
-In environments which process their content twice like tabularx or align it would be the
-best to exclude the second command from the trial step, but this will need better support from these environments.
+This will insert the annotation described by the object reference into
+the current structure by creating the OBJR object. It will also add
+the necessary entry to the parent tree and increase the global counter
+referred to by |\tag_struct_parent_int:|. It does nothing if
+(structure) tagging is not activated.
+
+Attention! As the second command increases the global counter at the
+end it changes the value given back by the first. That means that if
+nesting is involved care must be taken that the correct numbers is
+used. This should be easy to fulfill for most annotations, as there
+are boxes. There the second command should at best be used directly
+behind the annotation and it can make use of
+|\tag_struct_parent_int:|. For links nesting is theoretically
+possible, and it could be that future versions need more sophisticated
+handling here.
+
+In environments which process their content twice like tabularx or
+align it would be the best to exclude the second command from the
+trial step, but this will need better support from these environments.
Typically using this commands is not often needed: Since version 0.81
-\pkg{tagpdf} already handles (unnested) links, and form fields created with
-the \pkg{l3pdffield-testphase} package will be handle by this package.
+\pkg{tagpdf} already handles (unnested) links, and form fields created
+with the \pkg{l3pdffield-testphase} package will be handle by this
+package.
-The following listing shows low-level to create link where the two commands are used:
+The following listing shows low-level to create link where the two
+commands are used:
\begin{taglstlisting}
@@ -1445,8 +1384,10 @@ The following listing shows low-level to create link where the two commands are
-Math is a problem. I have seen an example where \emph{every single symbol} has been marked up with tags from MathML along with an \texttt{/ActualText} entry and an entry with alternate text which describes how to read the symbol.
-The \PDF{} then looked like this
+Math is a problem. I have seen an example where \emph{every single
+symbol} has been marked up with tags from MathML along with an
+\texttt{/ActualText} entry and an entry with alternate text which
+describes how to read the symbol. The \PDF{} then looked like this
\begin{taglstlisting}
@@ -1458,9 +1399,21 @@ The \PDF{} then looked like this
\end{taglstlisting}
-If this is really the way to go one would need some script to add the mark-up as doing it manually is too much work and would make the source unreadable -- at least with pdflatex and the generic mode. In lua mode is it possible to hook into the \texttt{mlist\_to\_hlist} callback and add marker automatically. Some first implementation is done by Marcel Krüger in the luamml project.
+If this is really the way to go one would need some script to add the
+mark-up as doing it manually is too much work and would make the
+source unreadable -- at least with pdflatex and the generic mode. In
+lua mode is it possible to hook into the \texttt{mlist\_to\_hlist}
+callback and add marker automatically. Some first implementation is
+done by Marcel Krüger in the luamml project.
-But I'm not sure that this is the best way to do math. It looks rather odd that a document should have to tell a screen reader in such detail how to read an equation. It would be much more efficient, sensible and flexible if a complete representation of the equation in mathML could be stored in the \PDF{} and the task how to read this aloud delegated to the screen reader. As \PDF{}~2.0 introduced associated files it is probable that this will be the way to go but more investigations are needed here.
+But I'm not sure that this is the best way to do math. It looks rather
+odd that a document should have to tell a screen reader in such detail
+how to read an equation. It would be much more efficient, sensible and
+flexible if a complete representation of the equation in mathML could
+be stored in the \PDF{} and the task how to read this aloud delegated
+to the screen reader. As \PDF{}~2.0 introduced associated files it is
+probable that this will be the way to go but more investigations are
+needed here.
See also section~\ref{sec:alt} for some more remarks and tests.
@@ -1469,11 +1422,19 @@ See also section~\ref{sec:alt} for some more remarks and tests.
%TODO: think about marginnote! Aside?
-A\sidenote{Generic mode only} problem in generic mode are paragraphs with page breaks. As already mentioned the end marker \texttt{EMC} must be added on the same page as the begin marker. But it is in pdflatex \emph{very} difficult to inject something at the page break automatically. One can manipulate the shipout box to some extend in the output routine, but this is not easy and it gets even more difficult if inserts like footnotes and floats are involved: the end of the paragraph is then somewhere in the middle of the box.
+A\sidenote{Generic mode only} problem in generic mode are paragraphs
+with page breaks. As already mentioned the end marker \texttt{EMC}
+must be added on the same page as the begin marker. But it is in
+pdflatex \emph{very} difficult to inject something at the page break
+automatically. One can manipulate the shipout box to some extend in
+the output routine, but this is not easy and it gets even more
+difficult if inserts like footnotes and floats are involved: the end
+of the paragraph is then somewhere in the middle of the box.
So with pdflatex in generic mode one until now had to do the splitting manually.
-The example \texttt{mc-manual-para-split} demonstrates how this can be done. The general idea was to use \verb+\vadjust+ in the right place:
+The example \texttt{mc-manual-para-split} demonstrates how this can be
+done. The general idea was to use \verb+\vadjust+ in the right place:
\begin{taglstlisting}
@@ -1487,44 +1448,51 @@ Pellentesque scelerisque
sit amet, lacus.\tagmcend
\end{taglstlisting}
-Starting with version 0.92 there is code which tries to resolve this problem. Basically it works like this: every mc-command
-issues a mark command (actually two slightly different). When the page is built in the output routine this mark commands are inspected
-and from them \LaTeX{} can deduce if there is a mc-chunk which must be closed or reopened.
-The method is described in Frank Mittelbach's talk at TUG~2021
-\enquote{Taming the beast — Advances in paragraph tagging with pdfTeX and XeTeX}
-\url{https://youtu.be/SZHIeevyo3U?t=19551}.
+Starting with version 0.92 there is code which tries to resolve this
+problem. Basically it works like this: every mc-command issues a mark
+command (actually two slightly different). When the page is built in
+the output routine this mark commands are inspected and from them
+\LaTeX{} can deduce if there is a mc-chunk which must be closed or
+reopened. The method is described in Frank Mittelbach's talk at
+TUG~2021 \enquote{Taming the beast — Advances in paragraph tagging
+ with pdfTeX and XeTeX} \url{https://youtu.be/SZHIeevyo3U?t=19551}.
Please note
\begin{itemize}
\item The code requires a \pkg{pdfmanagement-testphase} version v0.95i or newer.
-\item Typically you will need more compilations than previously, don't rely on the rerun messages, but if something looks wrong
-rerun.
-\item The code relies on that related |\tagmcbegin| and |\tagmcend| are in the same boxing level. If one is in a box (which hides the marks) and the other in the main galley, things will go wrong.
+
+\item Typically you will need more compilations than previously, don't
+ rely on the rerun messages, but if something looks wrong rerun.
+
+\item The code relies on that related |\tagmcbegin| and |\tagmcend|
+ are in the same boxing level. If one is in a box (which hides the
+ marks) and the other in the main galley, things will go wrong.
\end{itemize}
\subsubsection{Automatic tagging of paragraphs}\label{sec:paratagging}
-Another feature that emerged from the \LaTeX{} tagged PDF project are hooks at the begin and end of paragraphs.
-\pkg{tagpdf} makes use of these hooks to tag paragraphs. In the first version it added only one structure, but this proved to be not adequate:
+Another feature that emerged from the \LaTeX{} tagged PDF project are hooks
+at the begin and end of paragraphs. \pkg{tagpdf} makes use of these hooks to
+tag paragraphs. In the first version it added only one structure, but this
+proved to be not adequate:
Paragraphs in \LaTeX{} can be nested, e.g., you can have a paragraph
containing a display quote, which in turn consists of more than one
(sub)paragraph, followed by some more text which all belongs to the
same outer paragraph.
-In the \PDF{} model and in the HTML model that is not supported: the rules
-in \PDF{} specification do not allow \texttt{P}-structures to be nested --- a
-limitation that conflicts with real live, given that such
-constructs are quite normal in spoken and written language.
+In the \PDF{} model and in the HTML model that is not supported: the rules in
+\PDF{} specification do not allow \texttt{P}-structures to be nested --- a
+limitation that conflicts with real live, given that such constructs are
+quite normal in spoken and written language.
-The approach we take (starting with march 2023, version 0.98e)
-to resolve this is to model such \enquote{big}
-paragraphs with a structure named \texttt{text-unit} and use \texttt{P} (under the name \texttt{text})
-only for (portions of) the actual paragraph text in a way that the
-\texttt{P}s are not nested. As a result we have for a simple
-paragraph two structures:
+The approach we take (starting with march 2023, version 0.98e) to resolve
+this is to model such \enquote{big} paragraphs with a structure named
+\texttt{text-unit} and use \texttt{P} (under the name \texttt{text}) only for
+(portions of) the actual paragraph text in a way that the \texttt{P}s are not
+nested. As a result we have for a simple paragraph two structures:
\begin{taglstlisting}
<text-unit>
@@ -1550,41 +1518,54 @@ paragraph two structures:
</text-unit>
\end{taglstlisting}
-In other words such a display block is always embedded in a
-|<text-unit>| structure, possibly preceded by a |<text>|\ldots|</text>| block
-and possibly followed by one, though both such blocks are optional.
-More information about this can be found in the documentation of \texttt{latex-lab-block-tagging}.
-As a consequence \pkg{tagpdf} now adds two structures if paratagging is activated. The new code
-to tag display blocks extends this code to handle the nesting of lists and other display structures.
+In other words such a display block is always embedded in a |<text-unit>|
+structure, possibly preceded by a |<text>|\ldots|</text>| block and possibly
+followed by one, though both such blocks are optional. More information about
+this can be found in the documentation of \texttt{latex-lab-block-tagging}.
-The automatic tagging require that for every begin of a paragraph with the begin hook code
-there a corresponding end with the closing hook code. This can fail, e.g if a |vbox| doesn't correctly issue a |\par| at the end.
-If this happens the tagging structure can get very confused. At the end of the document \pkg{tagpdf} checks if
-the number of outer and inner start and end paragraph structures created with the automatic paratagging code
-are equal and it will error if not.
+As a consequence \pkg{tagpdf} now adds two structures if paratagging is
+activated. The new code to tag display blocks extends this code to handle the
+nesting of lists and other display structures.
-The automatic tagging of paragraphs can be deactivated completely or only the outer level with the |\tagtool| keys
-|para| and |para-flattened| or with the (now deprecated) commands |\tagpdfparaOn| and |\tagpdfparaOff|.
+The automatic tagging require that for every begin of a paragraph with the
+begin hook code there a corresponding end with the closing hook code. This
+can fail, e.g if a |vbox| doesn't correctly issue a |\par| at the end. If
+this happens the tagging structure can get very confused. At the end of the
+document \pkg{tagpdf} checks if the number of outer and inner start and end
+paragraph structures created with the automatic paratagging code are equal
+and it will error if not.
+The automatic tagging of paragraphs can be deactivated completely or only the
+outer level with the |\tagtool| keys |para| and |para-flattened| or with the
+(now deprecated) commands |\tagpdfparaOn| and |\tagpdfparaOff|.
-Nesting the activation and deactivation of the tagging of paragraphs can be quite difficult. For example if it is unclear if the inner code issues a |\par| or not it is not trivial to exclude an end hook for every excluded begin hook.
-In such cases it can be easier to use the |paratag| key with the value |NonStruct| to convert some |P|-structures
-into |NonStruct|-structures without real meaning.
+Nesting the activation and deactivation of the tagging of paragraphs can be
+quite difficult. For example if it is unclear if the inner code issues a
+|\par| or not it is not trivial to exclude an end hook for every excluded
+begin hook. In such cases it can be easier to use the |paratag| key with the
+value |NonStruct| to convert some |P|-structures into |NonStruct|-structures
+without real meaning.
\subsection{Task 2: Marking the structure}
-
-
-The structure is represented in the \PDF{} with a number of objects of type \texttt{StructElem} which build a tree: each of this objects points back to its parent and normally has a number of kid elements, which are either again structure elements or -- as leafs of the tree -- the marked contents chunks marked up with the \verb+tagmc+-commands. The root of the tree is the \texttt{StructTreeRoot}.
+The structure is represented in the \PDF{} with a number of objects of type
+\texttt{StructElem} which build a tree: each of this objects points back to
+its parent and normally has a number of kid elements, which are either again
+structure elements or -- as leafs of the tree -- the marked contents chunks
+marked up with the \verb+tagmc+-commands. The root of the tree is the
+\texttt{StructTreeRoot}.
\subsubsection{Structure types}
-
-
-The tree should reflect the \emph{semantic} meaning of the text. That means that the text should be marked as section, list, table head, table cell and so on. A number of standard structure types is predefined, see section \ref{sec:new-tag} but it is allowed to create more. If you want to use types of your own you must declare them. E.g. this declares two new types \texttt{TAB} and {FIG} and bases them on \texttt{P}:
+The tree should reflect the \emph{semantic} meaning of the text. That means
+that the text should be marked as section, list, table head, table cell and
+so on. A number of standard structure types is predefined, see section
+\ref{sec:new-tag} but it is allowed to create more. If you want to use types
+of your own you must declare them. E.g. this declares two new types
+\texttt{TAB} and {FIG} and bases them on \texttt{P}:
\begin{taglstlisting}
@@ -1598,10 +1579,9 @@ The tree should reflect the \emph{semantic} meaning of the text. That means that
\subsubsection{Sectioning}
-
-
-The sectioning units can be structured in two ways: a flat, html-like and a more (in pdf/UA2 basically deprecated) xml-like version.
-The flat version creates a structure like this:
+The sectioning units can be structured in two ways: a flat, html-like and a
+more (in pdf/UA2 basically deprecated) xml-like version. The flat version
+creates a structure like this:
\begin{taglstlisting}
@@ -1614,7 +1594,10 @@ The flat version creates a structure like this:
So here the headings are marked according their level with \texttt{H1}, \texttt{H2}, etc.
-In the xml-like tree the complete text of a sectioning unit is surrounded with the \texttt{Sect} tag, and all headers with the tag \texttt{H}. Here the nesting defines the level of a sectioning heading.
+
+In the xml-like tree the complete text of a sectioning unit is surrounded
+with the \texttt{Sect} tag, and all headers with the tag \texttt{H}. Here the
+nesting defines the level of a sectioning heading.
\begin{taglstlisting}
@@ -1629,7 +1612,12 @@ In the xml-like tree the complete text of a sectioning unit is surrounded with t
\end{taglstlisting}
-The flat version is more \LaTeX-like and it is rather straightforward to patch \verb+\chapter+, \verb+\section+ and so on to insert the appropriates \texttt{H\ldots} start and end markers. The xml-like tree is more difficult to automate. If such a tree is wanted I would recommend to use -- like the context format -- explicit commands to start and end a sectioning unit.
+
+The flat version is more \LaTeX-like and it is rather straightforward to
+patch \verb+\chapter+, \verb+\section+ and so on to insert the appropriates
+\texttt{H\ldots} start and end markers. The xml-like tree is more difficult
+to automate. If such a tree is wanted I would recommend to use -- like the
+context format -- explicit commands to start and end a sectioning unit.
@@ -1639,37 +1627,48 @@ The flat version is more \LaTeX-like and it is rather straightforward to patch \
The following commands can be used to define the tree structure:
-\begin{docCommand}[nosep]{tagstructbegin}{\marg{key-val-list}}\end{docCommand}
-\begin{docCommand}{tag_struct_begin:n}{\marg{key-val-list}}\end{docCommand}
+\begin{docCommands}
+ {
+ {doc name=tagstructbegin,doc parameter=\marg{key-val-list}},
+ {doc name=tag_struct_begin:n,doc parameter=\marg{key-val-list}}
+ }\end{docCommands}
These commands start a new structure. They don't start a group. They set all their values globally.
The key-val list understands the following keys:
\begin{description}
- \item[\PrintKeyName{tag}]
- This is required. The value of the key is normally one of the standard types listed in section \ref{sec:new-tag}. It is possible to setup new tags/types, see the same section. The value can also be of the form |type/NS|, where |NS| is the
- shorthand of a declared name space. 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.
-
- \item[\PrintKeyName{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.
-
- \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 attributes \texttt{tagstruct} (the structure number) and \texttt{tagstructobj} (the
- object reference).
-
- \item[\PrintKeyName{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 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 it.
+ \item[\PrintKeyName{tag}] This is required. The value of the key is
+ normally one of the standard types listed in section
+ \ref{sec:new-tag}. It is possible to setup new tags/types, see the
+ same section. The value can also be of the form |type/NS|, where
+ |NS| is the shorthand of a declared name space. 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.
+
+ \item[\PrintKeyName{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.
+
+ \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
+ attributes \texttt{tagstruct} (the structure number) and
+ \texttt{tagstructobj} (the object reference).
+
+ \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
+ it.
\item[\PrintKeyName{alt}] This key inserts an \texttt{/Alt} value in the
dictionary of structure object, see section~\ref{sec:alt}. The value
@@ -1688,8 +1687,9 @@ The key-val list understands the following keys:
- and it will insert \verb+\frac{a}{b}+ (hex encoded) in the \PDF{}. In case that the text begins with a command that should not be
- expanded protect it e.g. with a \verb+\empty+.
+ and it will insert \verb+\frac{a}{b}+ (hex encoded) in the
+ \PDF{}. In case that the text begins with a command that should not
+ be expanded protect it e.g. with a \verb+\empty+.
\item[\PrintKeyName{actualtext}] This key inserts an \texttt{/ActualText}
@@ -1708,11 +1708,15 @@ The key-val list understands the following keys:
- and it will insert \verb+X+ (hex encoded) in the \PDF{}. In case that the text begins with a command that should not be
- expanded protect it e.g. with a \verb+\empty+
+ and it will insert \verb+X+ (hex encoded) in the \PDF{}. In case
+ that the text begins with a command that should not be expanded
+ protect it e.g. with a \verb+\empty+
- \item[\PrintKeyName{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 the structure object. As an example
+ \item[\PrintKeyName{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 the structure object. As an
+ example
\begin{taglstlisting}
\tagstructbegin{tag=TH,attribute= TH-row}
@@ -1720,8 +1724,10 @@ The key-val list understands the following keys:
See also section~\ref{sec:attributes}.
- \item[\PrintKeyName{attribute-class}]
- 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 them as attribute classes to the structure object. As an example
+ \item[\PrintKeyName{attribute-class}] 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 them as
+ attribute classes to the structure object. As an example
\begin{taglstlisting}
@@ -1730,18 +1736,21 @@ The key-val list understands the following keys:
See also section~\ref{sec:attributes}.
- \item[\PrintKeyName{title}]
- This key allows to set the dictionary entry \texttt{/T} (for a title) in the structure object. The value is handled as verbatim string and hex encoded. Commands are not expanded.
+ \item[\PrintKeyName{title}] This key allows to set the dictionary
+ entry \texttt{/T} (for a title) in the structure object. The value
+ is handled as verbatim string and hex encoded. Commands are not
+ expanded.
- \item[\PrintKeyName{title-o}]
- This key allows to set the dictionary entry \texttt{/T} in the structure object.
- The value is expanded once and then handled as verbatim string like the \PrintKeyName{title} key.
+ \item[\PrintKeyName{title-o}] This key allows to set the dictionary
+ entry \texttt{/T} in the structure object. The value is expanded
+ once and then handled as verbatim string like the
+ \PrintKeyName{title} key.
- \item[\PrintKeyName{AF}]
- This key allows to reference an associated file in the structure element.
- The value should be the name of an object pointing to the \texttt{/Filespec} dictionary as expected by
- \verb+\pdf_object_ref:n+ from a current \texttt{l3kernel}.
- For example:
+ \item[\PrintKeyName{AF}] This key allows to reference an associated
+ file in the structure element. The value should be the name of
+ an object pointing to the \texttt{/Filespec} dictionary as
+ expected by \verb+\pdf_object_ref:n+ from a current
+ \texttt{l3kernel}. For example:
\begin{taglstlisting}
\group_begin:
@@ -1756,18 +1765,20 @@ The key-val list understands the following keys:
unknown types it can be set too. See the \texttt{l3pdffile}
documentation for details. Associated files are a concept new in PDF
2.0, but the code currently doesn't check the pdf version, it is your
- responsability to set it (this can be done with the \texttt{pdfversion}
+ responsibility to set it (this can be done with the \texttt{pdfversion}
key in \verb+\DocumentMetadata+).
- \item[\PrintKeyName{root-AF}]
- This key allows to reference an associated file in the root structure element. Using the root
- can be e.g. useful to add a css-file. When converting the pdf to a html with e.g. ngpdf this css-file is then
- referenced in the head of the html.
+ \item[\PrintKeyName{root-AF}] This key allows to reference an
+ associated file in the root structure element. Using the root can
+ be e.g. useful to add a css-file. When converting the pdf to a
+ html with e.g. ngpdf this css-file is then referenced in the head
+ of the html.
- \item[\PrintKeyName{AFinline}]
- This key allows to embed an associated file with inline content. The value is some text,
- which is embedded in the PDF as a text file with mime type text/plain.
+ \item[\PrintKeyName{AFinline}] This key allows to embed an
+ associated file with inline content. The value is some text,
+ which is embedded in the PDF as a text file with mime type
+ text/plain.
\begin{taglstlisting}
\tagstructbegin{tag=P,AFinline=Some extra text}
@@ -1776,70 +1787,86 @@ The key-val list understands the following keys:
\item[\PrintKeyName{AFinline-o}]
This is like \verb+AFinline+, but it expands the value once.
- \item[\PrintKeyName{texsource}] This is like \verb+AFinline-o+, but it
- creates a tex-file, with mime type \texttt{application/x-tex} and the
- AFRelationship \texttt{Source}.
+ \item[\PrintKeyName{texsource}] This is like \verb+AFinline-o+, but
+ it creates a tex-file, with mime type \texttt{application/x-tex}
+ and the AFRelationship \texttt{Source}. It also sets the /Desc key to a
+ (currently) fix text to satisfy some validators.
- \item[\PrintKeyName{mathml}] This is like \verb+AFinline-o+, but it
- creates a xml-file, with mime type \texttt{application/xml} and the
- AFRelationship \texttt{Supplement}.
+ \item[\PrintKeyName{mathml}] This is like \verb+AFinline-o+, but it
+ creates a xml-file, with mime type \texttt{application/xml} and
+ the AFRelationship \texttt{Supplement}. It also sets the /Desc key to a
+ (currently) fix text to satisfy some validators.
- \item[\PrintKeyName{lang}]
- This key allows to set the language for a structure element. The value should be a bcp-identifier,
+ \item[\PrintKeyName{lang}] This key allows to set the language for
+ a structure element. The value should be a bcp-identifier,
e.g. |de-De|.
- \item[\PrintKeyName{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}|. It can be used more than once in the key/value argument and combines the
- references.
+ \item[\PrintKeyName{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}|. It can be used more than once in the
+ key/value argument and combines the references.
- \item[\PrintKeyName{E}]
- This key sets the |/E| key, the expanded form of an abbreviation or an acronym (I couldn't think of a better name, so I sticked to E).
+ \item[\PrintKeyName{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{description}
-\begin{docCommand}[nosep]{tagstructend}{}\end{docCommand}
-\begin{docCommand}{tag_struct_end:}{}\end{docCommand}
+\begin{docCommands}
+ { {doc name=tagstructend}, {doc name=tag_struct_end:}}
+\end{docCommands}
-These commands end a structure. They don't end a group and it doesn't matter if they are in another group as the starting commands.
-\begin{docCommand}[nosep]{tagstructuse}{\marg{label}}\end{docCommand}
-\begin{docCommand}{tag_struct_use:n}{\marg{label}}\end{docCommand}
+These commands end a structure. They don't end a group and it doesn't
+matter if they are in another group as the starting commands.
+\begin{docCommands}
+ {
+ {doc name=tagstructuse,doc parameter=\marg{label}},
+ {doc name=tag_struct_use:n,doc parameter=\marg{label}}
+ }\end{docCommands}
-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.
-
+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{Root structure}
-
-
-A document should have at least one structure which contains the whole document. A suitable tag is \texttt{Document}.
-Such a root is now always added automatically. Its type can be changed with the key \texttt{activate}.
-
-
-
+A document should have at least one structure which contains the whole
+document. A suitable tag is \texttt{Document}. Such a root is now always
+added automatically. Its type can be changed with the key
+\texttt{activate}.
\subsubsection{Attributes and attribute classes}\label{sec:attributes}
-Structure Element can have so-called attributes. A single attribute is a dictionary%\footnote{
-(or a stream but this is currently not supported by the package as I don't know an use-case)
-with at least the required key \verb+/O+ (for \enquote{Owner} which describes the scope the attribute applies too.
-As an example here an attribute that can be attached to tabular header (type TH) and adds the info that the header is a column header:
+Structure Element can have so-called attributes. A single attribute is a
+dictionary (or a stream but this is currently not supported by the package
+as I don't know an use-case) with at least the required key \verb+/O+ (for
+\enquote{Owner} which describes the scope the attribute applies too. As an
+example here an attribute that can be attached to tabular header (type TH)
+and adds the info that the header is a column header:
\begin{taglstlisting}
<</O /Table /Scope /Column>>
\end{taglstlisting}
-One or more such attributes can be attached to a structure element. It is also possible to store such an attribute under a symbolic name in a so-called \enquote{ClassedMap} and then to attach references to such classes to a structure.
-To use such attributes you must at first declare it in \verb+\tagpdfsetup+ with the key \texttt{newattribute}. This key takes two argument, a name and the content of the attribute.
-The name should be a sensible key name, it is converted to a pdf name with
-\verb+\pdf_name_from_unicode_e:n+, so slashes and spaces are allow. The content should be a dictionary without the braket.
+One or more such attributes can be attached to a structure element. It is
+also possible to store such an attribute under a symbolic name in a
+so-called \enquote{ClassedMap} and then to attach references to such
+classes to a structure.
+To use such attributes you must at first declare it in \verb+\tagpdfsetup+
+with the key \texttt{newattribute}. This key takes two argument, a name and
+the content of the attribute. The name should be a sensible key name, it is
+converted to a pdf name with \verb+\pdf_name_from_unicode_e:n+, so slashes
+and spaces are allow. The content should be a dictionary without the
+bracket.
+
\begin{taglstlisting}
\tagpdfsetup
@@ -1852,17 +1879,17 @@ The name should be a sensible key name, it is converted to a pdf name with
\end{taglstlisting}
+Attributes are only written to the \PDF{} when used, so it is not a problem
+to predeclare a number of standard attributes.
-Attributes are only written to the \PDF{} when used, so it is not a problem to predeclare a number of standard attributes.
-
-
-It is your responsability that the content of the dictionary is valid \PDF{} and that the values are sensible!
-
-Attributes can then be used with the key \PrintKeyName{attribute} or \PrintKeyName{attribute-class} which both take a comma list of attribute names as argument:
-%\footnote{That's not really a sensible example}:
+It is your responsibility that the content of the dictionary is valid
+\PDF{} and that the values are sensible!
+Attributes can then be used with the key \PrintKeyName{attribute} or
+\PrintKeyName{attribute-class} which both take a comma list of attribute
+names as argument:
\begin{taglstlisting}
@@ -1876,17 +1903,27 @@ Attributes can then be used with the key \PrintKeyName{attribute} or \PrintKeyNa
\subsection{Task 3: tree Management}
-When all the document content has been correctly marked and the data for the trees has been collected they must be flushed to the \PDF{}. This is done automatically (if the package has been activated) with an internal command in an end document hook.
+When all the document content has been correctly marked and the data for
+the trees has been collected they must be flushed to the \PDF{}. This is
+done automatically (if the package has been activated) with an internal
+command in an end document hook.
\begin{docCommand}{__tag_finish_structure:}{}\end{docCommand}
-This will hopefully write all the needed objects and values to the \PDF{}. (Beside the already mentioned \texttt{StructTreeRoot} and \texttt{StructElem} objects, additionally a so-called \texttt{ParentTree} is needed which records the parents of all the marked contents bits, a \texttt{Rolemap}, perhaps a \texttt{ClassMap} and object for the attributes, and a few more values and dictionaries).
+This will hopefully write all the needed objects and values to the \PDF{}.
+(Beside the already mentioned \texttt{StructTreeRoot} and
+\texttt{StructElem} objects, additionally a so-called \texttt{ParentTree}
+is needed which records the parents of all the marked contents bits, a
+\texttt{Rolemap}, perhaps a \texttt{ClassMap} and object for the
+attributes, and a few more values and dictionaries).
\subsection{A fully marked up document body}
-
-The following shows the marking needed for a section, a sentence and a list with two items. It is obvious that one wouldn't like to have to do this for real documents. If tagging should be usable, the commands must be hidden as much as possible inside suitable \LaTeX\ commands and enviroments.
+The following shows the marking needed for a section, a sentence and a list
+with two items. It is obvious that one wouldn't like to have to do this for
+real documents. If tagging should be usable, the commands must be hidden as
+much as possible inside suitable \LaTeX\ commands and environments.
\begin{taglstlisting}
@@ -1941,36 +1978,39 @@ The following shows the marking needed for a section, a sentence and a list with
\subsection{Interrupting the tagging}
-Experience showed that it must be possible to interrupt tagging in some places.
-For example various packages do trial typesetting to measure text and this shouldn't create
-structures. There are therefore a number of commands for various use cases\footnote{it is
-quite possible that some of the commands will disappear again if we realize that they are not fitting!}
+Experience showed that it must be possible to interrupt tagging in some
+places. For example various packages do trial typesetting to measure text
+and this shouldn't create structures. There are therefore a number of
+commands for various use cases\footnote{it is quite possible that some of
+the commands will disappear again if we realize that they are not fitting!}
-\begin{docCommand}[nosep]{tag_stop:}{}\end{docCommand}
-\begin{docCommand}[nosep]{tag_start:}{}\end{docCommand}
-\begin{docCommand}[nosep]{tagstop}{}\end{docCommand}
-\begin{docCommand}[nosep]{tagstart}{}\end{docCommand}
-\begin{docCommand}[nosep]{tag_stop_group_begin:}{}\end{docCommand}
-\begin{docCommand}{tag_start_group_end:}{}\end{docCommand}
+Warning! Stopping tagging should be done only with care and when it is
+ensured that no code inside the stopped part gets confused. Most importantly
+currently tagging should not be stopped if a page break can occur
+or the output routine is called.
-This commands stop and start tagging in the current group
-by switching \emph{local} booleans.
-The grouping commands also open and close a group.
+\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}
+
+This commands stop and start 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
-the corresponding stop command actually stopped tagging. In complicated
-case the following labeled version can be used:
+the corresponding stop command actually stopped tagging. This is implement
+through a local counter which keeps track of the level.
-\begin{docCommand}[nosep]{tag_stop:n}{\marg{label}}\end{docCommand}
-\begin{docCommand}{tag_start:n}{\marg{label}}\end{docCommand}
-
-This commands stop and start tagging in the current group
-by switching \emph{local} booleans, but |\tag_start:n|
-only restarts if the corresponding |tag_stop:n| actually
-stopped something. This is meant for a situation like the following,
-where you don't want that the inner |\tag_start:n| restarts tagging.
+The \meta{label} can be used to identify the command in debugging message.
\begin{taglstlisting}
\tag_stop:n{outer}
@@ -1986,10 +2026,20 @@ where you don't want that the inner |\tag_start:n| restarts tagging.
\subsection{Lazy and automatic tagging}\label{sec:lazy}
-A number of features of \PDF{} readers need a fully tagged \PDF{}. As an example screen readers tend to ignore alternative text (see section~\ref{sec:alt}) if the \PDF{} is not fully tagged. Also reflowing a \PDF{} only works for me (even if real space chars are in the \PDF{}) if the \PDF{} is fully tagged (recent versions of the adobe reader manage to
-reflow also not tagged \PDF{} but it is very slow).
+A number of features of \PDF{} readers need a fully tagged \PDF{}. As
+an example screen readers tend to ignore alternative text (see
+section~\ref{sec:alt}) if the \PDF{} is not fully tagged. Also
+reflowing a \PDF{} only works for me (even if real space chars are in
+the \PDF{}) if the \PDF{} is fully tagged (recent versions of the
+adobe reader manage to reflow also not tagged \PDF{} but it is very
+slow).
-This means that even if you don't care about a proper structure you should try to add at least some minimal tagging. With the now available automatic tagging of paragraphs all that is needed, is to use |testphase=phase-II| in |\DocumentMetadata|. With lualatex this can work quite OK if you don't have unbalanced paragraphs in your document (pdflatex is more fragile).
+This means that even if you don't care about a proper structure you
+should try to add at least some minimal tagging. With the now
+available automatic tagging of paragraphs all that is needed, is to
+use |testphase=phase-II| in |\DocumentMetadata|. With lualatex this
+can work quite OK if you don't have unbalanced paragraphs in your
+document (pdflatex is more fragile).
\subsection{Adding tagging to commands}
@@ -2005,29 +2055,49 @@ As mentioned above the mc-markers should not be nested. Basically you write:
\end{taglstlisting}
-This is quite workable as long as you mark everything manually. But when defining commands you have to ensure that they correctly push and pop the mc-chunks where needed.
+This is quite workable as long as you mark everything manually. But
+when defining commands you have to ensure that they correctly push and
+pop the mc-chunks where needed.
\section{Alternative text, ActualText and text-to-speech software}\label{sec:alt}
-The \PDF{} format allows to add alternative text through the \PrintKeyName{/Alt} and the \PrintKeyName{/ActualText} key.
-Both can be added either to the marked content in the page stream or to the object describing the structure.
+The \PDF{} format allows to add alternative text through the
+\PrintKeyName{/Alt} and the \PrintKeyName{/ActualText} key. Both can
+be added either to the marked content in the page stream or to the
+object describing the structure.
-The value of \PrintKeyName{/ActualText} (inserted by \texttt{tagpdf} with \PrintKeyName{actualtext}) is meant to replace single characters or rather small pieces of text. It can be used also without any tagging (e.g. with the package accsupp). If the \PDF{} reader support this (adobe reader does, sumatra not) one can change with it how a piece of text is copied and pasted e.g. to split up a ligature.
+The value of \PrintKeyName{/ActualText} (inserted by \texttt{tagpdf}
+with \PrintKeyName{actualtext}) is meant to replace single characters
+or rather small pieces of text. It can be used also without any
+tagging (e.g. with the package accsupp). If the \PDF{} reader support
+this (adobe reader does, sumatra not) one can change with it how a
+piece of text is copied and pasted e.g. to split up a ligature.
-\PrintKeyName{/Alt} (inserted by \texttt{tagpdf} with \PrintKeyName{alt}) is a key to improve accessibility: with it one can add to a picture or something else an alternative text.
+\PrintKeyName{/Alt} (inserted by \texttt{tagpdf} with
+\PrintKeyName{alt}) is a key to improve accessibility: with it one can
+add to a picture or something else an alternative text.
-The file \texttt{ex-alt-actualtext.tex} shows some experiments I made with with both keys and text-to-speech software (the in-built of adobe and nvda).
-To sum them up:
+The file \texttt{ex-alt-actualtext.tex} shows some experiments I made
+with both keys and text-to-speech software (the in-built of adobe and
+nvda). To sum them up:
\begin{itemize}
-\item The keys have an impact on text-to-speech software only if the document is fully tagged.
-\item \PrintKeyName{/ActualText} should be at best used around short pieces of marked content.
-\item \PrintKeyName{/Alt} is used at best with a structure -- this avoids problems with luatex where marked contents blocks can be split over pages.
-\item To some extend one can get a not so bad reading of math with the alternative text.
+\item The keys have an impact on text-to-speech software only if the
+ document is fully tagged.
+
+\item \PrintKeyName{/ActualText} should be at best used around short
+ pieces of marked content.
+
+\item \PrintKeyName{/Alt} is used at best with a structure -- this
+ avoids problems with luatex where marked contents blocks can be
+ split over pages.
+
+\item To some extend one can get a not so bad reading of math with the
+ alternative text.
\end{itemize}
@@ -2035,20 +2105,24 @@ To sum them up:
\section{Standard types and new tags}\label{sec:new-tag}
-The tags used to describe the type of a structure element can be rather freely chosen.
-PDF 1.7 and earlier only requires that in a tagged PDF all types should be either from
-a known set of standard types or are \enquote{role mapped} to such a standard type. Such a role mapping is a simple key-value in the RoleMap dictionary.
+The tags used to describe the type of a structure element can be
+rather freely chosen. PDF 1.7 and earlier only requires that in a
+tagged PDF all types should be either from a known set of standard
+types or are \enquote{role mapped} to such a standard type. Such a
+role mapping is a simple key-value in the RoleMap dictionary.
-So instead of |H1| the type |section| could be used. The role mapping can then be declared
-with the |add-new-tag| key:
+So instead of |H1| the type |section| could be used. The role mapping
+can then be declared with the |add-new-tag| key:
\begin{taglstlisting}
\tagpdfsetup{add-new-tag = section/H1}
\end{taglstlisting}
-In PDF 2.0 the situation is a bit more complicated. At first PDF~2.0 introduced \emph{name spaces}.
-That means that a type can have more than one \enquote{meaning} depending on the name space it belongs to.
-|section (name space A)| and |section (name space B)| are two different types.
+In PDF 2.0 the situation is a bit more complicated. At first PDF~2.0
+introduced \emph{name spaces}. That means that a type can have more
+than one \enquote{meaning} depending on the name space it belongs to.
+|section (name space A)| and |section (name space B)| are two
+different types.
At second PDF 2.0 still requires that a tagged PDF maps all types to a
standard type, but now there are three sets of standard types (The meanings
@@ -2056,20 +2130,20 @@ of the PDF types can be looked up in the \PDF{}-references
\parencite{pdfspec-iso32000-1,pdfspec-iso32000-2_2020}):
\begin{enumerate}
-\item The \emph{standard structure namespace for PDF 1.7}, also called the \emph{default standard structure namespace}. The public name of the namespace is |tag/NS/pdf|. This can be used to reference
- the namespace e.g. in attributes. These are the structure names from PDF 1.7:
-\ExplSyntaxOn
-\clist_clear:N\l_tmpa_clist
-\prop_map_inline:cn
- { g__tag_role_NS_pdf_prop }
- { \clist_put_right:Nn \l_tmpa_clist {#1} }
-\clist_use:Nn \l_tmpa_clist {,\c_space_tl }
-\ExplSyntaxOff
-
-\item The \emph{standard structure namespace for PDF 2.0}.
-The public name of the namespace is |tag/NS/pdf2|. This can be used to reference
-the namespace e.g. in attributes.
-These are more or less same types as in PDF. The following types have been removed from this set:\\
+\item The \emph{standard structure namespace for PDF 1.7}, also called
+ the \emph{default standard structure namespace}. The public name of
+ the namespace is |tag/NS/pdf|. This can be used to reference the
+ namespace e.g. in attributes. These are the structure names from PDF
+ 1.7: \ExplSyntaxOn \clist_clear:N\l_tmpa_clist \prop_map_inline:cn {
+ g__tag_role_NS_pdf_prop } { \clist_put_right:Nn \l_tmpa_clist {#1}
+ } \clist_use:Nn \l_tmpa_clist {,\c_space_tl } \ExplSyntaxOff
+
+\item The \emph{standard structure namespace for PDF 2.0}. The public
+ name of the namespace is |tag/NS/pdf2|. This can be used to
+ reference the namespace e.g. in attributes. These are more or less
+ same types as in PDF. The following types have been removed from
+ this set:\\
+%
\ExplSyntaxOn
\clist_clear:N\l_tmpa_clist
\prop_map_inline:cn { g__tag_role_NS_pdf_prop }
@@ -2094,31 +2168,46 @@ and the following are new:\\
\clist_use:Nn \l_tmpa_clist {,\c_space_tl }
\ExplSyntaxOff
-\item MathML 3.0 as an \emph{other namespaces}.
-The public name of the namespace is |tag/NS/mathml|. This can be used to reference
- the namespace e.g. in attributes.
-There are nearly 200 types in this name space, so I refrain from listing them here.
+\item MathML 3.0 as an \emph{other namespaces}. The public name of
+ the namespace is |tag/NS/mathml|. This can be used to reference the
+ namespace e.g. in attributes. There are nearly 200 types in this
+ name space, so I refrain from listing them here.
\end{enumerate}
-To allow to this more complicated setup
-the syntax of the \texttt{add-new-tag} key has been extended.
-It now takes as argument a key-value list with the following keys.
-A normal document shouldn't need the extended syntax, the simple
-syntax |section/H1| should in most cases do the right thing.
+To allow to this more complicated setup the syntax of the
+\texttt{add-new-tag} key has been extended. It now takes as argument
+a key-value list with the following keys. A normal document shouldn't
+need the extended syntax, the simple syntax |section/H1| should in
+most cases do the right thing.
\begin{description}
-\item[\PrintKeyName{tag}] This is the name of the new type as it should then be used in \cs{tagstructbegin}.
+\item[\PrintKeyName{tag}] This is the name of the new type as it
+ should then be used in \cs{tagstructbegin}.
+
\item[\PrintKeyName{tag-namespace}] This is the namespace of the new type.
The value should be a shorthand of a namespace. The allowed values are
currently |pdf|, |pdf2|, |mathml| and |user|. The default value (and
recommended value for a new tag) is |user|. The public name of the user
namespace is |tag/NS/user|. This can be used to reference the namespace
e.g. in attributes.
-\item[\PrintKeyName{role}] This is the type the tag should be mapped too. In a PDF 1.7 or earlier this is normally a type from the |pdf| set, in PDF 2.0 from the |pdf|, |pdf2| or |mathml| set. It can also be a user type, then this user tag must have been declared before. The PDF format allows mapping to be done transitively. But you should be aware that tagpdf can't (or more precisely won't) check if some unusual role mapping makes really sense, this lies in the responsability of the author.
+
+\item[\PrintKeyName{role}] This is the type the tag should be mapped
+ too. In a PDF 1.7 or earlier this is normally a type from the |pdf|
+ set, in PDF 2.0 from the |pdf|, |pdf2| or |mathml| set. It can also
+ be a user type, then this user tag must have been declared
+ before. The PDF format allows mapping to be done transitively. But
+ you should be aware that tagpdf can't (or more precisely won't)
+ check if some unusual role mapping makes really sense, this lies in
+ the responsibility of the author.
-\item[\PrintKeyName{role-namespace}] The default value is the default namespace of the role: |pdf2| for all types in this set, |pdf| for the type which exist only in PDF 1.7, |mathml| for the MathML types, and for previously defined user types whatever namespace has been set there. With this key the value can be overwritten.
+\item[\PrintKeyName{role-namespace}] The default value is the default
+ namespace of the role: |pdf2| for all types in this set, |pdf| for
+ the type which exist only in PDF 1.7, |mathml| for the MathML types,
+ and for previously defined user types whatever namespace has been
+ set there. With this key the value can be overwritten.
- \item[unknown key] An unknown key is interpreted as a |tag/role|, this preserves the old syntax. So this two calls are equivalent:
+ \item[unknown key] An unknown key is interpreted as a |tag/role|,
+ this preserves the old syntax. So this two calls are equivalent:
\begin{taglstlisting}
\tagpdfsetup{add-new-tag = section/H1}
@@ -2127,7 +2216,11 @@ syntax |section/H1| should in most cases do the right thing.
\end{description}
-The exact effects of the keys depend on the PDF version. With PDF 1.7 or older the namespace keys are ignored, with PDF 2.0 the namespace keys are use to setup the correct rolemaps. The |namespace| key is also used to define the default namespace if the type is used as a role or as tag in a structure.
+The exact effects of the keys depend on the PDF version. With PDF 1.7
+or older the namespace keys are ignored, with PDF 2.0 the namespace
+keys are use to setup the correct rolemaps. The |namespace| key is
+also used to define the default namespace if the type is used as a
+role or as tag in a structure.
\subsection{The \texttt{latex} namespace}
@@ -2138,29 +2231,32 @@ tags are role mapped. This is work in progress and bound to change.
\section{Checking parent-child rules}\label{sec:parent-child}
-The \PDF{} references formulate various rules about whether a structure can be
-a child of another structure, e.g. a \texttt{Sect} can not be a child of \texttt{P}.
-In the \PDF{} 1.7 reference this rules were
-rather vage, in the \PDF{} 2.0 reference there is a quite specific matrix,
-which sadly misses some of the tags from \PDF{} 1.7. The now released
-ISO norm 32005 addresses this problem and extends the matrix to cover tags from
-\PDF{} 1.7 and 2.0 (but it still misses the \texttt{math} tag and mathml
-tags).
-
-The rules in the matrix are not a simple allowed/not allowed. Instead some rules determine
-that structure elements
-can appear only once in a parent, or that additional requirements can be found in the
-descriptions of the standard structure types, e.g. \texttt{Caption} often has
-to be the first element in the parent structure, and elements like \texttt{Part} and \texttt{Div}
-inherit restrictions from parent structures.
-External standards like \PDF/UA can add more rules.
-
-Altogether this doesn't make it easy to check if a structure tree is conformant or not without slowing down
-the compilation a lot.
-
-With version 0.98 some first steps to do checks (and to react to the result of a change)
-have been implemented. Some checks will led to warning directly, but the majority
-will only be visible if the log-level is increased.
+The \PDF{} references formulate various rules about whether a
+structure can be a child of another structure, e.g. a \texttt{Sect}
+can not be a child of \texttt{P}. In the \PDF{} 1.7 reference this
+rules were rather vague, in the \PDF{} 2.0 reference there is a quite
+specific matrix, which sadly misses some of the tags from \PDF{}
+1.7. The now released ISO norm 32005 addresses this problem and
+extends the matrix to cover tags from \PDF{} 1.7 and 2.0 (but it still
+misses the \texttt{math} tag and mathml tags).
+
+The rules in the matrix are not a simple allowed/not allowed. Instead
+some rules determine that structure elements can appear only once in a
+parent, or that additional requirements can be found in the
+descriptions of the standard structure types, e.g. \texttt{Caption}
+often has to be the first element in the parent structure, and
+elements like \texttt{Part} and \texttt{Div} inherit restrictions from
+parent structures. External standards like \PDF/UA can add more
+rules.
+
+
+Altogether this doesn't make it easy to check if a structure tree is
+conformant or not without slowing down the compilation a lot.
+
+With version 0.98 some first steps to do checks (and to react to the
+result of a change) have been implemented. Some checks will led to
+warning directly, but the majority will only be visible if the
+log-level is increased.
Typical messages will look then like this
@@ -2172,82 +2268,119 @@ Package tagpdf Info: The rule between parent 'H2 (from subsection/latex)'
(tagpdf) and child 'H1 (from section/latex)' is '-1 ($\emptyset$)'
\end{taglstlisting}
-The descriptions of the parent and childs are rather verbose as the checks have to take role mapping and name spaces into account. The result of a check is a number---negative if the relation is not allowed,
-positive if allowed. The text in the parentheses show the symbols used in the \PDF-matrix.
+
+The descriptions of the parent and child are rather verbose as the checks
+have to take role mapping and name spaces into account. The result of a
+check is a number---negative if the relation is not allowed, positive if
+allowed. The text in the parentheses show the symbols used in the
+\PDF-matrix.
Be aware
\begin{itemize}
-\item This doesn't test all rules, it only implements (hopefully correctly) the matrix.
-\item There can be differences between \PDF~1.7 and 2.0, e.g. \texttt{FENote} is rolemapped to \texttt{Note}
-in \PDF~1.7 and then has different containment rules.
-\item The special tag \texttt{MC} stands for mc-chunks, so \enquote{real content} (the matrix has containments rules for this too).
-\item Currently there is as only negative number \texttt{\textminus1} but that is bound to change, depending on if (and how) it is possible to \enquote{repair} a disallowed parent-child relation.
-\item Warnings can be wrong.
-\end{itemize}
-
+\item This doesn't test all rules, it only implements (hopefully
+ correctly) the matrix.
+\item There can be differences between \PDF~1.7 and 2.0,
+ e.g. \texttt{FENote} is role-mapped to \texttt{Note} in \PDF~1.7 and
+ then has different containment rules.
+\item The special tag \texttt{MC} stands for mc-chunks, so
+ \enquote{real content} (the matrix has containments rules for this
+ too).
-
+\item Currently there is as only negative number \texttt{\textminus1}
+ but that is bound to change, depending on if (and how) it is
+ possible to \enquote{repair} a disallowed parent-child relation.
+\item Warnings can be wrong.
+\end{itemize}
\section{\enquote{Real} space glyphs}\label{sec:spacechars}
-
-TeX uses only spaces (horizontal movements) to separate words. That means that a \PDF{} reader has to use some heuristic when copying text or reflowing the text to decide if a space is meant as a word boundary or e.g. as a kerning. Accessible document should use real space glyphs (U+0032) from a font in such places.
-
-With the key \PrintKeyName{interwordspace} you can activate such space glyphs.
-
-With pdftex this will simply call the primitive \verb+\pdfinterwordspaceon+. pdftex will then insert at various places a char from a font called dummy-space. Attention! This means that at every space there are additional font switches in the \PDF{}: from the current font to the dummy-space font and back again. This will make the \PDF{} larger. As \verb+\pdfinterwordspaceon+ is a primitive function it can't be fine tuned or adapted. You can only turn it on and off and insert manually such a space glyph with \verb+\pdffakespace+.
-
-With luatex (in luamode) |interwordspace| is implemented with a lua-function which is inserted in two callbacks and marks up the places where it seems sensible to inter a space glyph. Later in the process the space glyphs are injected -- the code will take the glyph from the current font if this has a space glyph or switch to the default latin modern font. The current code works reasonable well in normal text.
-|interwordspace| can be used without actually tagging a document.
-
-The key \PrintKeyName{show-spaces} will show lines at the places where in lua mode spaces are inserted and so can help you to find problematic places. For listings -- which have a quite specific handling of spaces -- you can find a suggestion in the example \texttt{ex-space-glyph-listings}.
-
-\emph{Attention:} Even with real spaces copy\& pasting of code doesn't need to give the correct results: you get spaces but not necessarly the right number of spaces. The \PDF{} viewers I tried all copied four real space glyphs as one space. I only got the four spaces with the export to text or xml in the AdobePro.
+TeX uses only spaces (horizontal movements) to separate words. That
+means that a \PDF{} reader has to use some heuristic when copying text
+or reflowing the text to decide if a space is meant as a word boundary
+or e.g. as a kerning. Accessible document should use real space
+glyphs (U+0032) from a font in such places.
+
+With the key \PrintKeyName{interwordspace} you can activate such space
+glyphs.
+
+With pdftex this will simply call the primitive
+\verb+\pdfinterwordspaceon+. pdftex will then insert at various places
+a char from a font called dummy-space. Attention! This means that at
+every space there are additional font switches in the \PDF{}: from the
+current font to the dummy-space font and back again. This will make
+the \PDF{} larger. As \verb+\pdfinterwordspaceon+ is a primitive
+function it can't be fine tuned or adapted. You can only turn it on
+and off and insert manually such a space glyph with
+\verb+\pdffakespace+.
+
+With luatex (in luamode) |interwordspace| is implemented with a
+lua-function which is inserted in two callbacks and marks up the
+places where it seems sensible to inter a space glyph. Later in the
+process the space glyphs are injected -- the code will take the glyph
+from the current font if this has a space glyph or switch to the
+default latin modern font. The current code works reasonable well in
+normal text. |interwordspace| can be used without actually tagging a
+document.
+
+The key \PrintKeyName{show-spaces} will show lines at the places where
+in lua mode spaces are inserted and so can help you to find
+problematic places. For listings -- which have a quite specific
+handling of spaces -- you can find a suggestion in the example
+\texttt{ex-space-glyph-listings}.
+
+\emph{Attention:} Even with real spaces copy\& pasting of code doesn't
+need to give the correct results: you get spaces but not necessarily
+the right number of spaces. The \PDF{} viewers I tried all copied four
+real space glyphs as one space. I only got the four spaces with the
+export to text or xml in the AdobePro.
\begin{docCommand}{pdffakespace}{}\end{docCommand}
-This is in pdftex a primitive. It inserts the dummy space glyph. \pkg{tagpdf} defines this command also for luatex -- attention if can perhaps insert break points.
+This is in pdftex a primitive. It inserts the dummy space glyph.
+\pkg{tagpdf} defines this command also for luatex -- attention if can
+perhaps insert break points.
\section{Structure destinations}\label{sec:struct-dest}
- Standard destinations (anchors for internal links)
- consist of a reference to a page in the pdf and instructions
- how to display it---typically they will put a specific coordinate in the left top corner
- of the viewer and so give the impression that a link jumped to the word in this place.
- But in reality they are not connected to the content.
-
- Starting with pdf~2.0 destinations can in a tagged PDF also point
- to a structure (to a \texttt{/StructElem} object).
- GoTo links can then additionally to the \texttt{/D} key which points to a
- standard page destination also point to such a structure destination with an \texttt{/SD} key.
- Programs that e.g. convert such a PDF to html can then create better links.
- (According to the reference, PDF-viewer should prefer the structure destination
- over the page destination, but as far as it is known this isn't done yet.)
-
- Currently structure destinations (and GoTo links making use of it) could natively only
- be created with the dvipdfmx backend. With pdftex and lualatex it was only possible to create
- a restricted type which used only the \enquote{Fit} mode. Starting with
- \TeX{}live 2022 (earlier in miktex) both engines will knew new keywords which allow
- to create structure destination easily.
-
- Support for this has been already added to the \PDF\ management and
- \pkg{tagpdf} will make use of it if possible. In most cases it should simply
- work, but one should be aware that as one now has a destination that is
- actually tied to the content it gets more important to actually consider the
- context and the place where such destinations are created. It now makes a
- difference if the destination is created before the structure is opened or
- after so in some cases code that place destinations should be changed to
- place them inside the structure they belong too. One also has to consider
- the pages connected to the destinations: The structure destination is bound
- to the page where the structure \emph{begins}, if this differ from the page
- of the page destination (e.g. if the destination is created by a
- \verb+\phantomsection+ in the middle of a longer paragraph) then may be
- necessary to surround destinations with a dummy structure (a Span or an
+ Standard destinations (anchors for internal links) consist of a
+ reference to a page in the pdf and instructions how to display
+ it---typically they will put a specific coordinate in the left top
+ corner of the viewer and so give the impression that a link jumped to
+ the word in this place. But in reality they are not connected to the
+ content.
+
+ Starting with pdf~2.0 destinations can in a tagged PDF also point to a
+ structure (to a \texttt{/StructElem} object). GoTo links can then
+ additionally to the \texttt{/D} key which points to a standard page
+ destination also point to such a structure destination with an
+ \texttt{/SD} key. Programs that e.g. convert such a PDF to html can then
+ create better links. (According to the reference, PDF-viewer should prefer
+ the structure destination over the page destination, but as far as it is
+ known this isn't done yet.)
+
+ At first structure destinations (and GoTo links making use of it) could
+ natively only be created with the dvipdfmx backend. With pdftex and
+ lualatex it was only possible to create a restricted type which used only
+ the \enquote{Fit} mode. Starting with \TeX{}live 2022 (earlier in miktex)
+ both engines knew new keywords which allowed to create structure
+ destination easily and support has been already added to the \PDF\
+ management and \pkg{tagpdf}. In most cases it should simply work, but one
+ should be aware that as one now has a destination that is actually tied to
+ the content it gets more important to actually consider the context and
+ the place where such destinations are created. It now makes a difference
+ if the destination is created before the structure is opened or after so
+ in some cases code that place destinations should be changed to place them
+ inside the structure they belong too. One also has to consider the pages
+ connected to the destinations: The structure destination is bound to the
+ page where the structure \emph{begins}, if this differ from the page of
+ the page destination (e.g. if the destination is created by a
+ \verb+\phantomsection+ in the middle of a longer paragraph) then it may
+ be necessary to surround destinations with a dummy structure (a Span or an
Artifact) to get the right page number.
\section{Storing and reusing boxes}\label{sec:savebox}
@@ -2413,30 +2546,38 @@ tagging commands) the following strategy can be used:
\section{Accessibility is not only tagging}
-
-A tagged \PDF{} is needed for accessibility but this is not enough. As already mentioned there are more requirements:
+A tagged \PDF{} is needed for accessibility but this is not enough. As
+already mentioned there are more requirements:
\begin{itemize}
- \item The language must be declared by adding a \texttt{/Lang xx-XX} to the \PDF{} catalog or -- if the language changes for a part of the text to the structure or the marked content. Setting the document language can be rather easily done with existing packages. With the new \PDF{} resource management it should be done with \verb+\pdfmanagement_add:nnn{Catalog}{Lang}{(en-US)}+. For settings in marked content and structure I will have to add keys.
- \item All characters must have an unicode representation or a suitable alternative text.
- With lualatex and open type (unicode) fonts this is normally not a problem. With pdflatex it could need
- \begin{taglstlisting}
- \input{glyphtounicode}
- \pdfgentounicode=1
- \end{taglstlisting}
-
- and perhaps some\verb+\pdfglyphtounicode+ commands.
+ \item The language must be declared by adding a \texttt{/Lang xx-XX} to
+ the \PDF{} catalog or -- if the language changes for a part of the
+ text to the structure or the marked content. Setting the document
+ language can be done with the \texttt{lang} option of
+ \cs{DocumentMetadata}. For settings in marked content and structure
+ the \texttt{lang} key can be used too.
+
+ \item All characters must have a Unicode representation or a suitable
+ alternative text. With lualatex and open type (Unicode) fonts this
+ is normally not a problem. With pdflatex it could need additional
+ \verb+\pdfglyphtounicode+ commands.
+
\item Hard and soft hyphen must be distinct.
- \item Spaces between words should be space glyphs and not only a horizontal movement. See section~\ref{sec:spacechars}.
- \item Various small infos must be present in the catalog dictionary, info dictionary and the page dictionaries, e.g. metadata like title.
+
+ \item Spaces between words should be space glyphs and not only a
+ horizontal movement. See section~\ref{sec:spacechars}.
+
+ \item Various small infos must be present in the catalog dictionary,
+ info dictionary and the page dictionaries, e.g. metadata like title.
+ This can be done with the options of \cs{DocumentMetadata}. See the
+ documentation of \texttt{l3pdfmeta} for details.
\end{itemize}
-If suitable I will add code for this tasks to this packages. But some of them can also be done already with existing packages like hyperref, hyperxmp, pdfx.
\section{Debugging}
-While developing commands and tagging a document, it can be useful to get some info about the current structure. For this
-a show command is provided
+While developing commands and tagging a document, it can be useful to get
+some info about the current structure. For this a show command is provided
\begin{docCommand}{ShowTagging}{\marg{key-val}}\end{docCommand}
@@ -2474,7 +2615,6 @@ This command takes as argument a key-val list which implements a number of show
\section{To-do}
-
\begin{itemize}
\item Add commands and keys to enable/disable the checks.
\item Check/extend the code for language tags.
@@ -2497,11 +2637,311 @@ This command takes as argument a key-val list which implements a number of show
\item Find someone to check and improve the lua code
\item Move more things to lua in the luamode
\item Find someone to check and improve the rest of the code
-\item Check differences between \PDF{} versions 1.7 and 2.0. (progress: WIP, namespaces done)
+\item Check differences between \PDF{} versions 1.7 and 2.0. (progress:
+ WIP, namespaces done)
\item bidi?
\end{itemize}
+\makeatletter % fix TOC of History
+\addtocontents{toc}{\def\string\l@subsection{\string\@dottedtocline{2}{1.5em}{3em}}}
+\makeatother
+
+
+\section{History}
+
+This section lists important changes during the development of the package.
+More can be found in the \texttt{CHANGELOG.MD} and by checking the git
+commits.
+
+\subsection{Changes in 0.3}
+
+In this version I improved the handling of alternative and actual text. See
+section~\ref{sec:alt}. This change meant that the package relies on the
+module \texttt{l3str-convert}.
+
+I no longer try to (pdf-)escape the tag names: it is a bit unclear how to
+do it at best with luatex. This will perhaps later change again.
+
+\subsection{Changes in 0.5}
+
+I added code to handle attributes and attribute classes, see
+section~\ref{sec:attributes} and corrected a small number of code errors.
+
+I added code to add \enquote{real} space glyphs to the \PDF{}, see section
+\ref{sec:spacechars}.
+
+\subsection{Changes in 0.6}
+
+\textbf{Breaking change!} The attributes used in luamode to mark the
+MC-chunks are no longer set globally. I thought that global attributes
+would make it easier to tag, but it only leads to problem when e.g. header
+and footer are inserted. So from this version on the attributes are set
+locally and the effect of a \verb+\tagmcbegin+ ends with the current group.
+This means that in some cases more \verb+\tagmcbegin+ are needed and this
+affected some of the examples, e.g. the patching commands for sections with
+KOMA. On the other side it means that quite often one can omit the
+\verb+\tagmcend+ command.
+
+
+\subsection{Changes in version 0.61}
+
+\begin{itemize}
+\item internal code adaptions to expl3 changes.
+\item dropped the compresslevel key -- probably not needed.
+\end{itemize}
+
+
+\subsection{Changes in version 0.8}
+
+\begin{itemize}
+\item As a first step to include the code proper in the \LaTeX\ kernel
+ the module name has changed from \texttt{uftag} to \texttt{tag}. The
+ commands starting with |\uftag| will stay valid for some time but
+ then be deprecated.
+
+\item \textbf{Breaking change!} The argument of \texttt{newattribute}
+ option should no longer add the dictionary bracket \verb+<<..>>+,
+ they are added by the code.
+
+
+\item \textbf{Breaking change!} The package now requires the new PDF
+ management as provided for now by the package
+ \pkg{pdfmanagement-testphase}. \pkg{pdfmanagement-testphase},
+ prepares the ground for better support for tagged PDF in \LaTeX{}. It
+ is part of a larger project to automatically generate tagged PDF
+ \url{https://www.latex-project.org/news/2020/11/30/tagged-pdf-FS-study/}
+
+\item Support to add associated files to structures has been added with
+ new keys \texttt{AF}, \texttt{AFinline} and \texttt{AFinline-o}.
+
+\item \textbf{Breaking change!} The support for other 8-bit input
+ encodings has been removed. utf8 is now the required encoding.
+
+\item The keys |lang|, |ref| and |E| have been added for structures.
+
+\item The new hooks of \LaTeX\ are used to tagged many paragraphs
+ automatically. The small red numbers around paragraphs in the
+ documentation show them in action. The main problem here is not to
+ tag a paragraph, but to avoid to tag too many: paragraphs pop up in
+ many places.
+\end{itemize}
+
+\subsection{Changes in version 0.81}
+
+\begin{itemize}
+\item Hook code to tag links (URI and GoTo type) have been added. So
+ normally they should simply work if tagging is activated.
+
+\item Commands and keys to allow automatic paragraph tagging have been
+ added. See section~\ref{sec:paratagging}. As can be seen in this
+ documentation the code works quite good already, but one should be
+ aware that \enquote{paragraphs} can appear in many places and
+ sometimes there are even more paragraph begin than ends.
+
+\item A key to test if local or global setting of the mc-attributes in
+ luamode is more sensible, see \ref{sec:global-local} for more
+ details.
+
+\item New commands to store and reset mc-tags.
+
+\item PDF 2.0 namespaces are now supported.
+\end{itemize}
+
+\subsection{Changes in version 0.82}
+
+A command |\tag_if_active:TF| to test if tagging is active has been added.
+This allow external packages to write conditional code.
+
+The commands |\tag_struct_parent_int:| and |\tag_struct_insert_annot:nn|
+have been added. They allow to add annotations to the structure.
+
+
+\subsection{Changes in version 0.83}
+
+|\tag_finish_structure:| has been removed, it is no longer a public
+command.
+
+\subsection{Changes in version 0.90}
+
+\begin{itemize}
+\item Code has been cleaned up and better documented.
+
+\item \textbf{More engines supported} The generic mode of \pkg{tagpdf}
+ now works (theoretically, it is not much tested) with all engines
+ supported by the \PDF\ management. So compilations with Xe\LaTeX{} or
+ with dvips should work. But it should be noted that these engines and
+ backends don't support the |interspaceword| option. With Xe\LaTeX{}
+ it is perhaps possible implement something with
+ |\XeTeXinterchartoks|, but for the dvips route I don't see an option
+ (apart from lots of manual macros everywhere).
+\item \textbf{MC-attributes are global again} In\sidenote{Breaking
+ change!} version 0.6 the attributes used in luamode to mark the
+ MC-chunks were no longer set globally. This avoided a number of
+ problems with header and footer and background material, but further
+ tests showed that it makes it difficult to correctly mark things like
+ links which have to interrupt the current marking code---the
+ attributes couldn't easily escape groups added by users. See
+ section~\ref{sec:global-local} for more details.
+\item \textbf{key global-mc removed:} Due to the changes in the attribute
+ keys this key is not longer needed.
+\item \textbf{key check-tags removed:} It doesn't fit. Checks are handled
+ over the logging level.
+\item |\tagpdfget| has been removed, use the expl3 version if needed.
+\item The show commands |\showtagpdfmcdata|, |\showtagpdfattributes|,
+ |\showtagstack| have been removed and replaced by a more flexible
+ command |\ShowTagging|.
+\item The commands |\tagmcbegin| and |\tagmcend| no longer ignore
+ following spaces or remove earlier one. While this is nice in some
+ places, it also ate spaces in places where this wasn't expected. From
+ now on both commands behave exactly like the expl3 versions.
+\item The lua-code to add real space glyphs has been separated from the
+ tagging code. This means that |interwordspace| now works also if
+ tagging is not active.
+\item The key |activate| has been added, it open the first structure, see
+ below.
+\end{itemize}
+
+\subsection{Changes in version 0.92}
+
+\begin{itemize}
+\item support for page breaks in pdftex has been added, see
+ section~\ref{sec:splitpara},
+
+
+\item header and footer are tagged as artifacts automatically, see
+ section~\ref{sec:header-footer}.
+
+\item keys \texttt{alttext-o} and \texttt{actualtext-o} has been removed.
+ \texttt{alttext} and \texttt{actualtext} will now expand once.
+
+\end{itemize}
+
+\subsection{Changes in version 0.93}
+
+\begin{itemize}
+\item Support for associated files in the root element (key
+ \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
+ 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
+ the pdf management code. This will simplify the documents as it will
+ no longer be needed to load the package.
+
+\item The package has now support for \enquote{structure destinations}.
+ This is a new type of destinations in \PDF~2.0. For pdftex and luatex
+ this requires new binaries. They will be included in texlive 2022,
+ miktex already has the new pdftex, the new luatex will probably
+ follow soon.
+
+\item The commands \cs{tagpdfifluatexT}, \cs{tagpdfifluatexTF} has been
+ removed \cs{tagpdfifpdftexT},
+
+\end{itemize}
+
+\subsection{Changes in version 0.94}
+
+In this version a small package, \pkg{tagpdf-base} has been added. It
+provides no-op versions of the main expl3 user commands for packages that
+want to support tagging but can't be sure if the \pkg{tagpdf} package has
+been loaded.
+
+\subsection{Changes in version 0.95}
+
+Small bug fixes.
+
+\subsection{Changes in version 0.96}
+
+\begin{itemize}
+\item The \texttt{alttext} key has been renamed to \texttt{alt}, the
+ other key name exists as alias.
+
+\item The new command |\tag_struct_object_ref:n| allows to create the
+ object reference of a structure.
+
+\item a new key \texttt{parent} has been added to allow structures to
+ choose their parent structure.
+
+\item a new option \texttt{paratag} allows to change the tag name used
+ for the automatically tagged paragraphs.
+
+\item the commands |\tag_start:|, |\tag_stop:|, |\tag_stop:n| and
+ |\tag_start:n| allow to stop and start tagging (for example in trial
+ typesetting).
+
+\item Small bug fixes.
+\end{itemize}
+
+\subsection{Changes in version 0.98}
+
+\begin{itemize}
+\item The declarations of tag namespaces have been externalized and are
+ now read from files when \pkg{tagpdf} is loaded.
+
+\item The \PDF{} format (and some of the standards) declare various
+ parent-child rules for structure tags. A first step to implement this
+ rules and check if they are fulfilled have been done. More
+ information can be found in section~\ref{sec:parent-child}.
+
+\item As a side effect of the new rule checking, the requirements for new
+ tags have been tightened: Adding a new tag with add-new-tag now
+ requires that the target role is defined. Unknown roles error.
+
+\item |\tagmcbegin| no longer requires that a tag is set, instead if will
+ pick up the tag name from the surrounding structure.
+
+\item Structure destination are now created also with \PDF
+ \textless\,2.0. They shouldn't harm and can improve the html export.
+
+\end{itemize}
+
+\subsection{Changes in version 0.98a}
+Small bug fixes in code and documentation.
+
+\subsection{Changes in version 0.98b}
+The main change is from now on every structure has an ID and an IDtree is
+added. The ID of a structure can be retrieved with |\tag_get:n|
+see~\ref{sec:retrieve}.
+
+
+\subsection{Changes in version 0.98e}
+
+\begin{itemize}
+\item The main change is that the automatic paratagging uses now a
+ two-level structure. This accompanies development in the \LaTeX\ github
+ in the \texttt{latex-lab} package regarding the tagging of blocks like
+ lists or verbatim. See~\ref{sec:paratagging} and also
+ \texttt{latex-lab-block-tagging.dtx} for more background.
+
+\item The command |tag_struct_end:n| has been add to improve debugging.
+\end{itemize}
+
+\subsection{Changes in version 0.98k}
+
+The luamode has been adapted and now allows also the compilation with
+dvilualatex. By default it will insert specials for \texttt{dvips} into the
+dvi. But be aware that \texttt{dvips} can normally not be used as it can't
+handle open type fonts, and extended version would be needed which isn't in
+texlive yet. It is also possible to use \texttt{dvipdfmx} as backend (which
+already has support for open type fonts), for this you need to use
+\texttt{backend=dvipdfmx} in the \cs{DocumentMetadata} command. Real space
+chars will work, but are currently not taken from the current font. This
+will be improved in the next luaotfload version. The compilation with
+dvilualatex is not much tested yet.
+
+\subsection{Changes in version 0.98l}
+
+In 2023 the primitives to write literal code into the pdf have been
+extended in all engines and now allow to delay the expansion of their
+argument to the shipout. This made it possible to greatly simplify and
+speed up the code used in generic mode to number the MC-chunks. In most
+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.
+
\printbibliography[heading=bibintoc]
@@ -2514,12 +2954,13 @@ This command takes as argument a key-val list which implements a number of show
\section{Some remarks about the \PDF{} syntax}
-This is not meant as a full reference only as a background to make the examples and remarks easier to understand.
-
+This is not meant as a full reference only as a background to make the
+examples and remarks easier to understand.
\begin{description}
-\item[postfix notation] \PDF{} uses in various places postfix notation. This means that the operator is behind its arguments:
+\item[postfix notation] \PDF{} uses in various places postfix
+ notation. This means that the operator is behind its arguments:
\tagpdfparaOff
@@ -2570,17 +3011,31 @@ This is not meant as a full reference only as a background to make the examples
\tagpdfparaOn
-\item[Names] \PDF{} knows a sort of variable called a \enquote{name}. Names start with a slash and may include any regular characters, but not delimiter or white-space characters. Uppercase and lowercase letters are considered distinct: \texttt{/A} and \texttt{/a} are different names. \verb+/.notdef+ and \verb+/Adobe#20Green+ are valid names.
+\item[Names] \PDF{} knows a sort of variable called a
+ \enquote{name}. Names start with a slash and may include any regular
+ characters, but not delimiter or white-space characters. Uppercase
+ and lowercase letters are considered distinct: \texttt{/A} and
+ \texttt{/a} are different names. \verb+/.notdef+ and
+ \verb+/Adobe#20Green+ are valid names.
- Quite a number of the options of \texttt{tagpdf} actually define such a name which is later added to the \PDF{}. I recommend \emph{strongly} not to use spaces and exotic chars in such names. While it is possible to escape such names it is rather a pain when moving them through the various lists and commands and quite probably I forgot some place where it is needed.
+ Quite a number of the options of \texttt{tagpdf} actually define
+ such a name which is later added to the \PDF{}. I recommend
+ \emph{strongly} not to use spaces and exotic chars in such
+ names. While it is possible to escape such names it is rather a pain
+ when moving them through the various lists and commands and quite
+ probably I forgot some place where it is needed.
-\item[Strings]There are two types of strings: \emph{Literal strings} are enclosed in round parentheses. They normally contain a mix of ascii chars and octal numbers:
+\item[Strings]There are two types of strings: \emph{Literal strings}
+ are enclosed in round parentheses. They normally contain a mix of
+ ascii chars and octal numbers:
\verb+(gr\374\377ehello[]\050\051)+.
- \emph{Hexadezimal strings} are enclosed in angle brackets. They allow for a representation of all characters the whole unicode ranges. This is the default output of lualatex.
+ \emph{Hexadezimal strings} are enclosed in angle brackets. They
+ allow for a representation of all characters the whole Unicode
+ ranges. This is the default output of lualatex.
\texttt{<003B00600243013D0032>}.
@@ -2588,7 +3043,11 @@ This is not meant as a full reference only as a background to make the examples
-\item[Arrays] Arrays are enclosed by square brackets. They can contain all sort of objects including more arrays. As an example here an array which contains five objects: a number, an object reference, a string, a dictionary and another array. Be aware that despite the spaces \texttt{15 0 R} is \emph{one} element of the array.
+\item[Arrays] Arrays are enclosed by square brackets. They can contain
+ all sort of objects including more arrays. As an example here an
+ array which contains five objects: a number, an object reference, a
+ string, a dictionary and another array. Be aware that despite the
+ spaces \texttt{15 0 R} is \emph{one} element of the array.
\mbox{\texttt{[0 15 0 R (hello) <</Type /X>> [1 2 3]]}}
@@ -2609,11 +3068,14 @@ This is not meant as a full reference only as a background to make the examples
\tagpdfparaOn
-\item[Dictionaries]
-Dictionaries are enclosed by double angle brackets. They contain key-value pairs. The key is always a name. The value can be all sort of objects including more dictionaries. It doesn't matter in which order the keys are given.
+\item[Dictionaries] Dictionaries are enclosed by double angle
+ brackets. They contain key-value pairs. The key is always a
+ name. The value can be all sort of objects including more
+ dictionaries. It doesn't matter in which order the keys are given.
- Dictionaries can be written all in one line:\\ \texttt{<</Type/Page/Contents 3 0 R/Resources 1 0 R/Parent 5 0 R>>}\\
- but at least for examples a layout with line breaks and indentation is more readable:
+ Dictionaries can be written all in one line:\\
+ \texttt{<</Type/Page/Contents 3 0 R/Resources 1 0 R/Parent 5 0 R>>}\\
+ but at least for examples a layout with line breaks and indentation is more readable:
\begin{taglstlisting}
<<
@@ -2628,12 +3090,30 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
- \item[(indirect) objects] These are enclosed by the keywords \texttt{obj} (which has two numbers as prefix arguments) and \texttt{endobj}. The first argument is the object number, the second a generation number -- if a \PDF{} is edited objects with a larger generation number can be added. As with pdflatex/lualatex the \PDF{} is always new we can safely assume that the number is always 0. Objects can be referenced in other places with the \texttt{R} operator. The content of an object can be all sort of things.
+ \item[(indirect) objects] These are enclosed by the keywords
+ \texttt{obj} (which has two numbers as prefix arguments) and
+ \texttt{endobj}. The first argument is the object number, the
+ second a generation number -- if a \PDF{} is edited objects with a
+ larger generation number can be added. As with pdflatex/lualatex
+ the \PDF{} is always new we can safely assume that the number is
+ always 0. Objects can be referenced in other places with the
+ \texttt{R} operator. The content of an object can be all sort of
+ things.
- \item[streams] A stream is a sequence of bytes. It can be long and is used for the real content of \PDF{}: text, fonts, content of graphics.
- A stream starts with a dictionary which at least sets the \texttt{/Length} name to the length of the stream followed by the stream content enclosed by the keywords \texttt{stream} and \texttt{endstream}.
+ \item[streams] A stream is a sequence of bytes. It can be long and is
+ used for the real content of \PDF{}: text, fonts, content of
+ graphics. A stream starts with a dictionary which at least sets the
+ \texttt{/Length} name to the length of the stream followed by the
+ stream content enclosed by the keywords \texttt{stream} and
+ \texttt{endstream}.
- Here an example of a stream, an object definition and reference. In the object 2 (a page object) the \texttt{/Contents} key references the object 3 and this then contains the text of the page in a stream. \texttt{Tf}, \texttt{Tm} and \texttt{TJ} are (postfix) operators, the first chooses the font with the name \texttt{/F15} at the size 10.9, the second displaces the reference point on the page and the third inserts the text.
+ Here an example of a stream, an object definition and reference. In the
+ object 2 (a page object) the \texttt{/Contents} key references the
+ object 3 and this then contains the text of the page in a stream.
+ \texttt{Tf}, \texttt{Tm} and \texttt{TJ} are (postfix) operators, the
+ first chooses the font with the name \texttt{/F15} at the size 10.9,
+ the second displaces the reference point on the page and the third
+ inserts the text.
\begin{taglstlisting}
% a page object (shortened)
@@ -2657,9 +3137,12 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
endobj
\end{taglstlisting}
- In such a stream the \texttt{BT}--\texttt{ET} pair encloses texts while drawing and graphics are outside of such pairs.
+ In such a stream the \texttt{BT}--\texttt{ET} pair encloses texts while
+ drawing and graphics are outside of such pairs.
-\item[Number tree] This is a more complex data structure that is meant to index objects by numbers. In the core is an array with number-value pairs. A simple version of number tree which has the keys 0 and 3 is
+\item[Number tree] This is a more complex data structure that is meant to
+ index objects by numbers. In the core is an array with number-value
+ pairs. A simple version of number tree which has the keys 0 and 3 is
\begin{taglstlisting}
6 0 obj
@@ -2672,10 +3155,11 @@ Dictionaries are enclosed by double angle brackets. They contain key-value pairs
endobj
\end{taglstlisting}
-This maps 0 to an array and 2 to the object reference \texttt{21 0 R}. Number trees can be split over various nodes -- root, intermediate and leaf nodes. We will need such a tree for the \emph{parent tree}.
+This maps 0 to an array and 2 to the object reference \texttt{21 0 R}.
+Number trees can be split over various nodes -- root, intermediate and
+leaf nodes. We will need such a tree for the \emph{parent tree}.
\end{description}
\end{document}
-%http://msf.mathmlcloud.org/file_formats/8 %sample \PDF{} for math
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index c9d62205f5..91df3a4761 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} {2023-11-19} {0.98q}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-12-18} {0.98r}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
@@ -68,10 +68,11 @@
\endblockenv
}
- % ======== marginnote ==========
+% ======== marginnote ==========
% TODO marginnote has a bug (a \par is missing) so it messes up tagging.
% but currently unneeded as we marked them up as artifacts anyway as they don't contain
% meaningful contents
+\renewcommand*{\mn@parboxrestore}{\tagpdfparaOff}%
\NewDocumentCommand\sidenote{m}
{
@@ -95,13 +96,42 @@
\AddToHook{env/tcolorbox/begin}{\tagpdfparaOff \tcbset{before upper=\tagpdfparaOn}}
\AddToHook{env/tcolorbox/after}{\par\tagstructend}
-% this is not good and only temporary, but it is still unclear how to handle internal lists.
-\ExplSyntaxOn
-\AddToHook{env/docCommand/before}{\par\tagtool{para=false}\tagstructbegin{tag=Code}\tagmcbegin{}\tag_stop:}
-\AddToHook{env/docCommand/after}{\par\tag_start:\tagmcend\tagstructend\tagtool{para=true}}
-\ExplSyntaxOff
+% ========= doc Commands from tcolorbox
+% Not sure if this is generally usable but one must avoid tagstop if there can
+% be a pagebreak
+\DeclareInstance{blockenv}{docCommand}{display}
+{
+ env-name = docCommand,
+ tag-name = Div,
+ tag-class = ,
+ tagging-recipe = standalone,
+ inner-level-counter = ,
+ level-increase = false,
+ setup-code = ,
+ block-instance = displayblock ,
+}
-%\AddToHook{env/docCommand/begin}{\tagpdfparaOff \tcbset{before upper=\tagpdfparaOn}\tagtool{paratag=Code}\tagtool{para-flattened=true}}
+\RenewDocumentEnvironment{tcb@manual@entry}{}
+ {\UseInstance{blockenv}{docCommand}
+ {tag-name=Div,
+ leftmargin=\kvtcb@doc@left,
+ rightmargin=\kvtcb@doc@right,
+ }%
+ \tagtool{para=false}%
+ \AssignSocketPlug{tagsupport/minipage/before}{noop}
+ \AssignSocketPlug{tagsupport/minipage/after}{noop}
+ \AssignSocketPlug{tagsupport/parbox/before}{noop}
+ \AssignSocketPlug{tagsupport/parbox/after}{noop}
+ }
+ {\endblockenv }
+
+\tcbset{
+ doc head command=
+ {before upper=\tagstructbegin{tag=Code}\tagmcbegin{},
+ after upper=\tagmcend\tagstructend},
+ }
+
+
% ======= footnote ========
% done in testphase code
@@ -145,8 +175,20 @@
{bbox}{/O /Layout /BBox [0 0 100 100]}
}
-
-%====== floats ========
+% ======= 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}
\endinput