Settings Help
CTAN
Comprehensive TeX Archive Network
Home Upload Browse

Direc­tory tex-archive/macros/latex/contrib/cmap

The cmap package is intended to make the PDF files generated by
pdflatex "searchable and copyable" in acrobat reader and other
compliant PDF viewers.

Just put the line \usepackage{cmap} at the beginning of your preamble,
and it will pre-load the needed CMap translations for the fonts used
in the document, provided that there exists the file <encoding>.cmap
for the font encoding.

Current version of the CMap package includes CMap files for the
following LaTeX font encodings: T1, T2A, T2B, T2C, T5, OT1, OT1tt,
OT6, LGR, LAE, LFE.

Adding support for other font encoding does not require the change in
the cmap.sty package: just create the <encoding>.cmap file and make it
visible to TeX by putting it into the appropriate directory.

As of version 1.0f, the package detects the monospace (typewriter)
fonts (by checking whether \fontdimen3=0, \fontdimen4=0 and widths of
letters "W" and "i" are the same). If a monospace font is detected,
and a file <encoding>tt.cmap exists, it will be used for this font
instead of <encoding>.cmap. This is useful for encodings such as OT1
where there are variants in mapping between "normal" and "typewriter"
fonts.

To force loading of the CMap files even for fonts such as cmr10 which
are normally preloaded into the pdflatex format file, add an option
[resetfonts]. This will undefine those fonts and load the CMap for
them (if they will be used in the document).

It works for Type 1 fonts, and also for Type 3 fonts (including the PK
fonts which are preloaded as Type 3 fonts into PDF) with recent
versions of pdftex.

The main limitation currently is inability to work with virtual fonts,
and this is because of limitation of pdftex, and may be resolved in a
future versions of pdftex.

It is possible to work around this limitation by creating a Type 3
font which implements instructions contained in the virtual font.

==================================================================

TODO:
  add *.cmap files for other font encodings (contributions are welcome):
    TS1, OT1, OT2, LY1, IL2, OML, OMS, ...
  support dvips?

History:

2003/03/07 private version
2003/03/11 version 1.0: first public version
2003/03/13 version 1.0a:
  change error to warning for non-pdftex
  added warnings if cmap is loaded after fontenc or babel
  added t5.cmap - thanks to Han The Thanh
2003/03/19 version 1.0b:
  minor refinements
2003/05/22 version 1.0c:
  fixed a typo due to which the package had no effect at all
2004/06/16 version 1.0d (wl):
  add support for subfonts as used in the CJK package
2005/05/03 version 1.0e:
  do not fail under pdftex with \pdfoutput=0 (thanks to Robin Fairbairns)
2006/12/24
  added files lae.cmap and lfe.cmap for the Arabic and Farsi encodings,
  contributed by Youssef JABRI <yjabri@ensa.univ-oujda.ac.ma>
2007/04/25 version 1.0f:
  added files ot1.cmap and ot1tt.cmap, contributed by Oleg Katsitadze.
  added "dotless j" mapping to T1, T2A, T2B, T2C; this character
  appeared in unicode 4.1 (noticed by Oleg Katsitadze).
  cmap.sty: added support for loading "typewriter" variant of CMap.
  If a font is monospaced (which is tested by \fontdimen3=0 and
  \fontdimen4=0 and width of "W" = width of "i"), and a file
  <encoding>tt.cmap exists, it will be used for this font instead of
  <encoding>.cmap.
  Added package option "resetfonts" to undefine standard preloaded fonts.
2007/04/25 version 1.0g:
  fixed a typo
2008/03/06 version 1.0h:
  added greek mapping (lgr.cmap), contributed by Werner Lemberg
  added armenian mapping (ot6.cmap)
  bugfix - running \usepackage[resetfonts]{cmap} in DVI mode was giving an error
    because the endinput was run too early, and option was not declared - thanks
    to Werner Lemberg
  suppress `Missing character' warnings when testing for monowidth fonts (which may
    not include W and/or i, e.g. some CJK fonts) - thanks to Werner Lemberg
  {t1,t2a,t2b,t2c}.cmap: change mapping of <7F> from <002D> (hyphen-minus) to
    <00AD> (soft hyphen) as, it appears, acrobat reader in this case
    allows to search hyphenated words, ignoring the hyphenation character.
    (this requires redefining the \defaulthyphenchar to 127). This
    change was inspired by discussion with Alexey Kuligin and Alexey Vikhlinin.

Files

Name Size Date Notes
README 4233 2008-07-07 03:57:00
cmap.sty 2883 2008-03-12 01:00:00
lae.cmap 3293 2006-12-23 01:00:00
lfe.cmap 3609 2006-12-23 01:00:00
lgr.cmap 3744 2008-07-07 03:48:00
ot1.cmap 1207 2007-04-26 08:02:00
ot1tt.cmap 1042 2007-04-26 08:03:00
ot6.cmap 1730 2008-03-06 01:00:00
t1.cmap 1938 2008-07-07 03:27:00
t2a.cmap 1872 2008-07-07 03:25:00
t2b.cmap 1680 2008-07-07 03:27:00
t2c.cmap 1752 2008-07-07 03:27:00
t5.cmap 2573 2003-03-13 10:17:00

Down­load the com­plete con­tents of this di­rec­tory in one zip archive (14.6k).

cmap – Make PDF files search­able and copy­able

The cmap pack­age pro­vides char­ac­ter map ta­bles, which make PDF files gen­er­ated by pdfLaTeX both search­able and copy-able in ac­ro­bat reader and other com­pli­ant PDF view­ers. En­cod­ings sup­ported are OT1, T1, T2A, T2B, T2C and T5, to­gether with LAE (Ara­bic), LFE (Farsi) and LGR (Greek) and a vari­ant OT1tt for cmtt-like fonts.

The pack­age’s main lim­i­ta­tion cur­rently is the in­abil­ity to work with vir­tual fonts, be­cause of lim­i­ta­tions of pdfTeX. This re­stric­tion may be re­solved in a fu­ture ver­sion of pdfTeX.

Doc­u­men­ta­tion
Ver­sion1.0h
Li­censeThe LaTeX Project Public Li­cense
Main­tainerVladimir Volovich
Con­tained inTeXLive as cmap
MiKTeX as cmap
Topics ac­cess PDF fea­tures
See also pdftex
mmap
Guest Book Sitemap Contact 2014-04-18 20:14 CEST