Welcome to the UK List of
TeX Frequently Asked Questions
on the Web
In principle, you can search a PDF file: the text of the file
is available to the viewer, and at least some viewers provide a search
facility. (It’s not the fastest thing in the world, but it does help
in some circumstances.)
However, there is a problem: the viewer wants to look at Unicode text,
but no ordinary TeX-based system deals in Unicode text.
Fortunately for us Anglophones, this is is hardly ever a problem for
our text, since even Knuth’s “OT1” encoding matches ASCII (and hence
the lowest 128 characters of Unicode) for most things printable.
However, using the inflected characters of Continental European
languages, or anything that doesn’t use a Latin alphabet, there is
potential for problems, since TeX’s view of what a font is doesn’t
map PDF’s and the reader won’t understand…
… Unless you use the cmap
package with PDFLaTeX,
that is. The package will instruct PDFTeX to load character
maps into your PDF for output fonts encoded according to the T1
(Western European Languages), T2A, T2B, or T2C (Cyrillic Languages),
or T5 (Vietnamese) encodings. If your document uses such encodings,
viewers that can search will use the maps to interpret what they find
in the file.
Unfortunately, the package only works with fonts that are directly
encoded, such as the cm-super
distribution. Fonts like Adobe
Times Roman (which are encoded for (La)TeX use via virtual fonts)
are not amenable to this treatment.
- macros/latex/contrib/cmap (or browse the directory)
- cm-super fonts
- fonts/ps-type1/cm-super (or browse the directory); catalogue entry
previous question, or
Go to FAQ home.
URL for this question: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=srchpdf
Comments, suggestions, or error reports? - see
“how to improve the FAQ”.
This is FAQ version 3.27, released on 2013-06-07.