Tag Info

3

(it seems this works everywhere apart from acrobat reader) This is based on the example by @DavidCarlisle. The cmtt visible space character seems to be labelled differently in different cmtt variants. For cm-super (which is loaded here when I use \usepackage[T1]{fontenc}), the respective character is named uni2423 which seems to cause problems with evince ...

5

The following doesn't work in evince, see the discussion in comments below As noted in comments I suspect using colour is the most reliable way: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{color} \begin{document}\showoutput \makeatletter \def\@xobeysp{\textcolor{white}{\char32}} \makeatother \begin{verbatim} def myfunction(x): return x ...

3

The default output encoding used by LaTeX is OT1 and fonts in this encoding don't have precomposed accented characters. Therefore ä is first transformed into \"a which becomes \accent "7F a. Thus in the PDF file we get a set of elementary instructions for superimposing the dieresis to the a. Load also \usepackage[T1]{fontenc} so the fonts used will not ...

1

I cannot see any way of getting the blank lines copied either (inserting a line feed using \BeginAccSupp{method=hex,ActualText=0A}\EndAccSupp{} only works if there is a copying non-space character somewhere on the same line). However, in the following, I present an alternative (more complicated) approach for copying "invisible" spaces at the start of lines. ...

Top 50 recent answers are included