1
  • First code:

When I write the following code in TeX:

‎\begin{align*}
\sum_{i=1}^{5}‎‎a_i
‎\end{align*}

then in the output the sub-script i=1 appears exactly in the bottum of the sigma-symbol; and the super-script 5 appears exactly above the sigma-symbol.



  • Second code:

But when I write the following code in TeX:

note that 
$\sum_{i=1}^{5}‎‎a_i$
is greater than zero

in the outcome the sub-script i=1 appears in the right-bottom of the sigma-symbol; and the super-script 5 appears in the right-above of the sigma-symbol.



What changes should I apply to the second code;
such that the outcome is like the first code?
i.e. in the outcome the sub-script i=1 appears exactly in the bottum of the sigma-symbol; and the super-script 5 appears exactly above the sigma-symbol.

Davood
  • 349
  • $ is inline math designed to fit within the baseline spacing of the paragraph so normally you would use \[\sum...\] to get the displaystyle but if you really must, you can use $\displaystyle\sum... – David Carlisle Oct 14 '17 at 14:37
  • note the first form should be written as \[\sum_{i=1}^{5}‎‎a_i\] as it is wrong to use align* for single line displays with no alignment – David Carlisle Oct 14 '17 at 14:38

2 Answers2

1

You can write

note that 
$\sum_{i=1}^{5}\limits ‎‎a_i$
is greater than zero

preserving small sum sign, but it also may change the vertical spacing.

1

You also might want to use the \medop command from nccmath (~ 80 % of \displaystyle):

\documentclass[11pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{nccmath}

\begin{document}

Some text. Some text. Some text. Some text. Some text. Some text. Some text. Some text. note that $ \sum\limits_{i=1}^{5}‎‎a_i $ is greater than zero $ \smash[b]{\medop\sum\limits_{i=1}^{5}}‎‎a_i $. Some more text. Some more text. $ \displaystyle\sum_{i=1}^{5}‎‎a_i $ Some more text. Some more text. Some more text.

\end{document}

enter image description here

Bernard
  • 271,350
  • You and some other friends offers too many solutions; but all of them fails when I use the \oplus command instead of \sum command; exept this one: $ \smash[b]{\medop\oplus\limits_{i=1}^{5}}‎‎a_i $. Thank you my dear @Bernard . – Davood Oct 14 '17 at 15:29
  • 1
    That's normal: as a maths symbol, \oplus has not type mathop, but mathbin. With such a symbol, you can use \smash[b]{\overset{5}{\underset{i=1}{\oplus}}}. The maths operator is \bigoplus, but strangely, adding \medop make bigger! You can use \mathsmaller from relsize, it will have (almost) the size of \oplus – with a thicker line. – Bernard Oct 14 '17 at 16:03