[tex-live] Default font of pdflatex with latin1 characters
Zdenek Wagner
zdenek.wagner at gmail.com
Wed Jul 29 10:01:02 CEST 2009
2009/7/29 Heiko Oberdiek <oberdiek at uni-freiburg.de>:
> On Tue, Jul 28, 2009 at 09:50:37AM +0200, Martin Monperrus wrote:
>
>> pdflatex produces low-quality documents with the default settings. Let's
>> consider novice and intermediate users who write texts with accents (e.g.
>> French or German):
>>
Remember that TeX still keeps compatibility with the original Knuth's
TeX and Lamport's LaTeX. This is the reason why default fonts are
Computer Modern. These fonts do not contain accented characters,
that's why copy&paste and search do not work and the accented
characters may look ugly. You have to use fonts in a proper encoding
(in European languages T1, ie \usepackage or
\RequirePackage[T1]{fontenc}). You should replace Computer Modern with
Latin Modern, package lmodern. Package cmap serves for mapping
characters from the TeX font to the Unicode code points.
Although you can create your own format, it is also possible just to
make a package of your own. I have my ow package with preferred
settings and definitions of some macros installed as
texmf-local/tex/latex/zwtools.sty and I put into all my private
documents \usepackage{zwtools}.
See Heiko's answer to find what packages to load and how.
>> \documentclass{article}
>> \usepackage[latin1]{inputenc}
>> \begin{document}
>> à l'âge de la science, les systèmes techniques sont issus des découvertes.
>> \end{document}
>>
>> If you try to copy/paste the resulting document, you obtain:
>> a a
>> ` l'^ge de la science, les syst`mes techniques sont issus des d??couvertes
>> e e
>>
>> The PDF file is of low quality:
>> * one can not search accented words in it
>> * one can not copy/paste accented words from it
>> * it can not be correctly indexed by search engines
>>
>> I suggest that pdflatex should be configured to choose by default cm-super
>> or lmodern's versions of Computer Modern, without adding
>> \usepackage[T1]{fontenc} & \usepackage{lmodern} or tweaking updmap.
>
> LaTeX2e is frozen, thus it's too late to change defaults. :-(
>
> But you are free to create your own format, e.g.
>
> %%% cut %%% mmlatex.ini %%% cut %%%
> % Hack to get cmap work during format generation.
> % \pdfobj is delayed using \everyjob.
> \let\OrgPdfObj\pdfobj
> \def\pdfobj{%
> \write-1{}% cancel \immediate
> \OrgPdfObj reserveobjnum\relax
> \GetPdfObj
> }
> \def\GetPdfObj#1#{%
> \GetPdfObjI{#1}%
> }
> \def\GetPdfObjI#1#2{%
> \begingroup
> \edef\x{\endgroup
> \global\everyjob{%
> \the\everyjob
> \immediate\noexpand\pdfobj useobjnum \the\pdflastobj\space#1{#2}%
> }%
> }%
> \x
> }
> \RequirePackage{cmap}
> \RequirePackage[T1]{fontenc}
> \RequirePackage{lmodern}
> \let\pdfobj\OrgPdfObj
> \dump
> %%% cut %%% mmlatex.ini %%% cut %%%
>
> Then generate a format, e.g. (bash syntax):
> pdflatex -ini \&pdflatex mmlatex.ini
>
> And call it with test.tex as your example file:
> pdflatex \&mmlatex test
>
> Yours sincerely
> Heiko <oberdiek at uni-freiburg.de>
>
--
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz
More information about the tex-live
mailing list