Hello Erich,
the problem in enigma-ref.pdf is simply, that the font is mainly Original
Tex encoding (OT1).
A solution with underscores would be: \usepackage[T1]{fontenc}
https://tex.stackexchange.com/questions/42777/copy-pasting-of-underscore
Regards,
Jürgen
Am 15.07.2015, 20:58 Uhr, schrieb Erich Schubert
<erich.schub...@gmail.com>:
Hello all,
Font and character encodings are tricky, and there are *many* copy and
paste issues when trying to copy from PDF files.
In particular from files that are well generated. In my experience
copy&paste is flawed in 90% of the PDF files.
Just today I had a similar issue with the regular dash: - of which at
least 4 different versions exist in good fonts.
Consider ligatures. If you want a good typography, you want ligatures,
but this can break e.g. email adresses etc.
Furthermore, there are diacritics, which are often represented
internally as composed characters, but they may or may not be encoded
this way in >your font.
Oh, and don't forget about quotation marks!
See:
https://en.wikipedia.org/wiki/Typographic_ligature
https://en.wikipedia.org/wiki/Diacritic
There is little you can do to ensure perfect copy&paste from PDF across
different viewers.
And it clearly is not worth the effort. It's likely not an error in the
source.
Tl;dr: never assume you can copy&paste from a PDF file.
In particular not from a file that looks good...
If you want to copy some code fragment, copy it from the source files,
not a PDF.
(Don't blame me, I didn't invent typography or the PDF file format which
is designed for visuals but not for copy&paste.)
Regards,
Erich
_______________________________________________
Enigma-devel mailing list
Enigma-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/enigma-devel