14

Like The New Yorker, I want my Adobe Caslon Pro to have ligatures for ffl, ffi, etc. but not for Th.

Using LuaLaTeX, how can I simply disable the Th ligature? Is it possible to do this without using the selnolig package, and, if not, could you tell me exactly how I should alter my preamble to make selnolig work?

\documentclass[fontsize=13.5pt,oneside,DIV=calc]{scrbook}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Adobe Caslon Pro}
\usepackage[paperwidth=150mm,paperheight=225mm]{geometry}
\geometry{verbose,tmargin=0.55in,bmargin=0.5in,lmargin=0.6in,rmargin=0.6in}
\pagestyle{empty}
\usepackage{microtype}
\usepackage{csquotes}
\MakeOuterQuote{"}
\MakeInnerQuote{´}
\automatichyphenmode=1
\frenchspacing
\usepackage{polyglossia}\setdefaultlanguage[variant=american]{english}
0

2 Answers 2

24

Note: The solution in this answer gives more fine grain control to disable/enable ligatures than using selnolig. AFAIK, selnolig disables the ligature globally for all fonts. The original question doesn’t mention the intent to disable Th ligature for all fonts used in the document, on the contrary it names the exact font family “Adobe Caslon Pro” for which it should be disabled. With fontspec solution you can achieve either result: globally disable for all fonts or on a per-font basis.

This lualatex solution is from the detailed answer here. Run with command >> lualatex <filename>.tex. The source of this is from ConTEXt land, look at section 8.14 "Fonts out of ConTEXt", by Hans Hagen of Pragma ADE

\usepackage{fontspec}
\directlua{
  fonts.handlers.otf.addfeature{
    name = "noth",
    type = "multiple",
    data = {
      ["T_h"] = { "T", "h" },
    },
  }
}

% Option-1 To disable the ligature for just Adobe Caslon Pro
\setmainfont[Ligatures=TeX,RawFeature=+noth]{Adobe Caslon Pro}

% OR

% Option-2 To disable the ligature globally for all fonts
\defaultfontfeatures{RawFeature=+noth}
\setmainfont[Ligatures=TeX]{Adobe Caslon Pro}

4
  • 5
    I'm incredibly impressed you managed to work this out. I can't imagine how much learning of LaTeX I'll have to do to be able to get to this level. You have solved a problem I have spent months trying to fix. I cannot articulate how grateful I am for this seemingly tiny thing.
    – Richie101
    Commented Apr 18, 2020 at 3:30
  • 2
    @Richie101 Am happy it helped you. There is a lot to learn, it just takes time, and depends on background. I don't think I have myself reached the level where I envision myself to be in TeX knowledge :)
    – codepoet
    Commented Apr 18, 2020 at 4:49
  • 1
    @Richie101 I have updated the answer as the way I interpreted it, you intended to disable it just for Adobe Caslon Pro, and do not mention what should be the effect on other fonts (like whether this is intended to be a global change or not). Now you have more options, choose what works for you.
    – codepoet
    Commented Apr 18, 2020 at 12:16
  • 1
    Is there a way to make something like this work with Renderer=OpenType ?
    – gnucchi
    Commented Mar 9, 2021 at 11:57
26

You asked, among other things,

...could you tell me exactly how I should alter my preamble to make selnolig [disable the "Th" ligature globally]?

Here you go:

\usepackage{selnolig} % don't specify a language option
\nolig{Th}{T|h}

For more information, see section 5.5 of the package's user guide, "How to use the selnolig package to suppress certain ligatures globally".

5
  • 2
    Is there a way to do this so that it only applies to a specific font? If I wanted selnolig to just apply to Adobe Caslon Pro, could I do that?
    – Richie101
    Commented Apr 19, 2020 at 1:28
  • 1
    @Richie101 - No. That would require a major rewrite of the package. Incidentally, I don't quite understand the premise of your follow-up questions. If you want to suppress the Th-ligature that's provided by, say, Adobe Caslon Pro, why wouldn't you also want to suppress it for all other fonts that feature this particular ligature? Suppose, say, that your document features both Adobe Caslon Pro and EB Garamond. What will your readers think when they notice that the Th-ligature is suppressed in one font but not the other? After all, the Th-ligature is very easily noticed.
    – Mico
    Commented Apr 19, 2020 at 5:33
  • 3
    I might want enable ligatures for occasions where I use sans serifs for titles.
    – Richie101
    Commented Apr 19, 2020 at 8:36
  • 1
    @Richie101 - Can you provide an example of a sans-serif font that provides a Th-iigature? (I'm not familiar with any such font, but of course that needn't mean much...) BTW, the selnolig package provides the \uselig macro, with which one can override \nolig rules on a case-by-case basis. E.g., \section{\uselig{The This That There Then}}.
    – Mico
    Commented Apr 19, 2020 at 8:48
  • 3
    Absolutely. PTL Attention uses a discretionary ligature for Th. But I don't want to necessarily just enable ligatures for Th. Your answer is perfect though. It is great that selnolig does not require a major rewrite; \nolig will be very useful.
    – Richie101
    Commented Apr 19, 2020 at 9:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .