4

\nicefrac{a}{b} typesets like

 a /
  / b

(actual image: nicefracab)

Is there a way to get

 \ a
b \ 
7

Use reflectbox from package graphicx:

\documentclass{article}

\usepackage{graphicx, nicefrac}
\let\rfb\reflectbox

\newcommand{\uglyfrac}[2]{\rfb{\nicefrac{\rfb{#1}}{\rfb{#2}}}}

% for math mode, you can use:

\newcommand{\muglyfrac}[2]{\uglyfrac{\ensuremath{#1}}{\ensuremath{#2}}}


\begin{document}

joe \nicefrac{a}{b} blow

joe \uglyfrac{a}{b} blow

$ joe\: \muglyfrac{a}{b}\: blow$


\end{document}

enter image description here

3
  • It does not seem to typeset correctly in math mode. Variables turn non-italic.
    – bas
    Sep 8 '17 at 11:53
  • See i.imgur.com/zvQdzQz.png
    – bas
    Sep 8 '17 at 11:54
  • See updated answer Sep 8 '17 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.