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
{\displaystyle\frac{num}{den}}
So it's not correct to say that dcases
changes \frac
into \dfrac
. Indeed, inside it (as well as in equation
), we'll have
\frac{\frac{S}{S}}{T}
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.
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}$
and
$\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.
No, you're not correct.
No.
\displaystyle
acts from the point it's declared, but when in a group its effect ceases at the end of it.
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).
Note
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.
Best Answer
commath
provides\textstyle
and\displaystyle
versions of its\od
and\pd
(and\md
) commands:\textsyle
override:\tod
and\tpd
\displaystyle
override:\dod
and\dpd
It would be possible to define your own commands doing the same with a slightly different interface (using
xparse
, say) that could allow you some flexibility.