diff options
author | Karl Berry <karl@freefriends.org> | 2007-04-28 00:50:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-04-28 00:50:15 +0000 |
commit | 82a154912da337be00dd632c0a3b2534acdf57c0 (patch) | |
tree | 4851ac77b0c4554e2d07a8a81fec8c66511face6 /Master/texmf-dist/tex/latex/cmap/cmap.sty | |
parent | 58a84f1f518f7f818c4e2bca5dbe871461f8da7d (diff) |
cmap 1.0g (26apr07)
git-svn-id: svn://tug.org/texlive/trunk@4203 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cmap/cmap.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/cmap/cmap.sty | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/cmap/cmap.sty b/Master/texmf-dist/tex/latex/cmap/cmap.sty index 836c8866338..3dd539cdb27 100644 --- a/Master/texmf-dist/tex/latex/cmap/cmap.sty +++ b/Master/texmf-dist/tex/latex/cmap/cmap.sty @@ -1,35 +1,17 @@ -% Copyright (c) 2003-2005 Vladimir Volovich <vvv@vsu.ru> +% Copyright (c) 2003-2007 Vladimir Volovich <vvv@vsu.ru> % cmap package -- download CMap files into PDF -% to make "search" and "cut-n-paste" functions work properly +% to make "search" and "copy-and-paste" functions work properly % You may distribute and/or modify this program under the terms of LPPL -% the program consists of cmap.sty and {t1,t2a,t2b,t2c,t5}.cmap +% the program consists of cmap.sty and {t1,t2a,t2b,t2c,t5,ot1,ot1tt,lae,lfe}.cmap % Usage: put \usepackage{cmap} immediately after the \documentclass line % Thanks to: % Han The Thanh % Maxim I. Tishin % Petr Sojka % Werner Lemberg -% 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) +% Oleg Katsitadze -\ProvidesPackage{cmap}[2004/06/16 v1.0e CMap support: searchable PDF] +\ProvidesPackage{cmap}[2007/04/25 v1.0g CMap support: searchable PDF] \@ifundefined{pdffontattr}{% % The cmap package can be used only with pdflatex, @@ -42,6 +24,18 @@ \expandafter\endinput \fi +\DeclareOption{resetfonts}{% + \@for\reserved@a:=% + OT1/cmr/m/n/5,OT1/cmr/m/n/7,OT1/cmr/m/n/10,% + OML/cmm/m/it/5,OML/cmm/m/it/7,OML/cmm/m/it/10,% + OMS/cmsy/m/n/5,OMS/cmsy/m/n/7,OMS/cmsy/m/n/10,% + OMX/cmex/m/n/10% + \do{% + \expandafter\let\csname\reserved@a\endcsname\relax + }% +} +\ProcessOptions + \edef\reserved@a{\noexpand\in@{,fontenc.sty,}{\@filelist}}% enc.def \reserved@a \ifin@ @@ -73,12 +67,28 @@ \global\expandafter\let\csname cmap@set@\cmap@f@encoding\endcsname\empty }% } +\def\cmap@test@tt{% + \ifdim\fontdimen3\font@name=\z@ + \ifdim\fontdimen4\font@name=\z@ + \begingroup + \setbox0=\hbox{\font@name i}% + \setbox1=\hbox{\font@name W}% + \ifdim\wd0=\wd1 % + \edef\reserved@f{\lowercase{\def\noexpand\reserved@f{\cmap@f@encoding tt.cmap}}}% + \reserved@f + \IfFileExists{\reserved@f}{\xdef\cmap@f@encoding{\cmap@f@encoding tt}}\relax + \fi + \endgroup + \fi + \fi +} \def\cmap@hook{% \@ifundefined{CJK@plane}{% \edef\cmap@f@encoding{\f@encoding}% }{% \edef\cmap@f@encoding{\f@encoding\CJK@plane}% }% + \cmap@test@tt \@ifundefined{cmap@set@\cmap@f@encoding}{\cmap@load}\relax \csname cmap@set@\cmap@f@encoding\endcsname } |