Enabling the searching and copying of ligatures
Sometimes, two or more consecutive characters are joined to a single glyph. This is called a ligature. Depending on the font, LaTeX commonly does it for ff, fi, fl, ffi, ffl, and so on. 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 a text or a Word file, the ligatures may appear broken.
Another problem is searching for words containing ligatures in PDF files, which can fail, as the ligature ff differs from the letter combination ff.
We will now tackle both challenges.
How to do it...
We will stick to the commonly used pdfLaTeX. There are several possible ways to fix it. The first way is this:
- Input the glyphtounicode.tex file into your document’s preamble:
\input{glyphtounicode}
- On the next line, activate the required...