Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm typesetting a book in French, and I noticed that diacritics broke the search function of Adobe reader. For example, if I write "Numérotation" in my latex document, then Adobe Reader won't find any matches for either "Numerotation" or "Numérotation", since the accent sign is written to the pdf document separately from the "e".

Similarly, if I write "Affect", then Adobe reader won't find any matches for "Affect" : both "f"s are contracted into one character.

How can I ensure that the pdfs generated by pdflatex are fully searchable?

EDIT: Some clarifications:

Thanks for the answers. I currently have two packages loaded :

\usepackage[T1]{fontenc}
\usepackage{ae,aecompl,aeguill}

Adding \usepackage{cmap} doesn't help. Removing ae does help, but the the fonts are bitmap ones, and look terrible.

Final note: removing ae doesn't solve the double-f (ff) problem.

share|improve this question
1  
Does using the package cmap, i.e. including \usepackage{cmap} in your preamble, help? –  N.N. Oct 10 '11 at 11:15
4  
At first you should use \usepackage[T1]{fontenc} (and if the fonts get fuzzy install the cm-super-package). –  Ulrike Fischer Oct 10 '11 at 11:33
    
I already have \usepackage[T1]{fontenc} –  Clément Oct 10 '11 at 13:00
    
@Clément ulrike said use cm-super; personally i prefer lmodern.sty which is (a) smaller, and (b) very slightly better shaped; so \usepackage[T1]{fontenc}\usepackage{lmodern} –  wasteofspace Feb 8 at 11:54
add comment

2 Answers

up vote 10 down vote accepted

Fonts in OT1 encoding make up accented characters by combining two glyphs, so they won't be recognized as such. If you have the CM-Super fonts, then

\usepackage[T1]{fontenc}

will suffice. If you don't have the CM-Super fonts and are stuck with the bitmaps generated by Metafont, then

\usepackage{cmap}

before the other declaration will do. Also the Latin Modern fonts have the correct CMAP entries in the font files, so the glyphs will be recognized by the PDF reader (and they are Type1 fonts). Most font families should give no problems, provided they have Type1 font files and T1 encoding is used.

Other encodings such as T2x (x can be A, B, or C) can suffer from the same problem and the cure is the same: declaring the encoding and ensuring that the font files are Type1. No problem (at least in the majority of cases) when OpenType fonts are used with XeLaTeX or LuaLaTeX.

share|improve this answer
    
I already added \usepackage[T1]{fontenc}, and adding cmap doesn't help. –  Clément Oct 10 '11 at 13:01
    
ae is the problem here, but removing it gives bitmap fonts. And it doesn't solve the double-f problem. –  Clément Oct 10 '11 at 13:05
5  
Don't use ae, it's obsolete; try \usepackage{lmodern} with \usepackage[T1]{fontenc} or install the CM-Super fonts. –  egreg Oct 10 '11 at 13:15
    
lmodern was the key =) –  Clément Oct 10 '11 at 13:49
    
related: tex.stackexchange.com/questions/1291/… –  matth Jul 4 '12 at 15:44
add comment

Since nobody mentioned it yet: Using XeLaTeX or LuaLaTeX properly would also solve this since you would then use Unicode. I sincerely recommended this.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.