diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.tex | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.tex b/Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.tex new file mode 100644 index 00000000000..d45dab10e7b --- /dev/null +++ b/Master/texmf-dist/doc/latex/tagpdf/ex-spaceglyph-listings.tex @@ -0,0 +1,21 @@ +% !Mode:: "TeX:DE:UTF-8:Main" +\documentclass{article} +\usepackage{amsmath} +\usepackage[ngerman]{babel} +\usepackage{tagpdf,listings} +\makeatletter +%\def\lst@outputspace{\pdffakespace\ } %not so good +% this here works fine with luatex, if the font has a space glyph: +\def\lst@visiblespace{\lst@ttfamily{\char32}{\char32}} +% with pdftex this could work +%\def\lst@visiblespace{\lst@ttfamily{\pdffakespace\ }{\pdffakespace\ }} +\tagpdfsetup{activate-all,uncompress,interwordspace=on,show-spaces,log=v} +\begin{document}\pagestyle{empty} +\tagstructbegin{tag=Document} +\tagmcbegin{tag=P} +\begin{lstlisting}[showspaces] +aaa aaa xxxx +\end{lstlisting} +\tagmcend +\tagstructend +\end{document}
\ No newline at end of file |