I don't really have much insight on how \displaystyle actually works, i just see the difference between in-line equation like $\frac{1}{2}$
which displays a small fraction and $\displaystyle \frac{1}{2}$
which produce a bigger fraction.
My question: is it possibile to build a single macros such that (on input a,b), in line equations produces $a/b$
and in display-style equation produces $\frac{a}{b}$
?
\mathchoice
macro, see tex.stackexchange.com/q/148740/15925\mathchoice{\frac{a}{b}}{a/b}{a/b}{a/b}
. The second and third repetition ofa/b
is for script and scriptscript style, should you need that.