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?
[Tex/LaTex] How to change math symbols of the stix package to CM ones
math-operatorsstix
Related Solutions
We can scale the symbol to the height plus depth of the summation and then vertically center it with respect to the formula axis.
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\makeatletter
\DeclareRobustCommand\bigop[1]{%
\mathop{\vphantom{\sum}\mathpalette\bigop@{#1}}\slimits@
}
\newcommand{\bigop@}[2]{%
\vcenter{%
\sbox\z@{$#1\sum$}%
\hbox{\resizebox{\ifx#1\displaystyle.9\fi\dimexpr\ht\z@+\dp\z@}{!}{$\m@th#2$}}%
}%
}
\makeatother
\newcommand{\bigstar}{\DOTSB\bigop{\star}}
\newcommand{\bigA}{\DOTSB\bigop{\mathrm{A}}}
\begin{document}
\[
\sum_{i=1}^n\bigA_{i=1}^n x_i\dots\bigstar_{i=1}^n x_i
\qquad
\textstyle
\sum\bigA\bigstar_{i=1}^n x_i
\qquad
\scriptstyle
\sum\bigA\bigstar_{i=1}^n x_i
\qquad
\scriptscriptstyle
\sum\bigA\bigstar_{i=1}^n x_i
\]
\end{document}
A simpler but not not scalable version (it won't work in
\newcommand{\opA}{\mathop{\vphantom{\sum}\mathchoice
{\vcenter{\hbox{\huge A}}}
{\vcenter{\hbox{\Large A}}}{\mathrm{A}}{\mathrm{A}}}\displaylimits}
In this way the "A" will be as large as the \sum
symbol.
An enhanced version, where one can specify a correction factor for the big symbol in display style, as different symbols seem to require different factors.
\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\makeatletter
\DeclareRobustCommand\bigop[2][1]{%
\mathop{\vphantom{\sum}\mathpalette\bigop@{{#1}{#2}}}\slimits@
}
\newcommand{\bigop@}[2]{\bigop@@#1#2}
\newcommand{\bigop@@}[3]{%
\vcenter{%
\sbox\z@{$#1\sum$}%
\hbox{\resizebox{\ifx#1\displaystyle#2\fi\dimexpr\ht\z@+\dp\z@}{!}{$\m@th#3$}}%
}%
}
\makeatother
\newcommand{\bigstar}{\DOTSB\bigop{\star}}
\newcommand{\bigA}{\DOTSB\bigop[0.92]{\mathrm{A}}}
\newcommand{\bigDelta}{\DOTSB\bigop[1.05]{\Delta}}
\begin{document}
\[
\sum_{i=1}^n\bigA_{i=1}^n\bigDelta_{i=1}^n x_i\dots\bigstar_{i=1}^n x_i
\]
\begin{center}
$\textstyle
\sum \bigA \bigstar \bigDelta_{i=1}^n x_i
\qquad
\scriptstyle
\sum \bigA \bigstar \bigDelta_{i=1}^n x_i
\qquad
\scriptscriptstyle
\sum \bigA \bigstar \bigDelta_{i=1}^n x_i
$
\end{center}
\end{document}
Here's how to add the requested symbols. You don't have correctly identified the required fonts and symbols.
Look for \lbrbrak
in stix.sty
, to find
\stix@MathDelimiter{\lbrbrak} {\mathopen} {largesymbols}{"EE}{largesymbols}{"14}
\stix@MathDelimiter{\rbrbrak} {\mathclose}{largesymbols}{"EF}{largesymbols}{"15}
Thus we need to see what font largesymbols
refers to:
\DeclareSymbolFont{largesymbols} {LS2}{stixex} {m} {n}
OK, now we need LS2
:
\DeclareFontEncoding{LS2}{}{\noaccents@}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
Next we have to choose a different symbolic name for the math font and put the pieces together (in reverse order).
\documentclass{amsart}
\makeatletter
\DeclareFontEncoding{LS2}{}{\@noaccents}
\makeatother
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{largesymbolsstix}{LS2}{stixex}{m}{n}
\DeclareMathDelimiter{\lbrbrak}{\mathopen}{largesymbolsstix}{"EE}{largesymbolsstix}{"14}
\DeclareMathDelimiter{\rbrbrak}{\mathclose}{largesymbolsstix}{"EF}{largesymbolsstix}{"15}
\newcommand{\newbrak}[2]{\genfrac{\lbrbrak}{\rbrbrak}{0pt}{}{#1}{#2}}
\begin{document}
\begin{equation}
\lbrbrak x\rbrbrak,\quad
\bigl\lbrbrak x\bigr\rbrbrak,\quad
\newbrak{k}{m} = (m n)! \, \frac{\Omega_{k}(z)}{\Omega_{m}(z)}
\end{equation}
\end{document}
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 hasOK, what's
largesymbols
? Line 77 hasVery well, the hunt was successful!
For
\sum
the hunt is a bit harder, because one should know thatstix
takes an approach similar toamsmath
, so we have to redefine\sumop
.After seeing the result with
\sum
, I doubt one would like to have it.