1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<head>
<title>UK TeX FAQ -- question label srchpdf</title>
</head><body>
<h3>Searching PDF files</h3>
<p/>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.)
<p/>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...
<p/>... Unless you use the <i>cmap</i> 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.
<p/>Unfortunately, the package only works with fonts that are directly
encoded, such as the <i>cm-super</i> distribution. Fonts like Adobe
Times Roman (which are encoded for (La)TeX use via virtual fonts)
are not amenable to this treatment.
<dl>
<dt><tt><i>cmap.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk tex-archive/macros/latex/contrib/cmap.zip">macros/latex/contrib/cmap</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk tex-archive/macros/latex/contrib/cmap/">browse the directory</a>)
<dt><tt><i>cm-super fonts</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk tex-archive/fonts/ps-type1/cm-super.zip">fonts/ps-type1/cm-super</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk tex-archive/fonts/ps-type1/cm-super/">browse the directory</a>)
</dl>
<p/>
<p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=srchpdf">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=srchpdf</a>
</body>
|