Position the limits of Sum

The problem is that you're trying to use displaystyle limits in text mode. Which is not that good, as I explain below.

I don't know if it's typographically correct but the code is

 $\sum\limits_{i=0}^n f(x)$

The \limits command allows the limits to be positioned above and below the symbol.

The fact that inline math has "text style" limits is just that inline formulas typeset like display style are usually ugly, disrupt the natural flow of the document (the limits usually create a line whose height and depth is bigger than the other ones), and they are not usually as readable as when they are placed in display.

Please be cautious when considering what using "displaystyle limits" in text mode.


The problem is that you didn't use displaymath operators ($$...$$ or \[...\]; I recommend the latter). If you want such a structure in inline math, you must use \limits. By implementing my solution (with displaymath) we get:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\[ \text{Result} = p + \sum_{i=0}^{n} f(x) \]
\end{document}

enter image description here

My solution for inline math:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\setlength{\parindent}{0cm}

Hello. Inline math is one of my favourites. Isn't \LaTeX wonderful? By simply adding $\mathtt{limits}$, we can force the symbols to move upwards. I don't recommend its usage in inline mode, as it makes the $\mathtt{sum}$ symbol too small and occasionally forces the space between lines to stretch, which uglifies everything. Ayway, here is the result: Result $= p + \sum\limits_{i=0}^{n} f(x)$

\end{document}

enter image description here