diff options
Diffstat (limited to 'macros/latex/contrib/tagpdf/ex-softhyphen.tex')
-rw-r--r-- | macros/latex/contrib/tagpdf/ex-softhyphen.tex | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/macros/latex/contrib/tagpdf/ex-softhyphen.tex b/macros/latex/contrib/tagpdf/ex-softhyphen.tex index 7fb5c34a22..e5b14e13c4 100644 --- a/macros/latex/contrib/tagpdf/ex-softhyphen.tex +++ b/macros/latex/contrib/tagpdf/ex-softhyphen.tex @@ -2,10 +2,13 @@ % !! needs lualatex % this sets the hyphen used by automatic hyphenation to 00AD % this improves copy&pasting -% the example gives aaaaaaa-aaaaaaaaaaaaa-aaaaaa Ministerpräsident +% the example gives +% aaaaaaa-aaaaaa aaaaaaa-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 +% sumatra doesn't understand this and copies Ministerpräsident + + \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{pdfversion=1.7,uncompress} @@ -14,28 +17,38 @@ \usepackage[ngerman]{babel} %to get some hyphenation \usepackage{tagpdf} \tagpdfsetup{tabsorder=structure, - activate-all, %deactivate to see the difference + activate, %deactivate to see the difference + interwordspace, + paratagging } \usepackage{fontspec} - -\prehyphenchar`\^^ad +% we must remove the invisible feature +\setmainfont{TeX Gyre Pagella}[RawFeature={-invisible}] +\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 + +aaaaaaa-aaaaaa aaaaaaa-aaaaaa + +Ministerpräsident + \end{document} + +aaaaaaa- +aaaaaa +aaaaaaa- +aaaaaa +Mi +nisterprä +sident + + +aaaaaaa-aaaaaa aaaaaaa-aaaaaa +Ministerpräsident + +aaaaaaa-aaaaaa aaaaaaa-aaaaaa +Ministerpräsident
\ No newline at end of file |