13

I want the limits of the sum sign to be placed where I placed the red lines in the photo. This is the line of script I used:

$Result = p + \sum_{i=0}^{n} f(x)$ 

This is what I get and the red lines is what I want. enter image description here

2
  • 2
    Use this code: $\sum\limits_{i=0}^{n}$
    – user91669
    Mar 29 '17 at 14:35
  • unrelated to sum but use \mathrm{Result} not Result in math mode Mar 29 '17 at 14:54
23

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.

4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.