6

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?

9

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.

5
  • 3
    One suspects that the hunt was rigged and that you knew where the prey was hiding. Nov 13 '14 at 21:13
  • 1
    @DavidCarlisle Shhh!
    – egreg
    Nov 13 '14 at 21:14
  • Great job. Appreciate it. However, I like all of them changed! I tested your code with \DeclareMathSymbol{\sum}{\mathop}{largesymbols}{"50} and it didn't work!
    – Milad O.
    Nov 14 '14 at 7:03
  • @MiladO. If you want to also change \sum, you need largesymbolsCM as for \intop
    – egreg
    Nov 14 '14 at 9:35
  • @egreg What if i need to replace the CM sum symbol with the STIX ones? is it possible?
    – C.S.
    Apr 25 '17 at 8:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.