# Ligatures in mathrm mode

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:

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?

• 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 '21 at 14:26

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}}}}

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

• I ended up using the first solution including \/. Thanks a lot! May 5 '21 at 18:05