diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/tagpdf/ex-softhyphen.tex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/tagpdf/ex-softhyphen.tex')
-rw-r--r-- | macros/latex/contrib/tagpdf/ex-softhyphen.tex | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/macros/latex/contrib/tagpdf/ex-softhyphen.tex b/macros/latex/contrib/tagpdf/ex-softhyphen.tex new file mode 100644 index 0000000000..20f002258b --- /dev/null +++ b/macros/latex/contrib/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} + |