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:
AS: That is expected; it's a matter of inline math mode versus display math mode. \textstyle{} and \displaystyle{} will allow you to switch styles in the middle of whatever you are doing.
Link: https://tex.stackexchange.com/questions/127456/subscript-of-sum