14

I am writing my dissertation in LaTeX I am faced with this odd situation that if 'f' character has another character (f, i or l) next to it, it sticks the two together as can be noted below. This makes the two 'f' look different.

example of 2 ligated Fs in "Different"

How can I disable this?

  • 27
    This is called ligature. It is a common procedure. Don't worry and be happy. en.wikipedia.org/wiki/Typographic_ligature – Sigur Jul 7 '18 at 13:45
  • 4
    If you really want (I don't recommend) you can type Di{f}{f}erent – Sigur Jul 7 '18 at 13:47
  • 31
    if you look at any printed works for the last few hundred years you will see ff ligatures, it would look more odd if you force the separate f – David Carlisle Jul 7 '18 at 14:01
  • 9
    Don't suppress ligatures! It is a feature of superior typography. – AlexG Jul 7 '18 at 15:56
  • 20
    Somehow what the other comments fail to acknowledge is that this is a terrible ligature. The default font unfortunately has these flaws. A fix is therefore to use a better font. – Konrad Rudolph Jul 7 '18 at 22:39
23

Ligatures are generally considered a good thing, but if you really want to disable them and are using pdfLaTeX (or LuaLaTeX), the microtype package can do this for you. If you load this package and add \DisableLigatures{encoding = *, family = * } to your preamble, all ligatures will disappear from your output.

Here's an example (pdfLaTeX only):

\documentclass{article}

\usepackage{microtype}
\DisableLigatures{encoding = *, family = *}
% \DisableLigatures[f]{encoding = *, family = *} %% <- only disables f-ligatures

\begin{document}

Different -- without ligatures!

\end{document}

enter image description here

Note that the double hyphen (--), which is normally typeset as a single en dash, is also treated as a ligature by TeX and that this is suppressed as well. The standard set of ligatures that TeX recognises consists of:

Actual ligatures: ff → ff     fi → fi     fl → fl     ffi → ffi    ffl → ffl
"Fake" ligatures: -- → –    --- → —     `` → “      ’’ → ”      !` → ¡     ?` → ¿

You can use \DisableLigatures[f]{encoding = *, family = * } to only disable ligatures that start with the letter f (i.e., the entire top row).

The microtype package actually does a lot more than this. It implements a number of micro-typographical features that generally improve the layout of your paragraphs. (See the documentation for more information.)


To make this work with LuaLaTeX you need to also use the fontspec package and supply the Renderer=Basic option while loading your font. For LuaLaTeX, Mico's answer is therefore preferable.

  • Can you turn them back on again, after the title? – ctrl-alt-delor Jul 7 '18 at 16:18
  • No, I'm afraid not. You could with @Mico's answer though, but you'd have to switch to LuaLaTeX or XeLaTeX for that. For example, {\addfontfeature{Ligatures=NoCommon}off} off prints "off" twice: once without ligatures and once with. – Circumscribe Jul 7 '18 at 16:28
  • -- is not a ligature; it's a digraph comprised of two ASCII characters representing the non-ASCII en dash. – chepner Jul 7 '18 at 20:54
  • 3
    @chepner It is a ligature as far as TeX is considered. That is, this is how it is coded. Of course, you are correct in the non-TeXnical sense of 'ligature'. – cfr Jul 7 '18 at 23:18
  • @chepner You're right, I've modified my answer to clarify this. – Circumscribe Jul 8 '18 at 12:01
18

From Buttericks Practical Typography:

Lig­a­tures were in­vented to solve a prac­ti­cal type­set­ting prob­lem. In the days of metal fonts, cer­tain char­ac­ters had fea­tures that phys­i­cally col­lided with other char­ac­ters. To fix this, font mak­ers in­cluded lig­a­tures with their fonts, which com­bined the trou­ble­some let­ters into one piece of type.

These are the examples:

enter image description here

However, not all fonts have the ff ligature with both letters fused, so if you do not like them, the best that you can do is to choose another font. In the Latex font catalogue every font has a section Ligatures and German double s, where you can see how they will be displayed.

For instance:

Bookman:

enter image description here

Cochineal:

enter image description here

Garamond:

enter image description here

Didot:

enter image description here

  • 2
    Maybe you can add a comparison of ligature vs no ligature in Computer/Latin modern (bold/normal). For bold I think the fi ligature is necessary, but the ff might be more debatable. – moewe Jul 7 '18 at 15:30
11

Ligatures are a feature of superior typography!

However, there are cases where good typography indeed calls for suppressing them, especially in German texts: at word-seams (German: Wortfuge).

With package babel and the ngerman option, ligatures are suppressed using "|

For example Auf"|lage, auf"|finden, auf"|fangen, schlaf"|los.

As stated in Mico's comment a number of English words also call for suppressing f ligatures. Here, this is accomplished through \/:

shelf\/ful, self\/less, half\/line, ...


But again, keep ligatures in different, affordable etc.

  • +1. I fully agree with you that (a) ligatures are a feature of superior typography and (b) there are cases when ligatures should be suppressed. However, the OP's example -- the word "different" -- is not among these cases; it may be worth stating this fact explicitly, lest there be any confusion among readers as to whether the ff ligature in different is somehow inappropriate. Incidentally, if you wanted to give examples of English language words for which f-ligatures should be suppressed, you could mention shelfful, selfless, halfline, wolffish (yes, there is such a thing), and chaffinch. – Mico Jul 7 '18 at 16:21
  • Thank you. I edited the answer. Is \/ the correct means of suppressing ligatures? – AlexG Jul 7 '18 at 16:30
  • 5
    Indeed, \/ is one possible way for suppressing ligatures, but it's not necessarily the best way. Other methods are inserting \kern0pt or {}. (However, the {}method does not work under Lua(La)TeX, and it doesn't even work always under pdf(La)TeX.) Aside: All of these methods have as a side-effect that hyphenation is no longer possible at the indicated ligature suppression points. A package (LuaLaTeX-only) that performs selective ligature suppression is selnolig. Full disclosure: I'm the main author and maintainer of this package. – Mico Jul 7 '18 at 16:48
  • 1
    Invented technical words may need a ligature suppressed: pdfid meaning the id number of a pdf tends to be mispronounced pee dee fid, without pdf\/id. – Camille Goudeseune Mar 28 at 20:04
10

If you absolutely must suppress ligatures (not a good idea, but since you insist...) and if you happen to use either XeLaTeX or LuaLaTeX to compile your LaTeX document, you could achieve your typesetting objective by specifying the option Ligatures=NoCommon while executing \setmainfont, \setsansfont, etc. Alternatively, run \defaultfontfeatures{Ligatures=NoCommon} before running \setmainfont and \setsansfont.

Aside: This method will not keep -- and --- from being made into en-dashes and em-dashes, respectively.

enter image description here

A final comment: Do learn not to only tolerate, but to actually appreciate and like typographic ligatures. They're your friends -- typographically speaking.

\documentclass{article} 
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=NoCommon}
\setmainfont{Latin Modern Roman}
\setsansfont{Myriad Pro}[Scale=MatchLowercase]
\newcommand\blurb{off fit fly office baffle}
\begin{document}
\blurb

\textbf{\blurb}

\sffamily
\blurb

\textbf{\blurb}
\end{document}

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.