1

Consider the following situation:

  • A .tex file with the following content:

    \documentclass{article}
    \usepackage[T1]{fontenc}
    \begin{document}
    Let it be.
    \end{document}
    
  • The file is compiled by pressing ALT + 6 on Kile 2.1.2, using Ubuntu 12.10

  • The PDF file is opened by pressing ALT + 7, which executes Evince 3.6.0
  • All the PDF content is selected/copied by pressing CTRL + A and CTRL + C

For some reason (unknown to me), if I paste such content on any text editor (e.g. this input field, gedit, kile or kate) I get

▲❡t ✐t ❜❡✳
✶

and if I remove the command \usepackage[T1]{fontenc}, and compile the file again, I get a copy-able PDF, from which I can copy the correct text

Let it be

How can I get a PDF with copy-able text if I need to use \usepackage[T1]{fontenc}?

yo'
  • 51,322
Helder
  • 141
  • When I compile this I can copy and paste from this even while using \usepackage[T1]{fontenc}. – A.Ellett Feb 17 '13 at 21:57
  • It works whether I run latex->dvips->ps2pdf' or whether I runpdflatex`. Do you know what compiling commands your key-commands are bound to? – A.Ellett Feb 17 '13 at 22:00
  • 1
    @A.Ellett this depends on your pdf viewer application. In the absence of a ToUnicode CMap in the PDF (see the linked duplicate question for ways to generate one), the viewer has to make some guesses/assumptions: different viewers make different guesses and may get it right in some cases and wrong in others. Some methods of doing this are actually patented – Lev Bishop Feb 18 '13 at 01:57
  • @A.Ellett: On Settings > Configure Kile > Tools > Build, the config for PDFLaTeX is:
    Command: `pdflatex`
    Options: `-interaction=nonstopmode '%source'`
    
    

    and for ViewPDF it is:

    Command: `evince`
    Options: `'%target'`
    
    – Helder Feb 18 '13 at 12:53
  • Adding \usepackage{cmap}, as suggested by Kurt in his reply to the other question works for me. Thanks! – Helder Feb 18 '13 at 12:59

0 Answers0