blob: 7fb5c34a221490c3becffbc67510b4f9ab581e8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
% !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
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{pdfversion=1.7,uncompress}
\documentclass{book}
\usepackage[ngerman]{babel} %to get some hyphenation
\usepackage{tagpdf}
\tagpdfsetup{tabsorder=structure,
activate-all, %deactivate to see the difference
}
\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}
|