# Mathjax spacing is wrong in scriptstyle \bmod

(This is mainly addressed to Davide Cervone.)

a\bmod 3 renders correctly in display or inline normal size, but when I use it in a superscript it is not properly spaced.

$$a\bmod 3; 2^{a\bmod 3}$$

Inline $a\bmod 3; 2^{a\bmod 3}$

• Screenshot of Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0:

• Screenshot of Google Chrome 34.0.1847.116 (Official Build 260972):

(This is a bug report, not a request for help.)

• I've noticed that \bmod spacing in general seems to be smaller in MathJax than TeX. – Alex Becker Apr 19 '14 at 3:09
• I've also noticed this occurring in a few environments, like eqnarray. It's odd that it should have different spacing in different parts of MathJax. – Alexander Gruber Apr 19 '14 at 6:55
• It would be better to file non-SE related bug reports at github.com/mathjax/mathjax/issues as well. While we monitor SE sites closely, the only guaranteed way is the official MathJax issue tracker. – Peter Krautzberger Apr 19 '14 at 8:37
• @peter I will try that next time. – MJD Apr 19 '14 at 13:38
• Thanks. That'd be great. – Peter Krautzberger Apr 19 '14 at 13:39

I've opened an issue tracker for the bug. The problem is that MathJax uses \mathbin to handle \bmod, and since binary operators generally get no extra space in super- and subscripts, that causes the spacing problems that you are seeing. The definition needs to be changed to include the spacing explicitly.
\def\BMOD{\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}}

and see if that works better for you. Here is an example: $$\def\BMOD{\mmlToken{mo}[lspace="thickmathspace" rspace="thickmathspace"]{mod}} a\BMOD 3; \quad 2^{a\BMOD 3}$$