It is possible to write \frac 2 4
or \frac \pi 4
to get 2/4
and \pi/4
, respectively.
However, it is not possible to write \frac \sqrt{2} 2
to get \sqrt{2}/2
.
Are there consistent rules on how to write shorthand \frac
?
fractionsmacros
It is possible to write \frac 2 4
or \frac \pi 4
to get 2/4
and \pi/4
, respectively.
However, it is not possible to write \frac \sqrt{2} 2
to get \sqrt{2}/2
.
Are there consistent rules on how to write shorthand \frac
?
Best Answer
The command
\frac
has two mandatory arguments. So you can they the first two tokens are the arguments (or simple the first two groups).\frac \sqrt{2} 2
fails because\sqrt
is the first token,{2}
the second one.