4

enter image description here

I bet this fancy summation operand S is in fact $\mathcal{S}$, am I right?

But how do I modify the size of this thingy? \bigg or \left\right doesn't seem to work...

And something like this: $\mathcal{S}^b_a\frac k2$ looks well... not very nice:

enter image description here

Werner
  • 603,163
gaazkam
  • 243

3 Answers3

6

Not sure if you really want the calligraphic S to be sized as the summation symbol, taking limits above and below in display style, but here it is:

\documentclass{article}
\usepackage{amsmath,graphicx}

\makeatletter
\newcommand{\fancysum}{%
  \mathop{%
    \vphantom{\sum}%
    \mathpalette\fancy@sum\relax
  }\slimits@
}
\newcommand{\fancy@sum}[2]{%
  \sbox\z@{$#1\sum$}%
  \dimen@=\ht\z@
  \advance\dimen@\dp\z@
  \vcenter{\hbox{%
    \resizebox{!}{\ifx#1\displaystyle.9\fi\dimen@}{%
      $\m@th\mathcal{S}$%
    }%
  }}%
}
\makeatother

\begin{document}
\[
\sum_{k=a}^{b}
\fancysum_{k=a}^{b}\frac{k}{2}
\textstyle\sum\fancysum
\scriptstyle\sum\fancysum
\]
\end{document}

The \textstyle and \scriptstyle declarations are just by way of example, in order to show that the symbol scales properly.

I added a 0.9 factor in displaystyle or the overshoot would become too prominent.

enter image description here

egreg
  • 1,121,712
4

Here is an option using \mathchoice, where you can adjust the parameters to suit your needs:

enter image description here

\documentclass{article}
\usepackage{amsmath,graphicx}

\DeclareMathOperator*{\fancysum}{%
  \mathchoice% http://tex.stackexchange.com/q/148740/5764
    {\raisebox{-.325\height}{\scalebox{2.2}{$\mathcal{S}$}}}% \displaystyle
    {\raisebox{-.25\height}{\scalebox{1.5}{$\mathcal{S}$}}}% \textstyle
    {\raisebox{-.2\height}{\scalebox{0.95}{$\mathcal{S}$}}}% \scriptstyle
    {\raisebox{-.25\height}{\scalebox{0.75}{$\mathcal{S}$}}}}% \scriptscriptstyle

\begin{document}

\[
  \renewcommand{\arraystretch}{3}
  \begin{array}{c}
    \displaystyle \sum_2^1 \frac{12}{2} \quad \fancysum_2^1 \frac{12}{2} \\
    \textstyle \sum_2^1 \frac{12}{2} \quad \fancysum_2^1 \frac{12}{2} \\
    \scriptstyle \sum_2^1 \frac{12}{2} \quad \fancysum_2^1 \frac{12}{2} \\
    \scriptscriptstyle \sum_2^1 \frac{12}{2} \quad \fancysum_2^1 \frac{12}{2}
  \end{array}
\]

\end{document}
Werner
  • 603,163
3

Based on my answer at How are big operators defined?. I provide two versions, depending on whether you want it large in \displaystyle or to keep it text-size in that style.

It is made to occupy the same vertical size as the summation operator, and should behave as such for the purpose of its indices.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\DeclareMathOperator*{\foo}{\scalerel*{\mathcal{S}}{\sum}}
\DeclareMathOperator*{\barr}{\scalerel*{\mathcal{S}}{\textstyle\sum}}
\usepackage{scalerel}

\begin{document}
\[
\foo_{i=3}^{6}(f^2(i))
\]

This is inline: \(\foo_{i=3}^{6}(f^2(i)) \)

\[
\barr_{i=3}^{6}(f^2(i))
\]

This is inline: \(\barr_{i=3}^{6}(f^2(i)) \)

\[
\foo_a^b f = g\rvert_a^b = \sum_{k=a}^{b-1} f(k)
\]
\end{document} 

enter image description here