Note to reader: typesetting matters!
There are three fraction commands. There is \dfrac
which makes everything big and tall and stand out. It is meant to be used when your fraction is on its own line $$...\dfrac...$$
. There is \tfrac
which makes everything nice and small. It is meant to be used when your fraction is inline with text. Finally, there is \frac
, which decides which of the other two to use. It will use \dfrac
when your work is on its own line and \tfrac
when it is inline with text, so theoretically there is no need to use \dfrac
or \tfrac
(they come with the amsmaths package, so they are additional commands although they do work here at math.SE).*
Now, there is an issue with line spacing and \dfrac
which the following example hopefully illustrates (I have not used \frac
as it gives the same as \tfrac
here).
\dfrac:
I was given the integral $\int\dfrac{1}{\text{cabin}}d\text{cabin}$ to compute. What is the answer? I computed it to be a $\log\text{cabin}$ but my friend says it is a holiday home. Why? I have no idea how to continue and am entirely stuck.
\tfrac:
I was given the integral $\int\tfrac{1}{\text{cabin}}d\text{cabin}$ to compute. What is the answer? I computed it to be a $\log\text{cabin}$ but my friend says it is a holiday home. Why? I have no idea how to continue and am entirely stuck.
I feel that the second text is much clearer, especially when there are lots of fractions on multiple lines. Now, I recently approved an edit which replaced \frac
with \dfrac
, and I now realise I disagree with this. I do not think removing \dfrac
is worthy of an edit, but I now think it should not be edited in to "improve" the post. I do not think it should be edited in for two reasons. Firstly, I think it looks awful. Secondly, if you wanted to make the fractions clearer you should use \dfrac
properly, that is, you should edit the above example to read the following.
\frac:
I was given the following integral to compute. $$\int\frac{1}{\text{cabin}}d\text{cabin}$$ What is the answer? I computed it to be a $\log\text{cabin}$ but my friend says it is a holiday home. Why? I have no idea how to continue and am entirely stuck.
What say you? Should \dfrac
be edited in to posts to fractions which are inline with text?
*In practice, one would write $$...\frac...$$
rather than $$...\dfrac...$$
, and so on. I just do not know how to phrase this paragraph nicely...
\dfrac
s in. $\endgroup$\dfrac
rules" 2) "You are right and\dfrac
should be used sparingly" 3) Such edits are "too minor". It seems that (3) is winning. $\endgroup$\langle,\rangle
$\langle, \rangle$ instead of $<,>$ and\to
$\to$ or\rightarrow
$\rightarrow$ instead of->
$->$ (although there are some that will argue even between the merits of\to
and\rightarrow
as well). $\endgroup$\tfrac
size, and there's a reason why one can override it. If you have an expression along the (formatting) lines of $\frac{x_{m_k}}{y_{r_{j}}^{12}}$, and it's not important enough to place it in a$$...$$
, then $\dfrac{x_{m_k}}{y_{r_{j}}^{12}}$ inline is the way to go, IMO. Yes, the messed line-spacing isn't pretty, but it can occasionally be the least of three (or more?) evils. $\endgroup$\to
and\rightarrow
(except, obviously for the source code)? $\endgroup$\dfrac
... is meant to be used when your fraction is on its own line$$...\dfrac...$$
. ...\tfrac
... is meant to be used when your fraction is inline with text." It's the other way around:\dfrac
is to be used inline to force displaystyle, while\tfrac
is to be used in displays to force textstyle. :) (FWIW, I don't think these particular edits alone are worth making, but currently I skip them when they come up in review because I don't have enough intuitive feel for site culture.) $\endgroup$\cfrac
, by the way. $\endgroup$