Suppressing ligatures
A ligature is a combination of several letters in a single glyph. Ligatures improve the readability and visual quality of text, and thus, we should retain them. However, there may be a reason to disable them – for example, in verbatim text, such as source code.
Furthermore, it’s possible that searching or copying ligatures in a PDF file would fail, which we discussed in the previous recipe.
How to do it...
We will now see how to deactivate ligatures. We will use the microtype package:
- Load the microtype package:
\usepackage{microtype}
- Disable ligatures entirely:
\DisableLigatures{encoding = *, family = * }
- If you would like to restrict that feature to a certain font, you can specify it instead, such as the following:
\DisableLigatures{encoding = T1, family = tt* }
- You can even suppress just selected ligatures using the following command. Specify the letter that starts the ligature:
\DisableLigatures[f]{encoding = *, family...