[Tex/LaTex] How to resize \Sum and \Prod commands

math-moderesize

I'd like to make \sum and \prod symbols slightly smaller than they usually are. There are several related questions, but none of them does exactly what I need. I do not want them to be as small as \scriptsize or smaller; also, I want limits in textstyle and displaystyle to be as they originally are (that is, up and down in math mode; and next to $\sum$ and $\prod$ when inline). I have tried many things, but could not get what I desire. A (rather useless, I admit) MWE would be:

\documentclass{article}
\let\oldsum\sum
\renewcommand{\sum}{\oldsum}

\let\oldprod\prod
\renewcommand{\prod}{\oldprod}

\begin{document}
\begin{equation}
\sum \prod
\end{equation}
\end{document}

How could I resize sum and prod keeping the limits as they usually are? Thank you all in advance for your time.

Best Answer

Here's a solution compatible with amsmath:

\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}

\makeatletter
\newcommand{\changeoperator}[1]{%
  \csletcs{#1@saved}{#1@}%
  \csdef{#1@}{\changed@operator{#1}}%
}
\newcommand{\changed@operator}[1]{%
  \mathop{%
    \mathchoice{\textstyle\csuse{#1@saved}}
               {\csuse{#1@saved}}
               {\csuse{#1@saved}}
               {\csuse{#1@saved}}%
  }%
}
\makeatother

\changeoperator{sum}
\changeoperator{prod}

\begin{document}

Display style: $\displaystyle \sum_{k=1}^n a_k+\prod_{k=1}^n b_k$

\bigskip

Text style: $\sum_{k=1}^n a_k+\prod_{k=1}^n b_k$

\bigskip

Script style: $\scriptstyle \sum_{k=1}^n a_k+\prod_{k=1}^n b_k$

\bigskip

Scriptscript style: $\scriptscriptstyle \sum_{k=1}^n a_k+\prod_{k=1}^n b_k$

\end{document}

enter image description here

Related Question