[Tex/LaTex] Long summation symbol

math-modemath-operators

I need to put a long expression under summation symbol in single row.
For example like this $(i_1,\ldots,i_n)\in\mathcal{P}(\overline{1,n})$.
How can I get a long summation symbol? Long but not tall.
Minimal working example is

    \documentclass{article}
    \begin{document}
    \[\sum_{(i_1,\ldots,i_n)\in\mathcal{P}(\overline{1,n})}\]
    \end{document}

I want summation symbol have same length as string under it.
Something like this

enter image description here

But, maybe, I ask something unusual and unapplicable.

Best Answer

Don't do this.

Not making it intelligent on purpose. But it could be made intelligent.

\documentclass{article}

\usepackage{adjustbox,expl3,etoolbox}

\letcs\replicate{prg_replicate:nn}

\newcommand*\longsum[1][1]{%
  \mathop{\textnormal{%
    \clipbox{0pt 0pt {.5\width} 0pt}{$\displaystyle\sum$}%
    \replicate{#1}{\clipbox{{.5\width} 0pt {.4\width} 0pt}{$\displaystyle\sum$}}%
    \clipbox{{.6\width} 0pt 0pt 0pt}{$\displaystyle\sum$}}}%
}

\begin{document}

\[
  \longsum[31]_{(i_1,\ldots,i_n)\in\mathcal{P}(\overline{1,n})}
\]

\end{document}

longsum

Here you use \longsum_{like always} but it has an optional argument which repeats a part of the sum to be longer. In your particular case \longsum[31]_{..} seems to do.


Oh, or may be what you want is to reduce space around the \sum symbol? You can do that automatically with \smashoperator, see How to extend the text under summation symbol without making extra space, or manually for middle grounds with \kern-1em \sum_{long expression} \kern-1em (adjust -1em to the size you want).