[Tex/LaTex] How to create a backslash fraction


How does one produce a backslash fraction? That is, something like 2\1 with the 1 above the 2.

Best Answer

I chose to use math mode to set the argument of \bsfrac, even though I notice that \nicefrac sets in text mode. The behavior can be changed for \bsfrac with the removal of the $ characters.

A nice fraction: \nicefrac{55}{23} or \nicefrac{$(x-1)$}{$x$}.

And here is \bsfrac{55}{23} or \bsfrac{(x-1)}{x}.

enter image description here

One can simplify the definition as


or even, as Máté suggests,

Related Question