Ligatures with Libertine: issue with pdflatex (and Windows)

Ligatures with Libertine: issue with pdflatex (and Windows)



If you compile the piece of code given below using pdflatex, then open the resulting PDF file with your preferred viewer, copy the word "efficient" and paste it in a text editor, you will read "efcient". This does not happen with xelatex or lualatex. Is there a way to fix this issue with pdflatex?


documentclass[fleqn,10pt]article
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagelibertine
%usepackagelmodern
begindocument
efficient
enddocument






Doesn't happen to me. Can you be more precise about your TeX system?

– egreg
Sep 11 '18 at 11:13






Add input glyphtounicode pdfgentounicode=1.

– Ulrike Fischer
Sep 11 '18 at 12:13


input glyphtounicode pdfgentounicode=1






@UlrikeFischer Could you please transform your comment into an answer with maybe adequate explanatory details? Thanks

– pluton
Sep 11 '18 at 12:26






@Mico yes I could but it looks like there is an easier fix, see above.

– pluton
Sep 11 '18 at 12:30






@Mico I see the problem also with tl2018. Imho it is (also) viewer (and so OS) dependant.

– Ulrike Fischer
Sep 11 '18 at 12:47




1 Answer
1



Add


input glyphtounicode
pdfgentounicode=1



glyphtounicode.tex contains a lot of mappings like


glyphtounicode.tex


pdfglyphtounicodeffi0066 0066 0069



which are added to the pdf and helps the viewer to correctly interprete special chars.
I didn't check which of the mappings is needed for libertine, imho it doesn't harm to simply load the whole lot.



The issue itself can be viewer dependant -- some are better in guessing than other.






Why not simply load cmap, see pdftex-a.pdf, p. 31: »LaTeX users could load the cmap package to achieve the same effect.« ?

– Keks Dose
Sep 14 '18 at 12:03






@KeksDose cmap doesn't work for all fonts (and here not with libertine). "The main limitation currently is inability to work with virtual fonts".

– Ulrike Fischer
Sep 14 '18 at 12:24






Aha, thank you! I should have had a look into the cmap manual. Which says, by the way, the inablity to work with virtual fonts were a limitation of pdftex. So on the pdftex side this is no longer a limitation?

– Keks Dose
Sep 14 '18 at 12:26




Thanks for contributing an answer to TeX - LaTeX Stack Exchange!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ