[Tex/LaTex] How to change math symbols of the stix package to CM ones

math-operatorsstix

Well, math operators like \int or \sum provided by the stix package are in my opinion ugly and I want those of CM instead. Is it possible? If so, how?

Best Answer

The chase starts from finding out how \int is defined by default: one sees that \int becomes \intop\nolimits and we want to see how \intop is defined.

The answer is in fontmath.ltx, one of the files read in at format creation; line 268 has

\DeclareMathSymbol{\intop}{\mathop}{largesymbols}{"52}

OK, what's largesymbols? Line 77 has

\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}

Very well, the hunt was successful!

\documentclass{article}
\usepackage{stix}

\DeclareSymbolFont{largesymbolsCM}{OMX}{cmex}{m}{n}
\DeclareMathSymbol{\intop}{\mathop}{largesymbolsCM}{"52}

\begin{document}
\[
\int_{a}^{b} f(x)\,dx=\textstyle\int_{a}^{b}f(x)\,dx
\]
\end{document}

enter image description here

For \sum the hunt is a bit harder, because one should know that stix takes an approach similar to amsmath, so we have to redefine \sumop.

\documentclass{article}
\usepackage{stix}

\DeclareSymbolFont{largesymbolsCM}{OMX}{cmex}{m}{n}
\DeclareMathSymbol{\intop}{\mathop}{largesymbolsCM}{"52}
\DeclareMathSymbol{\sumop}{\mathop}{largesymbolsCM}{"50}

\begin{document}
\[
\int_{a}^{b} f(x)\,dx=\textstyle\int_{a}^{b}f(x)\,dx
\]
\[
\sum_{k=1}^n k^2=\frac{1}{3}n\biggl(n+\frac{1}{2}\biggr)(n+1)
\]
\end{document}

enter image description here

After seeing the result with \sum, I doubt one would like to have it.

Related Question