summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tagpdf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-08-07 22:06:23 +0000
committerKarl Berry <karl@freefriends.org>2018-08-07 22:06:23 +0000
commit706448acbd096e1a59cb987e8352abdd43624ebe (patch)
treeb15d896ae27ff72a04f6ffcdc9ed0fc2ccdc689b /Master/texmf-dist/doc/latex/tagpdf
parent23fec857e8f705b5595264d42d1265077d09654d (diff)
tagpdf (7aug18)
git-svn-id: svn://tug.org/texlive/trunk@48366 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tagpdf')
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/README.md4
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext-luatex.pdfbin0 -> 28826 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.pdfbin0 -> 29475 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.tex181
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem-luatex.pdfbin0 -> 7160 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem.tex59
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.pdfbin21006 -> 20713 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.tex9
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luatex.pdf (renamed from Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf)bin17034 -> 17047 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf64
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex8
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.pdfbin0 -> 5918 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.tex40
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdfbin12590 -> 12455 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.tex12
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdfbin298948 -> 308208 bytes
-rw-r--r--Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex93
17 files changed, 424 insertions, 46 deletions
diff --git a/Master/texmf-dist/doc/latex/tagpdf/README.md b/Master/texmf-dist/doc/latex/tagpdf/README.md
index 3801de04b0c..7519cf76fb9 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/README.md
+++ b/Master/texmf-dist/doc/latex/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.2
-Packagedate: 2018/07/09
+Packageversion: 0.3
+Packagedate: 2018/08/06
Author: Ulrike Fischer
## License
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext-luatex.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext-luatex.pdf
new file mode 100644
index 00000000000..048d685cffe
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext-luatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.pdf
new file mode 100644
index 00000000000..2a9bd8480b8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.tex b/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.tex
new file mode 100644
index 00000000000..38185f5d4ce
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-alt-actualtext.tex
@@ -0,0 +1,181 @@
+% !Mode:: "TeX:DE:UTF-8:Main"
+%\input{regression-test}
+\documentclass{article}
+\usepackage{tagpdf}
+\tagpdfsetup{tabsorder=structure,
+ uncompress,activate-all}
+\tagpdfifpdftexT
+ {
+ %set language / can also be done with hyperref
+ \pdfcatalog{/Lang (de-DE)}
+ \usepackage[T1]{fontenc}
+ \input glyphtounicode
+ \pdfgentounicode=1
+ }
+
+\tagpdfifluatexT
+ {
+ %set language / can also be done with hyperref
+ \pdfextension catalog{/Lang (de-DE)}
+ \usepackage{fontspec}
+ \usepackage{unicode-math}
+ \usepackage{luacode}
+ \newfontface\zerowidthfont{freeserif}
+ }
+
+\usepackage{graphicx}
+% This is not a perfectly tagged document!
+% one sentence is not marked (luatex will mark it as artifact)
+% with pdflatex there is a encoding problem with the math
+
+\begin{document}
+\pagestyle{empty}
+
+\tagstructbegin{tag=Document}
+
+%This isn't read by voice software
+Etwas unmarkierter Text.
+
+%This read ok by voice software
+\tagstructbegin{tag=P}
+ \tagmcbegin{tag=P}
+ Ein Satz ohne Umlaute.
+ \tagmcend
+\tagstructend
+
+%This read ok by nvda, but adobe has difficulties with the umlauts
+\tagstructbegin{tag=P}
+ \tagmcbegin{tag=P}
+ Grüße an die Welt und die öde Wüste.
+ \tagmcend
+\tagstructend
+
+\newpage
+% alttext is read,
+% actualtext copy & pasted
+\tagstructbegin{tag=P,alttext=Dies ist ein Text,actualtext=Copy}
+ \tagmcbegin{tag=P}
+ Test
+ \tagmcend
+\tagstructend
+
+%alttext is read,
+%actualtext copy & pasted
+\tagstructbegin{tag=P}
+ \tagmcbegin{tag=P,alttext=Dies ist ein zweiter Text,actualtext=Copy}
+ Test
+ \tagmcend
+\tagstructend
+
+
+%nvda: alttext of structure is read
+%adobe: alttext of inner mc is read
+% result of copy & paste of this page in adobe reader:
+% why twice??????
+% Copy Copy
+% Copy Copy
+% Copystruct Copystruct
+
+\tagstructbegin{tag=P,alttext=Dies ist der Structuretext,actualtext=Copystruct}
+ \tagmcbegin{tag=P,alttext=Dies ist der innere Text,actualtext=Copymc}
+ Test
+ \tagmcend
+\tagstructend
+
+
+
+\newpage
+% test of "Formula" tag:
+% content is more or less ignored. This is not against the documentation:
+% Formula is explicitly describes as an "illustration", something with a content
+% which can not be read directly.
+% But it is a problem that nvda ignores it even with an alt text.
+
+%test of Formula tag + alttext in the mc
+%pdflatex
+%nvda: content is ignored
+%adobe: reads the alt text but without {} and ()
+
+%luatex (unicode-math):
+% nvda: doesn't read
+%adobe: doesn't read (warning "empty page")
+
+\tagstructbegin{tag=Formula}
+ \tagmcbegin {tag=Formula,alttext={\frac{a}{b}+c + \int_1^n f(x)}}
+ xxx $\frac{a}{b}+c + \int_1^n f(x)$
+ \tagmcend
+\tagstructend
+
+\newpage
+
+%test of Formula tag + alttext in the struct
+\tagstructbegin{tag=Formula,alttext=Dies ist eine Formel}
+ \tagmcbegin {tag=Formula}
+ formula
+ \tagmcend
+\tagstructend
+
+\newpage
+% test of Formula tag without alttext
+% pdflatex
+% adobe: reads it more or less (without commands naturally)
+% nvda: ignores it
+
+%lualatex
+%nvda: ignores it
+%adobe: ignores it
+
+\tagstructbegin{tag=Formula}
+ \tagmcbegin {tag=Formula}
+ formula: $\frac{a}{b}+c + \int_1^n f(x)$
+ \tagmcend
+\tagstructend
+
+\newpage
+% luatex:
+% nvda: reads the alttext ok, {} and () are only read if the symbol level is (at leat) "most"
+% adobe: something is read but it is not understable
+
+\tagstructbegin{tag=P}
+ \tagmcbegin {tag=P,alttext={\frac{x}{y}+c + \int_1^n f(x)}}
+ $\frac{x}{y}+c + \int_1^n f(x)$
+ \tagmcend
+\tagstructend
+
+%pdftex
+% sum is read as "pi"
+%luatex
+%adobe: almost nothing read (only 1 and =)
+%nvda: similar, obviously both have problems with the unicode math symbols
+\tagstructbegin{tag=P}
+ \tagmcbegin {tag=P}
+ $\sum_1^n (1) = n $
+ \tagmcend
+\tagstructend
+
+\newpage
+
+\tagmcbegin{tag=P,
+ actualtext=Ente,
+ alttext=Dies ist eine Ente}
+ %% a char is needed so that actualtext works,
+ \tagpdfifluatexTF
+ {{\zerowidthfont^^^^200c}}%
+ {\makebox[0pt][l]{.}}%
+ %it seems not to be needed for alttext and voice software ....
+ \includegraphics[width=1cm]{example-image-duck}
+\tagmcend
+
+\tagmcbegin{tag=P,
+ actualtext=Ente,
+ alttext=Dies ist eine zweite Ente}
+ %% a char is needed so that actualtext works,
+ %\tagpdfifluatexTF
+ % {{\zerowidthfont^^^^200c}}%
+ % {\makebox[0pt][l]{.}}%
+ %it seems not to be needed for alttext and voice software ....
+ \includegraphics[width=1cm]{example-image-duck}
+\tagmcend
+
+\tagstructend
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem-luatex.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem-luatex.pdf
new file mode 100644
index 00000000000..c79f34e4db8
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem-luatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem.tex b/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem.tex
new file mode 100644
index 00000000000..55f9c95c370
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-formula-problem.tex
@@ -0,0 +1,59 @@
+% !Mode:: "TeX:DE:UTF-8:Main"
+\documentclass{article}
+\usepackage{tagpdf}
+\tagpdfsetup{tabsorder=structure,
+ uncompress,activate-all}
+\tagpdfifpdftexT
+ {
+ %set language / can also be done with hyperref
+ \pdfcatalog{/Lang (de-DE)}
+ \usepackage[T1]{fontenc}
+ \input glyphtounicode
+ \pdfgentounicode=1
+ }
+
+\tagpdfifluatexT
+ {
+ %set language / can also be done with hyperref
+ \pdfextension catalog{/Lang (de-DE)}
+ \usepackage{fontspec}
+ \usepackage{unicode-math}
+ \usepackage{luacode}
+ \newfontface\zerowidthfont{freeserif}
+ }
+
+\usepackage{graphicx}
+% ndva doesn't read the alt text of the formulas
+\begin{document}
+\pagestyle{empty}
+
+\tagstructbegin{tag=Document}
+
+\tagstructbegin{tag=P}
+ \tagmcbegin{tag=P}
+ Ein Satz ohne Umlaute.
+ \tagmcend
+\tagstructend
+
+\tagstructbegin{tag=Formula}
+ \tagmcbegin {tag=Formula,alttext={Dies ist eine Formel}}
+ formula
+ \tagmcend
+\tagstructend
+
+\newpage
+
+\tagstructbegin{tag=P}
+ \tagmcbegin{tag=P}
+ Ein Satz ohne Umlaute.
+ \tagmcend
+\tagstructend
+
+\tagstructbegin{tag=Formula,alttext=Dies ist eine zweite Formel}
+ \tagmcbegin {tag=Formula}
+ formula
+ \tagmcend
+\tagstructend
+
+\tagstructend
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.pdf
index f2752408fb5..23c6c0d6921 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.tex b/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.tex
index e7001f88ed0..9b611c41546 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-mc-manual-para-split.tex
@@ -1,4 +1,11 @@
% !Mode:: "TeX:DE:UTF-8:Main"
+
+% !!!!!!!!!!!!!!!!!
+% This test files shows how to add a manual page split.
+% It *only* handles the mc-step in the page stream.
+% Structure commands and all the related management are not
+% involved. So it also only uses activate-mc.
+
\documentclass{book}
\usepackage[english,ngerman]{babel}
\usepackage{tagpdf}
@@ -18,7 +25,7 @@
\tagpdfsetup{tabsorder=structure,
- activate-all,
+ activate-mc,
uncompress
}
\newsavebox\mybox
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luatex.pdf
index 238fdba9da5..9cc1417cfec 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luamode.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma-luatex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf
index 495b2eb4aef..e75c8e7d216 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.pdf
@@ -639,7 +639,7 @@ endobj
<< /Type /StructElem /S /H4 /P 4 0 R /K <</Type /MCR /Pg 39 0 R /MCID 3>>>>
endobj
43 0 obj
-<< /Type /StructElem /S /P /P 4 0 R /K <</Type /MCR /Pg 39 0 R /MCID 4>>>>
+<< /Type /StructElem /S /P /P 4 0 R /K <</Type /MCR /Pg 39 0 R /MCID 4>> /ActualText <FEFF0061006200630021>>>
endobj
1 0 obj
<< /Type /StructTreeRoot /K 4 0 R /ParentTree 2 0 R /RoleMap 3 0 R>>
@@ -1193,18 +1193,18 @@ endobj
endobj
66 0 obj
<<
-/Producer (pdfTeX-1.40.19)
+/Producer (MiKTeX pdfTeX-1.40.19)
/Creator (TeX)
-/CreationDate (D:20180709211858+02'00')
-/ModDate (D:20180709211858+02'00')
+/CreationDate (D:20180806192039+02'00')
+/ModDate (D:20180806192039+02'00')
/Trapped /False
-/PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX) kpathsea version 6.3.0)
+/PTEX.Fullbanner (This is MiKTeX-pdfTeX 2.9.6668 (1.40.19))
>>
endobj
xref
0 67
0000000000 65535 f
-0000009949 00000 n
+0000009984 00000 n
0000007538 00000 n
0000007722 00000 n
0000007742 00000 n
@@ -1228,9 +1228,9 @@ xref
0000009298 00000 n
0000005852 00000 n
0000000015 00000 n
-0000078300 00000 n
-0000077660 00000 n
-0000078460 00000 n
+0000078335 00000 n
+0000077695 00000 n
+0000078495 00000 n
0000006132 00000 n
0000005993 00000 n
0000005934 00000 n
@@ -1249,32 +1249,32 @@ xref
0000009858 00000 n
0000007420 00000 n
0000006764 00000 n
-0000078140 00000 n
-0000077980 00000 n
-0000077820 00000 n
-0000077515 00000 n
-0000010033 00000 n
-0000010151 00000 n
-0000010594 00000 n
-0000011032 00000 n
-0000011483 00000 n
-0000011905 00000 n
-0000026874 00000 n
-0000027145 00000 n
-0000040400 00000 n
-0000040637 00000 n
-0000054167 00000 n
-0000054415 00000 n
-0000067219 00000 n
-0000067463 00000 n
-0000077270 00000 n
-0000078546 00000 n
-0000078659 00000 n
+0000078175 00000 n
+0000078015 00000 n
+0000077855 00000 n
+0000077550 00000 n
+0000010068 00000 n
+0000010186 00000 n
+0000010629 00000 n
+0000011067 00000 n
+0000011518 00000 n
+0000011940 00000 n
+0000026909 00000 n
+0000027180 00000 n
+0000040435 00000 n
+0000040672 00000 n
+0000054202 00000 n
+0000054450 00000 n
+0000067254 00000 n
+0000067498 00000 n
+0000077305 00000 n
+0000078581 00000 n
+0000078694 00000 n
trailer
<< /Size 67
/Root 65 0 R
/Info 66 0 R
-/ID [<81DC649643DA754F285C6A424525246A> <81DC649643DA754F285C6A424525246A>] >>
+/ID [<D5F0F02AEB96408AC9CC20B0806114F4> <D5F0F02AEB96408AC9CC20B0806114F4>] >>
startxref
-78926
+78916
%%EOF
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex b/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex
index 6fccf189d4a..5558f9f2852 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-patch-sectioning-koma.tex
@@ -11,18 +11,20 @@
\documentclass{scrbook}
\usepackage[english]{babel}
-%set language / can also be done with hyperref
-\pdfcatalog{/Lang (en-US)}
\usepackage{tagpdf}
\tagpdfifpdftexT
{
+ %set language / can also be done with hyperref
+ \pdfcatalog{/Lang (en-US)}
\usepackage[T1]{fontenc}
}
\tagpdfifluatexT
{
+ %set language / can also be done with hyperref
+ \pdfextension catalog{/Lang (en-US)}
\usepackage{fontspec}
\usepackage{luacode}
}
@@ -158,7 +160,7 @@
\subsection{subsection}
\subsubsection{subsubsection}
- \tagstructbegin{tag=P}
+ \tagstructbegin{tag=P,actualtext=abc!}
\tagmcbegin{tag=P}
a paragraph\par x
\tagmcend
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.pdf
new file mode 100644
index 00000000000..693ecaa3432
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.tex b/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.tex
new file mode 100644
index 00000000000..20f002258b9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-softhyphen.tex
@@ -0,0 +1,40 @@
+% !Mode:: "TeX:DE:UTF-8:Main"
+% !! needs lualatex
+% this sets the hyphen used by automatic hyphenation to 00AD
+% this improves copy&pasting
+% the example gives aaaaaaa-aaaaaaaaaaaaa-aaaaaa Ministerpräsident
+% when copied from adobe
+% open problem: line ends are not copy&pasted as spaces.
+% see also pull request #1, branch fake-space
+
+\documentclass{book}
+
+\usepackage[ngerman]{babel} %to get some hyphenation
+\usepackage{tagpdf}
+\tagpdfsetup{tabsorder=structure,
+ activate-all, %deactivate to see the difference
+ uncompress
+ }
+\usepackage{lipsum}%
+\usepackage{fontspec}
+
+\prehyphenchar`\^^ad
+
+\pagestyle{empty}
+\textwidth=1cm
+\begin{document}
+\tagstructbegin{tag=Document}
+ \tagstructbegin{tag=P}
+ \tagmcbegin{tag=P}
+ aaaaaaa-aaaaaa aaaaaaa-aaaaaa
+ \tagmcend
+ \tagstructend
+
+ \tagstructbegin{tag=P}
+ \tagmcbegin{tag=P}
+ Ministerpräsident
+ \tagmcend
+ \tagstructend
+\tagstructend
+\end{document}
+
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdf b/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdf
index 71a860bda76..07932412295 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.tex b/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.tex
index 8a0bfd1d642..3be554465cb 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/ex-tagpdf-template.tex
@@ -1,27 +1,37 @@
% !Mode:: "TeX:DE:UTF-8:Main"
+%this is more or less minimal template that can be used as starting point
+%it doesn't set everything that would be needed!
\documentclass{scrartcl}
\usepackage[english]{babel}
\usepackage{tagpdf}
\tagpdfifpdftexT
{
+ \pdfcatalog{/Lang (en-UK)}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
}
\tagpdfifluatexT
{
+ \pdfextension catalog{/Lang (en-UK)}
\usepackage{fontspec}
}
\tagpdfsetup
{
+ tabsorder=structure,
activate-all,
uncompress
}
\begin{document}
+\pagestyle{empty} %
+\tagstructbegin{tag=Document}
-blbl
+\tagmcbegin{tag=P}
+ a paragraph
+\tagmcend
+\tagstructend
\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
index 0d2d8b22388..1a2efc07462 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
index 36c1cf852f5..5b377f40058 100644
--- a/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
+++ b/Master/texmf-dist/doc/latex/tagpdf/tagpdf.tex
@@ -1,6 +1,7 @@
% !Mode:: "TeX:DE:UTF-8:Main"
\makeatletter
-\def\UlrikeFischer@package@version{0.2}
+\def\UlrikeFischer@package@version{0.3}
+\def\UlrikeFischer@package@date{2018/08/06}
\makeatother
\documentclass[DIV=12,parskip=half-,bibliography=totoc]{scrartcl}
\usepackage[utf8]{inputenc}
@@ -15,7 +16,8 @@
\renewcommand\ttdefault{lmtt}
\usepackage{tcolorbox}
\usepackage{ydoc-desc}
-\usepackage{tabularx, marginnote}
+\usepackage{tabularx}
+\usepackage[noparboxrestore]{marginnote}
\reversemarginpar
\usepackage{tikz}
\usetikzlibrary{positioning}
@@ -31,6 +33,7 @@
\divide\parsep by 2\relax}
\makeatother
\title{The \pkg{tagpdf} package, v\csname UlrikeFischer@package@version\endcsname}
+\date{\csname UlrikeFischer@package@date\endcsname}
\author{Ulrike Fischer\thanks{fischer@troubleshooting-tex.de}}
\usepackage{listings}
\lstset{basicstyle=\ttfamily, columns=fullflexible,language=[LaTeX]TeX}
@@ -44,7 +47,7 @@
\begin{tcolorbox}[colframe=red]
This package is not meant for normal document production.
-You need a current expl3 version to use it.
+You need a current expl3 version to use it, you even need the (experimental) \texttt{l3str-convert}.
This package is incomplete, experimental and quite probably contains bugs.
@@ -136,6 +139,11 @@ Feedback, contribuations and corrections are welcome!
All examples should use the tagpdfsetup key \PrintKeyName{uncompress} described in the next section so that uncompressed pdf are created and the internal objects and structures can be inspected and -- hopefully soon -- be compared by the l3build checks.
+\subsection{Changes in 0.3}
+
+In this version I improved the handling of alternative and actual text. See section~\ref{sec:alttext}. This change means that the package now relies on the experimental expl3 package \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.
\section{Setup}
@@ -171,6 +179,7 @@ The key-val list understands the following keys:
\item[\PrintKeyName{add-new-tag}] See section \ref{sec:new-tag} for a description.
\item[\PrintKeyName{check-tags}] Boolean, initially true. Activates some safety checks (but doesn't very much currently. It will perhaps be merged with the log-level key).
\item[\PrintKeyName{compresslevel}] Value is an integer between 0 and 9. It sets both the pdfcompresslevel and the pdfobjcompresslevel.
+\item[\PrintKeyName{inputencoding}] Some keys convert their value and so need to know the encoding of the file. The default encoding is utf8. When using pdflatex you can switch to another encoding with this key. The value should be one of names allowed by \texttt{l3str}. There is no checking that the name is valid (I don't think that it sensible to use something else than utf8).
\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{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,\marginnote{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.
@@ -361,7 +370,8 @@ Such markers should not be nested. The command will warn you if this happens.
The key-val list understands the following keys:
\begin{description}
- \item[\PrintKeyName{tag}] This is required, unless you use the \PrintKeyName{artifact} key. The value of the key is normally one of the standard type listed in section \ref{sec:new-tag}. It is possible to setup new tags, see the same section.
+ \item[\PrintKeyName{tag}] This is required, unless you use the \PrintKeyName{artifact} key. The value of the key is normally one of the standard type listed in section \ref{sec:new-tag}. It is possible to setup new tags, see the same section. The value of the key is expanded, so it can be a command. The expansion is passed unchanged to the pdf, so it should with a starting slash give a valid pdf name (some ascii with numbers like \texttt{H4} is fine).
+
\item[\PrintKeyName{artifact}] This will setup the marked content as an artifact. The key should be used for content that should be ignored. The key can take one of the values \PrintKeyName{pagination}, \PrintKeyName{layout}, \PrintKeyName{page}, \PrintKeyName{background} and \PrintKeyName{notype} (this is the default). Text in the header and footer should be marked with \PrintKeyName{artifact=pagination}.
It is not quite clear if rules and other decorative graphical objects needs to be marked up as artifacts. Acrobat seems not to mind if not, but PAC~3 complained.
@@ -374,6 +384,28 @@ The key-val list understands the following keys:
\item[\PrintKeyName{label}] This key sets a label by which you can call the marked content later in another structure (if it has been stashed with the previous key). Internally the label name will start with \texttt{tagpdf-}.
+ \item[\PrintKeyName]{alttext}] This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded.
+
+ \item[\PrintKeyName]{alttext-o} This key inserts an \texttt{/Alt} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName]{alttext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). That means that you do something like this:
+
+ \begin{lstlisting}
+ \newcommand\myalttext{\frac{a}{b}}
+ \tagmcbegin{tag=P,alttext-o=\myalttext}
+ \end{lstlisting}
+
+ and it will insert \verb+\frac{a}{b}+ (hex encoded) in the pdf.
+
+ \item[\PrintKeyName]{actualtext}] This key inserts an \texttt{/ActualText} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded.
+
+ \item[\PrintKeyName]{actualtext-o} This key inserts an \texttt{/ActualText} value in the property dictionary of the BDC operator. See section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName]{actualtext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). That means that you do something like this:
+
+ \begin{lstlisting}
+ \newcommand\myactualtext{X}
+ \tagmcbegin{tag=P,alttext-o=\myactualtext}
+ \end{lstlisting}
+
+ and it will insert \verb+X+ (hex encoded) in the pdf.
+
\item[\PrintKeyName{raw}] This key allows you to add more entries to the properties dictionary. The value must be correct, low-level pdf. E.g. \verb+raw=/Alt (Hello)+ will insert an alternative Text. (I will probably add keys for \texttt{/Alt} and \texttt{/Actualtext} later, but I haven't made up my mind regarding the encoding yes).
\end{description}
@@ -426,6 +458,8 @@ If this is really the way to go one would need some script to add the mark-up as
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. More investigations are needed here.
+See also section~\ref{sec:alttext} for some more remarks and tests.
+
\subsubsection{Split paragraphs}\label{sec:splitpara}
A\marginnote{Generic mode only} problem 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.
@@ -503,7 +537,31 @@ The key-val list understands the following keys:
\item[\PrintKeyName{tag}] This is required. The value of the key is normally one of the standard type listed in section \ref{sec:new-tag}. It is possible to setup new tags/types, see the same section.
\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 you can use the structure later in another structure. Internally the label name will start with \texttt{tagpdfstruct-}.
- \item[\PrintKeyName{title},\PrintKeyName{alttext},\PrintKeyName{actualtext}] These keys allow to set the dictionary entries \texttt{/Title}, \texttt{/Alt} and \texttt{/Actualtext}. But I haven't yet decided which is the suitable format for the values, so currently you must ensure yourself that the values lead to valid pdf content.
+ \item[\PrintKeyName{alttext}] This key inserts an \texttt{/Alt} value in the dictionary of structure object. See section~\ref{sec:alttext}. The value is handled as verbatim string and hex encoded.
+
+ \item[\PrintKeyName{alttext-o}] This key inserts an \texttt{/Alt} value in the dictionary of structure object. See section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName]{alttext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). That means that you do something like this:
+
+ \begin{lstlisting}
+ \newcommand\myalttext{\frac{a}{b}}
+ \tagstructbegin{tag=P,alttext-o=\myalttext}
+ \end{lstlisting}
+
+ and it will insert \verb+\frac{a}{b}+ (hex encoded) in the pdf.
+
+ \item[\PrintKeyName{actualtext}] This key inserts an \texttt{/ActualText} value in the dictionary of structure object. See section~\ref{sec:alttext}. The value is handled as verbatim string, commands are not expanded.
+
+ \item[\PrintKeyName{actualtext-o}] This key inserts an \texttt{/ActualText} value in the dictionary of structure object. See section~\ref{sec:alttext}. The value is handled as verbatim string like the key \PrintKeyName]{actualtext} but expanded once (the \texttt{o} refers to the \texttt{o} type in expl3). That means that you do something like this:
+
+ \begin{lstlisting}
+ \newcommand\myactualtext{X}
+ \tagstructbegin{tag=P,alttext-o=\myactualtext}
+ \end{lstlisting}
+
+ and it will insert \verb+X+ (hex encoded) in the pdf.
+ \item[\PrintKeyName{title}] This key allows to set the dictionary entry \texttt{/Title} in the structure object.
+ The value is handled as verbatim string and hex encoded. Commands are not expanded.
+ \item[\PrintKeyName{title-o}] This key allows to set the dictionary entry \texttt{/Title} in the structure object.
+ The value is expanded once and then handled as verbatim string like the \PrintKeyName{title} key.
\end{description}
@@ -588,10 +646,31 @@ The following shows the marking need for a section, a sentence and a list with t
\tagstructend %Sect
\tagstructend %Document
-\tagfinish
\end{document}
\end{lstlisting}
+\section{Alternative text, ActualText and text-to-speech software}\label{sec:alttext}
+
+The pdf format allows to add alternative text through the \PrintKeyName{/Alt} and the \PrintKeyName{/ActualText} key\footnote{There is also the \PrintKeyName{/E} key for acronyms but I will ignore it for now}. 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.
+
+\PrintKeyName{/Alt} (inserted by \texttt{tagpdf} with \PrintKeyName{alttext}) 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:
+
+\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.
+\end{itemize}
+
+
+
+
+
\section{Standard type and new tags}\label{sec:new-tag}
@@ -624,7 +703,7 @@ New tags can be defined in the setup command with the key \texttt{add-new-tag}.
and perhaps some\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.
- \item Various small infos must be present in the catalog dictionary, info dictionary and the page dictionaries, e.g. metadata like title.
+ \item Various small infos must be present in the catalog dictionary, info dictionary and the page dictionaries, e.g. metadata like title.
\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.