I'm trying to reproduce an old book with XeLaTeX, and it has the ct ligature but not the st ligature. The Ligatures=Rare option seems to turn either both on or off. Is there a way to select which ligatures to use in XeLaTeX? I am using the Adobe Caslon Pro OTF fonts. I know the microtype package may be able to do this but it is not supported by XeLaTeX. Any help is appreciated.

Another question I have is, is it possible to change ligature options midway through a document? Or perhaps temporarily change the ligatures for one occasion?


This is possible using Mico's selnolig package. It is on CTAN, and added to TeX Live and MikTeX. selnolig requires the document to be compiled with lualatex, but that wouldn't keep you from using your fonts; indeed, it is pretty similar to xelatex in usage.

(Btw, microtype is available for LuaTeX -- most of its functions -- but it cannot selectively deactivate ligatures. That's why selnolig was created.)

In this MWE, I load selnolig without either of its language options (it can deal with German and English), so it only gets rid of ligatures where I tell it to with \nolig rules. Since I don't have the Adobe Caslon Pro OTF fonts, I used Linux Libertine, which has the ⟨st⟩ and ⟨ct⟩ ligatures in its Historical set.

    \setmainfont{Linux Libertine O}
best pact 

output with selnolig

Just as a comparison, here's the output without selnolig:

output without selnolig

selnolig's main purpose is to automatically suppress ligatures across morpheme boundaries in German and English texts. Its documentation explains all about how to use it (and how to use lualatex, if you'd like some pointers there).

See also New package, selnolig, that automates suppression of typographic ligatures on Meta.

| improve this answer | |
  • 2
    Yes! Thank you for that information. Worked flawlessly. – Neo Dec 11 '12 at 22:07
  • Is there no way to do this with xelatex? We have to use xelatex because of the publisher. – Stefan Müller Nov 26 '17 at 9:33
  • @StefanMüller With selnolig, definitely not. It depends on lualatex internally. – doncherry Nov 27 '17 at 14:01

@doncherry has already addressed your main question. I'll take a stab at your second set of questions:

Another question I have is, is it possible to change ligature options midway through a document? Or perhaps temporarily change the ligatures for one occasion?

You're not very specific as to which of potentially very many ligature-related options you're looking to change, so my answer has to be quite broad. I think your best bet is to use the \newfontfamily command of the fontspec package to set up a "new" font (which could be the same as that set by \setmainfont...) and some font-related options. For instance, you could have the following setup in your document's preamble:

    \setmainfont[Ligatures={Common,Rare}]{Adobe Caslon Pro}
\newfontfamily\acptemp[Ligatures={NoCommon}]{Adobe Caslon Pro}

You could then issue the commands


inside the document's body to switch to a setup with all ligatures disabled within the scope of \bgroup ... \egroup -- while keeping the same basic font.

| improve this answer | |
  • Sorry about the vague question. What I meant was, say I would like to enable the st ligature for a particular page, but keep it disabled for the rest of the document. Is there a way to achieve this? – Neo Dec 12 '12 at 17:36
  • 1
    @Neo: Thanks for providing this clarification. The selnolig package currently works on an entire document; there's no option (yet!) to disable its operation for a certain range. For now, I'd suggest that you replace all instances of st with \mbox{st} to "hide" in the document's passage of interest. Doing so will "hide" the st character pair from the \nolig{st}{s|t} command. A bit kludgy, I'm afraid. :-( – Mico Dec 12 '12 at 17:48
  • Thank you for your reply. Since it's only about a page it's not a lot of work. I have tried your package and it works great. Again, thanks for all the work and help! – Neo Dec 12 '12 at 18:18
  • 2
    @Neo - I've gone ahead and created the macros \selnoligon and \selnoligoff. As their names suggest, they serve to switch selnolig's macros on and off. (The default switch setting is, unsurprisingly, \selnoligon.) I've uploaded the files affected to the GitHub site; be sure to download both selnolig.sty as well as selnolig.lua. The user guide now features a subsection to mention this new functionality. – Mico Dec 12 '12 at 19:28

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.