4

In an equation, I want to print a subscript without ligatures. LaTeX automatically connects the characters when in math mode with \mathrm. I tried using the selnolig package providing the command \nolig{eff}{ef|f} without success. The result I get:

enter image description here

As seen, the ff's in eff are connected, which is not desired. The \nolig{eff}{ef|f} command does work in normal text, just not in math mode with \mathrm. Does anyone have a solution for locally disabling ligatures or an alternative to \mathrm?

1
  • Welcome to TeX.SE. The selnolig package works only under LuaLaTeX. It does not work under either pdfLaTeX or XeLaTeX. However, the following test document (which doesn't even load selnolig!) -- \documentclass{article} \usepackage{fontspec} \begin{document} $\mathrm{eff}$ $\sqrt{\varepsilon_{\mathrm{eff}}}$ \end{document} -- does not produce ff-ligatures in the "eff" substrings when compiled under LuaLaTeX. Again, no need to load selnolig and run \nolig{eff}{ef|f}. Please clarify what exactly you've tried. In particular, do state how you compile your document.
    – Mico
    May 5 at 14:26
5

The easiest way to locally split up a ligature is to use an italic correction by adding \/ or {} between the f & f:

\lambda_g = \frac{c}{f\sqrt{\varepsilon_{\mathrm{ef\/f}}}} 

or

\lambda_g = \frac{c}{f\sqrt{\varepsilon_{\mathrm{ef{}f}}}} 
1
  • 2
    I ended up using the first solution including \/. Thanks a lot! May 5 at 18:05

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.