Fonts & Character Setsfontenc | No Text Selection in Output with T1 Encoding

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
Lhum
Posts: 2
Joined: Fri Mar 30, 2012 2:55 pm

fontenc | No Text Selection in Output with T1 Encoding

Post by Lhum »

Hi !

I work with MiKTeX (and TeXnicCenter) and I currently observe a strange behavior.

I compile this with dvips -> ps2pdf:

Code: Select all

\documentclass[a4paper,11pt,openbib,titlepage]{book}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}

Testing... test ... Testing... test ...Testing... test ...Testing... test ... 

\end{document}
And then I can not select the text in the PDF (to copy paste some text for example). If I don't use the package fontenc then the PDF is fine but I get a warning that I should use fontenc with T1 option.

The problem is not that important (I can accept a warning), but if I can understand why, that would be even better. ;)

Thanks ^^

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: fontenc | No Text Selection in Output with T1 Encoding

Post by Stefan Kottwitz »

Hi Lhum,

welcome to the board!

Very good that you provided a compilable example. So I tested it, following your way with latex, dvips and dvipdf. In the produced PDF, I can copy and paste. Possibly it's a PDF reader issue. I used the Adobe Acrobat for testing. Do you really mean that you cannot copy and paste from this test document, or perhaps do you mean your actual document with different (font) settings? I attach my PDF, try this.

Stefan
Attachments
copy.pdf
(4.55 KiB) Downloaded 288 times
LaTeX.org admin
Lhum
Posts: 2
Joined: Fri Mar 30, 2012 2:55 pm

Re: fontenc | No Text Selection in Output with T1 Encoding

Post by Lhum »

Your example is indeed working fine, so it might be a reader issue. I use acrobat reader 9.5 (the 10 version brings a lot of problems)

Actually, I nearly never use T1 - fontenc, because I write mostly in English, so until now I haven't get this problem.

Well, if it just a problem with adobe, let's forget about it ... that wouldn't be the first one. ^^
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

fontenc | No Text Selection in Output with T1 Encoding

Post by Stefan Kottwitz »

With T1 font encoding you need a font with T1 support. You could install cm-super, which provides T1 support for the default font, perhaps you already did it. Or use Latin Modern, which is a high quality font very similar to the default Computer Modern font and is intended as its future replacement. Latin Modern has T1 support.

Try:

Code: Select all

\usepackage{lmodern}
Stefan
LaTeX.org admin
Post Reply