When I type a fraction, I always use form \dfrac{m}{n}. For example: $\dfrac{1}{2}$ and $\dfrac{1}{23}$. Somewhere, I saw that, instead of $\dfrac{1}{2}$ it was type $\dfrac 12$ and $\dfrac1{23}$. What is the best way which I choose?
Asked
Active
Viewed 512 times
1
sk8forether
- 342
minhthien_2016
- 9,467
1 Answers
1
You should stick to a consistent usage, supplying parameters to the macro using braces. As such, the best way is to use
\frac{<num>}{<denom>}
which clearly identifies the numerator and denominator.
(La)TeX, like other programming languages, allows one to bend the rules on occasion. However, stick to proper use of the language; you don't gain anything by dropping proper argument deliniation.
As an analogy, things may sound the same (phonetically), but their meaning can be completely different if not used properly:
Werner
- 603,163

\dfrac ndor\dfrac n{dd}holds, stick to something consistent, so use\dfrac{n}{d}, always. – Werner May 18 '17 at 16:09\dfracwhich makes an over-sized fraction unsuitable for inline math why not\frac{1}{2}? – David Carlisle May 18 '17 at 16:37{}, even if the result is the same? – cgnieder May 18 '17 at 17:54\fracare one token. However, I don't mix the two in one fraction. – yo' May 20 '17 at 17:46