Suppressing ligatures

Ligatures raise the typographical quality and thus we should retain them. However, there may be a reason to disable them, for example, in verbatim text such as the source code.

Furthermore, it's possible that searching or copying of ligatures in a PDF file would fail, which we discussed in the previous recipe.

How to do it...

We will now see how to disable ligatures. We will use the microtype package:

  1. Load the microtype package:
    \usepackage{microtype}
  2. Disable ligatures completely:
    \DisableLigatures{encoding = *, family = * }
  3. If you would like to restrict that feature to a certain font, you can specify it instead, such as:
    \DisableLigatures{encoding = T1, family = tt* }
  4. You may even suppress just the selected ligatures using the following ...

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.