1. Am I correct in saying that the dcases environment replaces \frac with \dfrac? The replacement only occurs at the outer-most level of \frac, so if I have

    \frac{arg1}{arg2 \frac{arg3}{arg4}}

    Only the \frac corresponding to \frac{arg1}{arg2} gets replaced with \dfrac.

  2. Is \dfrac{arg1}{arg2} equivalent to \frac{\displaystyle arg1}{\displaystyle arg2}?

    $\frac{\displaystyle arg1}{\displaystyle arg2}$
  3. Where does \displaystyle (and \textstyle) take effect? {\displaystyle var_1 var_2 \cmd1 \cmd2}

    \usepackage{mathtools} % The page-size might be larger with mathtools
    $\displaystyle \sum_a^b \sum_a^b \frac{a}{\sum_c^d}$
    $\sum_a^b \displaystyle \sum_a^b$
    $\sum_a^b \sum_c^d \displaystyle\frac{\sum_e^f}{\sum_g^h}$
    $\sum_a^b \sum_c^d \frac{\displaystyle \sum_e^f}{\sum_g^h}$
  4. Lastly, for certain commands like \sum the \displaystyle has non-size related effects. However, for other objects like \frac, \displaystyle seems to change the size of the variable and some vertical spacing. Is there a set of style-rules to know when to use \displaystyle vs. not, \dfrac vs. \frac, \dcases vs. \cases?


1 Answer 1


There are four main math styles: \displaystyle, \textstyle \subscriptstyle and \subsubscriptstyle. Let's call them D, T, S and SS.

Style D holds automatically in displayed formulas (displaymath or \[...\], equation, align, gather, multline); style T is selected in in-line formulas ($...$ or \(...\)). Styles S and SS are selected in superscripts and subscripts, first level or second (and further) respectively. Also dcases typesets its contents in style D.

One can also declare a math style with the above commands, which respect grouping as usual.

The rules for fractions are:

  • if the fraction appears in style D, the two parts (numerator and denominator) are in style T;

  • if the fraction appears in style T, the two parts are in style S;

  • if the fraction appears in style S, the two parts are in style SS.

Further levels always choose style SS.

The construction \dfrac{num}{den} is equivalent to saying


So it's not correct to say that dcases changes \frac into \dfrac. Indeed, inside it (as well as in equation), we'll have


where the letters denote the style chosen, because the numerator will be in style T as follows from the rules. Here's an example, where the overall style is D.

enter image description here

As it can be seen, the styles have their effect also on other symbols, the "big operators": a \sum in style D will be bigger than in style T. Style D usually forces subscript and superscripts to big operators to be set below and above it (look for \displaylimits, \limits and \nolimits).

Thus there is a big difference between

$\displaystyle\sum_{i=1}^{n} a_{i}$


$\sum\limits_{i=1}^{n} a_{i}$

In the first case the summation symbol will be big, in the second one it will be the normal one for style T, but with limits above and below as imposed by \limits (it's not recommended to do it).

Answers to the questions.

  1. No, you're not correct.

  2. No.

  3. \displaystyle acts from the point it's declared, but when in a group its effect ceases at the end of it.

  4. Use \displaystyle when you want to emulate the style chosen in displayed math. Don't use it and \dfrac in in-line formulas (in general).


There's much more about math styles; for example, styles D and T differ for the placement of exponents. Moreover, the denominator of fractions is in the "cramped" version of the selected style, but discussing this would take too far away.

  • From what I can deduce from experiments, for both in-line math mode, and displayed math mode, for cases like a^b, the b part will always be typeset in style subscriptstyle. The typesetting style for b doesn't change, regardless of which of the four styles I apply to the group.
    – jrand
    Commented Sep 10, 2012 at 23:14
  • @jrand Yes. The exponent is in style S when it's associated to something in styles D or T; it's in style SS if it's associated to something in style S (or SS).
    – egreg
    Commented Sep 10, 2012 at 23:25
  • Yes, I should have used something simpler to show change in size in the exponent, instead of \sum. It's more apparent with A, like in b^A.
    – jrand
    Commented Sep 10, 2012 at 23:29
  • @jrand As I said, styles D and T differ slightly in the positioning of exponents, which becomes apparent with an uppercase letter.
    – egreg
    Commented Sep 10, 2012 at 23:37
  • 1
    @cacamailg If summations are involved in the numerator or denominator, in general yes.
    – egreg
    Commented Jun 12, 2014 at 12:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .