I would like to create a new "big operator", by which I mean something like the Σ character used for summations.
I know about the \DeclareMathOperator*
command, which creates an operator whose superscripts and subscripts are written directly above and below the operator. Here is an example of that.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\DeclareMathOperator*{\foo}{\maltese}
\begin{document}
\[
\foo_{i=3}^{6}(f^2(i))
\]
\end{document}
However, I would like to make my operator "big". I tried this:
\DeclareMathOperator*{\foo}{\text{\Large $\maltese$}}
but that feels like a bit of a hack. Besides, the operator is too high, and needs moving down a tad to align it properly with its operand. So, what's the proper way to do this? How, for instance, is the \sum
operator defined?
Best Answer
The
scalerel
package allows you to scale a symbol to the size (and vertical positioning) of another symbol. So in this case, I define\foo
to scale\maltese
to the size of\sum
. Thus, it piggybacks its sizing off the well defined behavior of\sum
.It wasn't clear to me if the questioner wanted to keep the maltese cross the same size in all operations. However, if that is the case, I can redefine the
\foo
operator as\barr
in order to keep the size equal to that of atextstyle
summation sign. The example below shows instances of\foo
as well as\barr
in both displaystyle and inline.Edit: Use
scalerel
version 1.5 or later to ensure thatscalerel
captures the current math style.