Is there a way to selectively disable a specific ligature in XeLaTex? I cannot see how. The selnolig package seems to do what I need but I don't even know how to use Lualatex with my Texshop setup on Mac.
Specifics:
I am using XeLaTex, new to it and trying to figure my way around and set up some standard templates for my own use, e.g. academic papers. I am mostly using Linux Libertine O. I have the same issue with Adobe Caslon Pro.
Why:
The "Th" ligature bothers me, particularly in titles. I never see it used in print. See, for example, the New Yorker magazine which uses Caslon, most ligatures are set but never Th. I never see it in books either. (I know this is picky).
Best Answer
As far as I know, there is no official way to disable a specific ligature. There are two workarounds: defining a new mapping, as egreg suggested, or using the
XeTeXinterchartokenstate
mechanism.The latter is the one I prefer. I start by defining two character classes:
FirstClass
forT
andSecondClass
forh
:I then instruct XeTeX to insert zero-size glue between
T
andh
:Note that I'm using
\hskip
, which inserts glue, rather than\kern
, which inserts a kern, as the latter has the side-effect of disabling hyphenation. However glue allows line breaks, which I disable by inserting a penalty.No kerning will be applied between the
T
and theh
, so you might need to tweak the width of the glue.