4

I'm using pdflatex with the MinionPro package. The PDF looks fine, but apparently some characters (specifically "W" and the "Th" ligature) are put in the PDF in a way that breaks searchability. For example, if a document contains the text "A Wedge", then searching for "A Wedge" will not yield a hit. If I copy and paste this string into a text file, the result is "AWedge". With "Th" it's similar: "A Thing" becomes "AThing" when copied into a text file.

As mentioned in the MinonPro manual, I'm using

\input glyphtounicode
\pdfgentounicode=1

but this doesn't solve the problem. Here's an example:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{MinionPro}
\input glyphtounicode
\pdfgentounicode=1
\begin{document}
A Wedge A Thing
\end{document}

Any ideas?

  • 3
    That's not a ligature problem: you pdf reader doesn't recognize the spaces as they are rather small. You will have to enlarge the interword spacing. – Ulrike Fischer Apr 2 '14 at 19:52
  • Thanks! In my case, I think it would be sufficient to increase the interword spacing before "W" and "Th". Apparently with microtype and \SetExtraSpacing it's possible to define the interword spacing after a given character, but what I need is to change the spacing before a given character. Is this possible? – Ubik Apr 2 '14 at 20:22
2

I found a solution to my problem, and Ulrike's comment was the key for that (thanks again!) As she pointed out, the spaces before "W" and "Th" were too small for the Adobe Reader to be detected as spaces. Ulrike suggested to increase the interword spacing.

However instead of increasing the interword spacing in general, it struck me as a better solution to only change the spaces where it is actually needed (i.e., before "W" and "Th"), and I came up with the following:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{MinionPro}
\usepackage[kerning=true]{microtype}

\SetExtraKerning[context=extended,unit=space]
{encoding={*}, family={MinionPro-OsF}, series={*}, size={normalsize}}
{W={70,},
 T={180,}}

\input{glyphtounicode}
\pdfgentounicode=1

\begin{document}
Original kerning:

A Wedge A Thing

Adapted kerning:

\begin{microtypecontext}{kerning=extended}
A Wedge A Thing
\end{microtypecontext}

\end{document}

When I copy the text of the resulting PDF document and paste it in a text file, the result is as follows:

Original kerning:
AWedge AThing
Adapted kerning:
A Wedge A Thing
| improve this answer | |
  • If your output really looks like that without modification, I would say there is something wrong somewhere - either in your set up or in the packages you are using or something. Are you sure you are using the correct Minion support package for the version of Minion Pro you have installed for TeX? Note that there are a number of different packages optimised for different versions of the fonts and it matters that you match them. When I process the code in your question, for example, I have no problems copy and pasting. – cfr Apr 15 '14 at 2:38
  • @cfr: Thanks. It's quite interesting that you don't experience that problem. Are you also using MinionPro v2.1 and did you copy from Adobe Reader? I recreated all MinionPro related files following the readme, and the problem still occurs. However, I noted a small discrepancy: The readme mentions the otfinfo output "Version 2.012;PS 002.000;Core 1.0.38;makeotf.lib1.6.6565", whereas it says "Version 2.015;PS 002.000;Core 1.0.38;makeotf.lib1.7.9032" for my files. Maybe that's the reason. – Ubik Apr 16 '14 at 21:53
  • Version 2.068;PS 2.000;hotconv 1.0.57;makeotf.lib2.0.21895 Oh, and, yes, these are from Reader. – cfr Apr 16 '14 at 22:05
  • As far as I remember. I've certainly never purchased them. There is a slim chance they might be from an old version of Acrobat I used to use if I copied them from my Mac along with the rest of my TeX stuff. But I'm pretty sure they are from Reader (either for Mac or for Linux). – cfr Apr 16 '14 at 22:12
  • @cfr: My OTF files also came with the Adobe Reader. Do you use the package from CTAN or this fork? – Ubik Apr 16 '14 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.