[pdftex] "fi" can not be copied correctly in a pdf generated by pdflatex
Peng Yu
pengyu.ut at gmail.com
Mon Nov 14 14:21:33 CET 2011
On Mon, Nov 14, 2011 at 3:33 AM, Robin Fairbairns
<Robin.Fairbairns at cl.cam.ac.uk> wrote:
> Ross Moore <ross.moore at mq.edu.au> wrote:
>
>> On 14/11/2011, at 3:40 PM, Peng Yu wrote:
>>
>> >> \usepackage[resetfonts]{cmap}
>> >
>> > The above code works for the word "Definition" in the main text but
>> > not for the one in the table of the content.
>>
>> Hmm. That's strange, and surely a bug in cmap.sty .
>
> doesn't happen for me, with that call of cmap, in my test file.
>
>> > Is there anything special
>> > about the table of the content? How to fix it for the table of content
>> > as well?
>>
>> Try
>>
>> \usepackage[noTeX]{mmap}
>>
>> instead of the line for \usepackage{cmap} .
>> (Not sure what the [resetfonts] is for )
>
> resetfonts option tells the package to remap the fonts built into the
> format as well as those loaded subsequently. (presumably on the basis
> that nobody uses ot1 nowadays, so all fonts are going to be loaded
> later. obviously false, in this case.)
>
> of course, it's not necessary if you're using anything other than ot1
> encoding, or non-standard fonts.
>
>> Does this now work for you?
>
> it works equally well for me, in my test file.
>
>> It does for me, but I'm using an updated version of mmap.sty
>> that isn't generally released yet.
>>
>> Hopefully the older version also works in this kind
>> of situation.
>>
>> > \documentclass[11pt, a4paper, titlepage]{report}
>> > \usepackage[resetfonts]{cmap}
>> > \begin{document}
>> > \tableofcontents
>> > \chapter{Introduction}
>> > \section{Definition}
>> > \end{document}
>
> does indeed fail (produces ^L in the toc for the fi ligature).
>
> my trivial test doc:
>
> \documentclass{article}
> \usepackage[resetfonts]{cmap}
> %\usepackage[noTeX]{mmap}
> \begin{document}
> \title{foo bar}
> \tableofcontents
> \section{definitions}
> here we are again: defining nothing
>
> \section{should be ok}
> grumbly umbly
> \end{document}
>
> works fine with either cmap or mmap.
>
> if i change it to \documentclass[11pt]{article}
> the "fi" in "defining nothing" becomes ^L if i'm using cmap, but it's ok
> with mmap.
>
> all my tests were conducted on a (full) tl11 installation, last updated
> on friday -- i've not installed anything special, that would be used in
> this test (i do have one or two non-free fonts, which aren't in tl, but
> they're unrelated to these tests.)
>
> conclusion: there is indeed a bug in cmap, probably relating to
> non-default sizes. it's easy to say that (i've got one instance), but
> characterising the bug properly would take rather more effort.
>
> i shall not recommend cmap.sty in the faq answer i'm writing on this
> topic; i look forward to installing this shiny new mmap when it surfaces
> ;-)
But latexmk -pdfdvi produces a pdf without any problem (without cmap).
If latex -> dvipdf can produce a pdf without problem, why pdflatex
can't do so. Isn't it more of a bug of pdflatex?
\documentclass[11pt, a4paper, titlepage]{report}
%\usepackage[resetfonts]{cmap}
\begin{document}
\tableofcontents
\chapter{Introduction}
\section{Definition}
\end{document}
--
Regards,
Peng
More information about the pdftex
mailing list