I was using the \DeclareMathOperator* in amsmath to define some \mathop. The Following Example worked without ctex package.
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\hugeX}{X}
\DeclareMathOperator*{\hugepi}{\pi}
\DeclareMathOperator*{\hugeLambda}{\Lambda}
\begin{document}
\[
\hugeX_{n=1}^\infty + \hugepi_{n=1}^{\infty} + \hugeLambda_{n=1}^{\infty} + X + \lambda + \Lambda
\]
\end{document}
However, if the ctex package is loaded, the math alphabet \Lambda is missing!
And it yields the below:
Inspiring by the brilliant solution here, I can change the \operator@font, and it worked:
\documentclass{article}
\usepackage{ctex}
\usepackage{amsmath}
\DeclareMathOperator*{\hugeX}{X}
\DeclareMathOperator*{\hugepi}{\pi}
\DeclareMathOperator*{\hugeLambda}{\Lambda}
\DeclareFontShape{OMX}{cmex}{m}{n}{%
<-7.5>cmex7%
<7.5-8.5>cmex8%
<8.5-9.5>cmex9%
<9.5->cmex10%
}{}
\DeclareSymbolFont{MyOperatorFont}{OT1}{cmr}{m}{n}
\makeatletter
\def\operator@font{\mathgroup\symMyOperatorFont}
\makeatother
\begin{document}
\[
\hugeX_{n=1}^\infty + \hugepi_{n=1}^{\infty} + \hugeLambda_{n=1}^{\infty} + X + \lambda + \Lambda
\]
\end{document}
However, I noticed that unicode-math has the usage of defining a new \mathfontface, but I don't know how to assign the cmm as the default, the \mathrm seemed to be failed as below but \mathscr is not the default roman style:
\documentclass{article}
\usepackage{ctex}
\usepackage{amsmath}
\DeclareMathOperator*{\hugeX}{X}
\DeclareMathOperator*{\hugepi}{\pi}
\DeclareMathOperator*{\hugeLambda}{\Lambda}
\usepackage{unicode-math}
\setoperatorfont\mathcal % I don't know how to set is to be default cmr here...
\begin{document}
\[
\hugeX_{n=1}^\infty + \hugepi_{n=1}^{\infty} + \hugeLambda_{n=1}^{\infty} + X + \lambda + \Lambda
\]
\end{document}
In a word, My Question is that:
- What
ctexpackage's behavior to change the\operator@font? - Why in the above MWE, the
\pikeep the same, but the\Lambdamissing? - Is there easier method to fixed the
ctex's side-effect viaunicode-math?

