Newtxmath/lmodern broken

lmodernnewtxmathsymbols

I just updated my MiKTeX packages. Output now seems to be missing mathematical operators if I load both newtxmath and lmodern.

\documentclass[a4paper,twoside,12pt]{article}

\usepackage{newtxmath}
\usepackage{lmodern}

\begin{document}

$(3 + 5) \times 2 = \lambdaup$

\end{document}

The output on my system is missing the brackets and + symbol. I am (relatively) certain that this behaviour is new – is one/both of the packages broken?

Best Answer

In the log you will see

Missing character: There is no � in font lmsy10!
Missing character: There is no � in font lmsy10!
Missing character: There is no � in font lmsy10!
Missing character: There is no � in font lmsy10!

They are not so much broken as naturally incompatible.

newtxmath changes all the commands to fit the encoding of the txmath fonts then you switched fonts to latin modern

If you really want Latin Modern Text paired with Times Roman style Math, then load the packages in the other order so that the math settings match the math fonts in use


\documentclass[a4paper,twoside,12pt]{article}
\tracinglostchars2

\usepackage{lmodern}
\usepackage{newtxmath}

\begin{document}

$(3 + 5) \times 2 = \lambdaup$

\end{document}

enter image description here

However These fonts don't really match at all so normally you would just use \usepackage{lmodern} to have Latin Modern text and math, or \usepackage{newtxtext,newtxmath} to have new tx (Times Roman style) text and math.

an upright lambda better fitting with latin modern is provided by upgreek which only adds these letters and doesn't change the entire math setup:

enter image description here

\documentclass[a4paper,twoside,12pt]{article}
\tracinglostchars2

\usepackage{lmodern}
\usepackage{upgreek}

\begin{document}

$(3 + 5) \times 2 = \uplambda$

\end{document}
Related Question