#Displaystyle and Textstyle
Displaystyle and Textstyle
Many things like fractions, sums, limits, and integrals display differently when written inline versus in a displayed formula. You can switch styles back and forth with \displaystyle
and \textstyle
in order to achieve the desired appearance.
Here's an example switching back and forth in a displayed equation:
$$\sum_{n=1}^\infty \frac{1}{n^2} \to
\textstyle \sum_{n=1}^\infty \frac{1}{n^2} \to
\displaystyle \sum_{n=1}^\infty \frac{1}{n^2}$$
$$\sum_{n=1}^\infty \frac{1}{n^2} \to \textstyle \sum_{n=1}^\infty \frac{1}{n^2} \to \displaystyle \sum_{n=1}^\infty \frac{1}{n^2}$$
$$\sum_{n=1}^\infty \frac{1}{n^2} \to \textstyle \sum_{n=1}^\infty \frac{1}{n^2} \to \displaystyle \sum_{n=1}^\infty \frac{1}{n^2}$$
$$\sum_{n=1}^\infty \frac{1}{n^2} \to \textstyle \sum_{n=1}^\infty \frac{1}{n^2} \to \displaystyle \sum_{n=1}^\infty \frac{1}{n^2}$$
It is possible to switch style inline as well:
Compare $\displaystyle \lim_{t \to 0} \int_t^1 f(t)\, dt$
versus $\lim_{t \to 0} \int_t^1 f(t)\, dt$.
Compare $\displaystyle \lim_{t \to 0} \int_t^1 f(t)\, dt$ versus $\lim_{t \to 0} \int_t^1 f(t)\, dt$.
Compare $\displaystyle \lim_{t \to 0} \int_t^1 f(t)\, dt$ versus $\lim_{t \to 0} \int_t^1 f(t)\, dt$.
Compare $\displaystyle \lim_{t \to 0} \int_t^1 f(t)\, dt$ versus $\lim_{t \to 0} \int_t^1 f(t)\, dt$.
Do observe that the taller formulas gotten with \displaystyle
distort the line spacing. Filler text, more filler text and even more filler text, and an outrageous amount of filler text. It would not occur to me to use $\displaystyle \lim_{t \to 0} \int_t^1 f(x)\, dx$ here. As we see, a formula typeset in displaystyle makes it necessary to move the lines further apart. A ridiculous amount of filler text to make a point. Not pleasing to the eye at all.
Filler text, more filler text and even more filler text, and an outrageous amount of filler text. It would not occur to me to use $\displaystyle \lim_{t \to 0} \int_t^1 f(x)\, dx$ here. As we see, a formula typeset in displaystyle makes it necessary to move the lines further apart. A ridiculous amount of filler text to make a point. Not pleasing to the eye at all.
In other words, there is also a reason TeX defaults to \textstyle
when typesetting inline formulas.