When I use \usepackage[UTF8]{ctex} and input the formula like this:
\begin{equation}
y = \frac{\gamma}{\sqrt{Var[x] + \varepsilon } } \cdot x + (\beta - \frac{\gamma E[x]}{\sqrt{Var[x] + \varepsilon } }) \equiv BN_{\gamma ,\beta }(x)
% \widehat{x}^{(k)}=\frac{x^{(k)} - E[x^{(k)}]}{\sqrt{Var[x^{(k)}]} }
\label{BN}
\end{equation}
The correct formula I want should be
but instead I get it like this
As you can see, the math symbol - became `*. Why does this happen?
However, when I am not using \usepackage[UTF8]{ctex}, the equation is displayed correctly.
Here is some information about ctex.
package: ctex
category: Package
shortdesc: LaTeX classes and packages for Chinese typesetting
longdesc: ctex is a collection of macro packages and document classes for LaTeX Chinese typesetting.
installed: Yes
revision: 61285
sizes: src: 481k, doc: 1137k, run: 1753k
relocatable: No
cat-version: 2.5.8
cat-license: lppl1.3c
cat-topics: chinese book-pub class
cat-contact-repository: https://github.com/CTeX-org/ctex-kit
cat-contact-support: https://github.com/CTeX-org/ctex-kit/issues
cat-contact-home: http://www.ctex.org/HomePage
cat-contact-bugs: https://github.com/CTeX-org/ctex-kit/issues
collection: collection-langchinese
XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022)
kpathsea version 6.3.4
Copyright 2022 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 70.1; using 70.1
Compiled with zlib version 1.2.11; using 1.2.11
Compiled with FreeType2 version 2.11.1; using 2.11.1
Compiled with Graphite2 version 1.3.14; using 1.3.14
Compiled with HarfBuzz version 3.4.0; using 3.4.0
Compiled with libpng version 1.6.37; using 1.6.37
Compiled with pplib version v2.05 less toxic i hope
Compiled with fontconfig version 2.13.0; using 2.13.1
Here I'll provide an mwe:
% xelatex
% xelatex
\documentclass{article}
\usepackage{fontspec}
% \usepackage[scheme=plain]{ctex}
\usepackage{stix}
\begin{document}
$ \beta - a $
\end{document}







ctexpackage? – muzimuzhi Z May 25 '22 at 08:17xeCJK(internally used byctex) instead of the whole bundlectex. This should reduce possible conflicts between packages. And even if the problem remains, you shall have at least narrowed down the problem toxeCJK. – Jinwen May 25 '22 at 12:58stixandfontspecpackage. After xelatex,$-$turns to*– Syvshc May 25 '22 at 18:15\usepackage[no-math]{fontspec}. – muzimuzhi Z May 25 '22 at 19:15