About

{displaystyle} is about the `\displaystyle` and `\textstyle` commands for switching the style of math in LaTeX. For questions about display math in general, use {math-mode}.

is about the \displaystyle and \textstyle commands for switching the style of math in LaTeX. For questions about display math in general, use , and for questions about \scriptstyle and \scriptscriptstyle, see .

Math in LaTeX can be typeset in four different styles:

  • Text style or "inline math" refers to math typeset inside $$ signs, which is typeset as part of a paragraph. Operators such as \sum and \int are reduced in size, and their limits are placed below (or above) and to the right, rather than directly below (or above). Text style is also the default inside some environments, e.g. the cases environment or inside an \xymatrix. To force this style of math in place of another, use \textstyle.
  • Display style or "display math" refers to math typeset inside \[\], which is typeset on its own line. Operators and fractions are full size. To force this style of math in place of another, use \displaystyle.
  • Script style refers to math as typeset in superscripts and subscripts: smaller and more compressed. To access this style, use \scriptstyle.
  • \scriptscriptstyle uses the size and style of math used in nested super- or subscripts.

These are switches, which might be unexpected: the command $\displaystyle{\sum_{i=1}^n a_i} \int f_i$ will typeset both the sum and the integral in display style.

Frequently Asked Questions

  1. How can I keep a long equation together without forcing a line break?
  2. What is the proper way to display nested and continued fractions?
  3. How can I get nice-looking cube roots?
  4. How can I get smaller-looking fractions in display math?
history | excerpt history