similar to DeclareMathOperator does not respect math font . Here is my mwe:

$ \sin x $ 

It output

enter image description here

But my expected output is

enter image description here

How can I get my expected output when only loading newtxmath package without newtxtext.


The reason why I can't use newtx or newtxtext package: I'm a ctex package user, newtx(text) is incompatible with ctex package, so I have to set main font myself. I put mwes below, all of them should be compiled with xelatex:

% \usepackage{newtx}
  测试\textbf{测试}\textit{测试}{\heiti 测试}{\kaishu 测试}
! Package fontspec Error: The font "SimHei" cannot be found.

For immediate help type H <return>.

l.4   测试\textbf{测试}\textit{测试}{\heiti
                                      测试}{\kaishu 测试}

If I change newtxtext to newtx, I'll get

! LaTeX Error: Option clash for package fontspec.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.465     \ifnum
                \ntx@id=10\relax % libertinus

If I use nofontspec or type1 option to load newtxtext package, it will break itself with xelatex


enter image description here

  • I found this question: tex.stackexchange.com/q/638757/180617 . But I don't know how to fix it.
    – Syvshc
    May 2, 2022 at 13:58
  • Try the newtx package maintainer!
    – murray
    May 2, 2022 at 18:18
  • @murray well, I'm a ctex package user, newtx(text) is incompatible with ctex package, so I have to set main font myself:(
    – Syvshc
    May 3, 2022 at 12:31

2 Answers 2


You want to teach LaTeX what's the operators font.





$ 2\sin x $


enter image description here

On the other hand, the most recent versions of NewTX can recognize when XeLaTeX or LuaLaTeX are used and you can simply do


which will employ a variant of TeX Gyre Termes, but essentially the same.

  • In fact, with current newtx (since version 1.7), you need only use \usepackage{newtx}.
    – murray
    May 2, 2022 at 18:34

Most of the fixes that I’d usually recommend break with newtxmath, which is not very compatible with other packages. I’d therefore recommend you do one of two things.

Cut the Gordian Knot

If you can use fontspec, you can use unicode-math and load an OpenType math font, instead of newtxmath.


\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}

Variations include: TeX Gyre Termes X as a text font closer to newtxtext, XITS and XITS Math, or \usepackage[times]{fontsetup}.

Go Back to Legacy Fonts

The package does work with

\usepackage{newtxtext, newtxmath}

If you need Greek or Cyrillic, you might use another font, such as tempora.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .