How can I make a subscript for sum in latex like the following picture:
I tried \sum_{q_i}
but that doesn't make the result I want. It makes the following result:
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThat is expected; it's a matter of inline math mode versus display math mode.
Inline math is meant for small fragments inside the running text, so it is typeset in a compact way, with the subscript to the side of the sum symbol. Inline math is done with $...$
.
Display math is meant for larger, standalone equations, and is set in a paragraph of its own. Because it has more space, the subscript can be put underneath the sum symbol. Display math is done with \[...\]
or a whole variety of environments.
$$ ... $$
shouldn't be used (edit: in LaTeX, that is), see e.g. Why is \[ … \]
preferable to $$
?
Aug 9, 2013 at 11:21
I tried it out rightnow. If you write something like
\begin{equation}
\sum_{q_i} {p x r}
\end{equation}
It should give you the result you do not want to have, but if you enter mathmode in text
I want to show you this sum $\sum_{q_i} {p x r}$ blabla
Then you would get theresult you want to have.
\textstyle
in\[ .. \]
(or some other displayed environment).