7

In order to know which ligatures I might consider disabling, I would like to know which ones are actually used in my document. (Which ligatures are provided by a font is a more general question; I have created a separate question for this: Which ligatures do the fonts used in my document offer?)

The following code

\RequirePackage{fix-cm}
\documentclass[12pt]{memoir}
\usepackage{fixltx2e}[2006/09/13]
\usepackage{microtype}


\begin{document}

flicker -- fingers affliction affidavit

\end{document}

will ligate "fl", "--", "fi", "ffl", and "ffi", but not "ff" or "---". (I think this covers the standard ones for English. Of course en-dash (for "--") and em-dash (for "---") aren't normally considered ligatures, but I've seen them being referred to as such by at least some literature on (La)TeX, so I'm including them here. In this context this can be justified, as (La)TeX treats (creates/processes) them as ligatures.) How can I find out about this in an automated manner? I normally use pdflatex, if this matters.

  • ... That ligatures are disappearing is true for English too. Put bluntly, this is not well-known among tech types (this includes the (La)TeX community but also certain font designers who are glad to design such special glyphs). – Lover of Structure Mar 31 '13 at 3:48
  • "Th" seems to be a relatively common ligature serif fonts, too, though obviously not as common as the "f" ligatures. – Mars Apr 1 '13 at 3:36
  • 1
    For a method that disables certain ligatures selectively or globally see, e.g., (Suppression of a ligature in XeLaTeX)[tex.stackexchange.com/q/86593/5001]. Note that the selnolig package mentioned in the answers requires the document to be typeset using LuaLaTeX rather than pdfLaTeX or XeLaTeX. – Mico Apr 1 '13 at 6:59
  • By the way, I actually have a feeling that ligatures might be making a bit of a comeback through modern font technology (and they've certainly been kept alive by TeX), but this is just a guess. I'll be curious to see how they end up being adopted by the various communities. – Lover of Structure Apr 1 '13 at 12:48
8

I would say you can't, not in an easy way.

At first you don't have a clear concept about what is a ligature and what not: from the technical point you could mean every replacement of one or more glyph by one or more other glyphs. Then the spanish ¿ would count as a ligature of "?`" -- only because TeX converts this input to ¿. But from the typographical view only some glyphs count as ligatures: the fl combination is a ligature, but not —.

At second: you can look up the replacement ("ligature") rules of a font in the tfm. But I don't think that there is a way to get notified when one of these rules are applied (this could be different with luatex. There it is possible to inspect the nodes).

But even if you could mark somehow all glyphs that are results of the ligature process: It wouldn't mean that all ligature glyphs are marked. It is quite possible to input a ligature glyph directly:

\documentclass{article}
\usepackage[T1]{fontenc}

\begin{document}
ff \char"1B
\end{document}

So to really get a complete information about (ligature) glyphs used in a pdf you will have to inspect this very pdf.

  • First of all, I think this is a good answer. Some opinions: 1. I agree about !` and ?` (which are in the same class as -- and ---), though I'd put them (together with -- and ---) into the category "predictable TeX quirks", so they can easily be excluded (or not, which would be interesting too). 2. I agree about the limitation wrt inputting ligature glyphs directly. 3. This still leaves us (the community) with two very sensible options: (i) wait for a LuaTeX guru to solve it :-) and (ii) figure out tfm-files. – Lover of Structure Apr 1 '13 at 0:17
  • I just opened a bunch of tfm-files randomly (they all look binary); is there an obvious "easy" way of extracting what I need (a ligature list) from them? If not, what might be the best source for me to look into to figure it out? (Of course "making it a separate question" is always a lazy possibility ...) – Lover of Structure Apr 1 '13 at 0:19
  • 2
    @LoverofStructure You can translate tfm files to human-readable format (pl: "property list") with tftopl. – Robert Apr 1 '13 at 2:51
  • You need to look at the vf file if you use virtual fonts, too. These can be similarly converted with vftovp. – cfr Nov 21 '13 at 4:01

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.