2

What causes this warning, and how to get rid of it?

I believe that I have installed some packages that make this warning, but I couldn't figure out how to undo this damage.

P.S. I am using MikTeX 2.9 on Win 10.

OpenType feature 'Ligatures=RequiredOff' (rlig) not(fontspec) available for font 'LatinModernRoman' with script(fontspec) 'CustomDefault' and language 'Default'.

\documentclass{elsarticle}

\usepackage{mathtools,mwe}
\usepackage[tuenc,no-math]{fontspec}
\usepackage[bold-style=TeX]{unicode-math}
\setmathfont[math-style=ISO]{Cambria Math}
\setmainfont[
Ligatures={NoRequired,
    NoCommon,
    NoContextual}
]{Latin Modern Roman}

\biboptions{square,numbers,sort&compress}

\begin{document}
    text
\end{document}
Diaa
  • 9,599

1 Answers1

3

Latin Modern Roman has only two font features for ligatures:

otfinfo -f lmroman12-regular.otf | grep lig

has the output:

dlig    Discretionary Ligatures
liga    Standard Ligatures

If you do not want a warning then use:

\setmainfont[ Ligatures={NoCommon, % liga
                         NoRare,% dlig
}]{Latin Modern Roman}
user187802
  • 16,850
  • Many thanks. May I know from where can I get the info you gave here? – Diaa Oct 07 '19 at 18:38
  • 1
    The programm otfinfo comes with every TeX-Distribution. The features are explained in the documentation of fontspec – user187802 Oct 07 '19 at 18:49
  • I ran this otfinfo -f lmroman12-regular.otf | grep lig in the command prompt and got this'otfinfo' is not recognized as an internal or external command. Am I doing it right? Additionally, I would be grateful if you explained how can I know that Latin Modern Roman maps to lmroman12-regular.otf? – Diaa Oct 07 '19 at 21:31
  • Which TeX distribution? Which operating system? – user187802 Oct 08 '19 at 05:19
  • Miktex 2.9 on Win10 – Diaa Oct 08 '19 at 23:05
  • I have no experience with MiKTeX, but I suppose that MiKTeX do not install the font tools. – user187802 Oct 09 '19 at 08:08
  • otfinfo is not part of the standard texlive installation on ubuntu either. – Clément Nov 29 '21 at 22:33
  • @Clément: Then simply install it ... : https://packages.ubuntu.com/search?keywords=lcdf-typetools – user187802 Nov 30 '21 at 07:33
  • Yes, of course; I was just mentioning it since the discussion above said every TeX distribution. – Clément Nov 30 '21 at 14:19