# Should \dfrac be edited in?

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...

• +1 I computed it to be a log cabin but friend says it is a holiday home. My friend, that joke alone is solid gold. I am not an expert at $\LaTeX$ though, I only learnt it when I started using this site. – Guy Mar 7 '14 at 10:57
• IMHO this is a matter of taste. It would never occur to me to overrule the original author's choice. If I review an edit, where making such a change is the whole point, I will reject it as too minor. If somebody makes such edits to my answers, it may or may not piss me off. All depending on whether I'm having a good day or not. – Jyrki Lahtonen Mar 7 '14 at 11:09
• @Jyrki I also would never perform such edits myself! Rather, I am arguing that if you feel that such an edit needs to be made then it should be done properly, rather than just messing everything up by putting \dfracs in. – user1729 Mar 7 '14 at 11:12
• I agree with @JyrkiLahtonen that this kind of edit is too minor if it's the only thing being changed. Unless there are glaringly obvious problems with the resulting formatting, which is unlikely, I think edits which boil down to a matter of taste should be avoided if possible. – Dan Rust Mar 7 '14 at 11:19
• It's actually a house boat --- you forgot the "plus sea". But life is too short to get would up about dfrac and tfrac and suchlike. – Gerry Myerson Mar 7 '14 at 11:19
• @GerryMyerson One holidays by the sea. – user1729 Mar 7 '14 at 11:23
• @DanielRust My argument is that "too minor" is not telling the truth. Rather "outright wrong" is better. – user1729 Mar 7 '14 at 11:25
• I'm not sure you could say formatting choices are 'wrong' as it's based on opinion and style. If you mean that making the edit is morally wrong, in that you're imposing your tastes upon others, then I agree though it's not the most severe of moral offenses. – Dan Rust Mar 7 '14 at 11:28
• @DanielRust Yes, I agree that this is a matter of opinion (so I have changed "point" to "argument" in my above comment). This is why I asked this question - to gauge the communities opinion. There are, it seems, at least three possible answers to me question. 1) "You are wrong and \dfrac rules" 2) "You are right and \dfrac should be used sparingly" 3) Such edits are "too minor". It seems that (3) is winning. – user1729 Mar 7 '14 at 11:32
• I think there are other examples which would fall under the 'there is a right and wrong use of formatting conventions', so perhaps there is a blurred line. I'm thinking of things like \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). – Dan Rust Mar 7 '14 at 11:40
• 4) You are sometimes wrong and right at other times. There's a reason why inline formulae are by default typeset in the \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. – Daniel Fischer Mod Mar 7 '14 at 11:40
• @DanielRust Is there even a difference between \to and \rightarrow (except, obviously for the source code)? – Daniel Fischer Mod Mar 7 '14 at 11:42
• Tangential comment: "... \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.) – Andrew D. Hwang Mar 7 '14 at 13:41
• There's also \cfrac, by the way. – Asaf Karagila Mod Mar 7 '14 at 22:01
• I think that indulging into editing upon the user's choice is not very appropriate, but, there are some situations where '\frac' produces so small texts that it gets very difficult to read the questions, what should be the line of action in these cases? – Hawk Mar 8 '14 at 14:33

• No, answers with \frac should not be edited to change them to \dfrac, and
• No, answers with \dfrac should not be edited to change them to \frac.

Respect the original author's typographical choice. For my part, I'm perfectly aware of what \frac and \dfrac are, and on the rare occasions when I use \dfrac it's for the explicit purpose of overriding the default textstyle. It's a conscious typographical choice, to decide between:

1. inline math mode (with the default textstyle of \frac), where the fraction can appear too small to read,

2. inline math mode, with \dfrac to force displaystyle (sometimes I even explicitly put a \displaystyle in there), with the cost that the fraction juts out of the line and line-heights can differ too widely, and

3. displayed math mode (with the default displaystyle of \frac), with the cost that the expression can draw more attention to itself than I want to impart to it.

(The fourth possibility, of putting something in displayed math but forcing it to textstyle with \tfrac, is something I've never had a use for.)

I'd be annoyed if someone was changing my answers for no good reason, and in a direction that I actually considered and decided was worse.

• A thousand times yes. Editing the formatting should just be done if the question is barely legible, for example if it doesn't use math mode at all, yet contains lots of rather complex formulas. – fgp Mar 7 '14 at 21:53
• +1, except that I feel that questions with gratuitous \dfrac in their title need to have it edited away. – hmakholm left over Monica Mar 9 '14 at 20:24
• @HenningMakholm: I agree; question titles especially are worth editing because they affect everyone who sees the website whether or not they are interested in the question. – ShreevatsaR Mar 10 '14 at 4:41
• One thing where I find \tfrac useful (not always) are simple fractions in function arguments, like $$\Gamma\left( z + \tfrac{1}{2}\right),$$ which I usually find better than $$\Gamma\left(z + \frac{1}{2}\right).$$ – Daniel Fischer Mod Mar 10 '14 at 15:38
• I find that I tend to use \tfrac when the fraction is an explicit rational number in a line which otherwise has no fraction. So I'd write $$a+\tfrac12b+\tfrac16c$$ but $$\frac{a^2}{b-c}+\frac b2$$. It's a bit related to how I'd pronounce the expression: if I consider the whole rational number a single entity, it's small, otherwise it's a proper fraction which also needs more space when pronouncing. – MvG Mar 13 '14 at 9:42