18

I want to disable ligatures when I am typing letters, however, I need '--' to be joined to a long dash. Is it possible to make this?

Now I am avoiding it like this

\usepackage{microtype}
\DisableLigatures{encoding = *, family = * }
  • 7
    Use \textendash for the en-dash. – egreg May 29 '12 at 8:52
  • Why is it better than just type double dash? – Pavasaris May 29 '12 at 9:48
  • 1
    If you disable all ligatures, that command will use the en dash anyway. – egreg May 29 '12 at 9:50
22

You can only do it the other way round as described in the documentation of microtype. You can give a list of chars for which ligatures should be disabled:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\DisableLigatures[f]{encoding = *, family = * }
\begin{document}
fi ---

\end{document}
  • For me, the above did not work for disabling ligatures in source code listings with a tt font. However, \DisableLigatures[f]{encoding = *, family = tt* } did work (as suggested in the microtype manual). – Supernormal Nov 13 '17 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.