Enabling the searching and copying of ligatures

In certain cases, two or more consecutive characters are joined to a single glyph. This is called a ligature. LaTeX commonly does it for ff, fi, fl, ffi, ffl, and more, depending on the font. That's because font makers designed specific glyphs for certain character combinations.

While it looks fine in print and on screen, there is a caveat—if you copy text from the produced PDF file into another document, such as to a text document or a Word file, the ligatures may appear broken.

Another problem is searching for words containing ligatures in PDF files, which can simply fail as the ligature "ff" is not equivalent to the letter combination "ff".

We will now fix that.

How to do it...

We stick to the commonly ...

Get LaTeX Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.