# Correct superscript spacing for new mathbin

I redefined the \div command so that it's U+2215 aka ∕, but for some reason when I use it as a superscript the spacing between this symbol and its numbers is really tight (works fine in displaymode or otherwise). Below is what I created:

\documentclass[11pt]{article}
\usepackage{unicode-math}
\setmathfont{XITS Math}
% I personally use MinionMath-Regular.otf but XITS Math
% also shows this property, to a lesser degree
\newcommand{\olddiv}{\mathbin{÷}}
\AtBeginDocument{\renewcommand*\div{\ensuremath{\mathbin{∕}}}}

\begin{document}
$a^{1\div2}$ $1\div2$
\end{document}


This is the outcome (with XITS Math):

It may not seem that horrible, but taking a look at what happens with MinionMath-Regular you can see why I'm concerned:

Theoretically I could just put in spaces, as in 1/ \div/ 2, but that doesn't look great and I think there should be an easier, more permanent way to accomplish good spacing. I'd appreciate any advice with this!

• \mathbin does not add spaces in scriptsyle and it seems / has no sidebearings at all in that font, so if tex doesn't add space it touches teh adjacent characters.... – David Carlisle Nov 26 '14 at 19:38
• you could use \renewcommand*\div{\mathbin{\mskip1mu∕\mskip1mu}} or whatever looks good. (You don't want \ensuremath really: math commands should be just math). – David Carlisle Nov 26 '14 at 19:44
• @DavidCarlisle the \mskip1mu also affects the displaystyle / regular mode spacing of \div, but I want that spacing to remain the same; it's only when it's in superscript that I have a problem. I would ideally like the same spacing (proportionally) for superscript as inline / displaystyle / etc. – airatin Nov 26 '14 at 20:50

\renewcommand*\div{\mathbin{\mskip1mu\nonscript\mskip-1mu%

or some value other than 1mu the skip is always added but in non-script (ie text and display) styles add the negative amount to cancel it out.