(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:

Mozilla screenshot

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

Chrome screenshot

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

  • $\begingroup$ I've noticed that \bmod spacing in general seems to be smaller in MathJax than TeX. $\endgroup$ – Alex Becker Apr 19 '14 at 3:09
  • $\begingroup$ 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. $\endgroup$ – Alexander Gruber Apr 19 '14 at 6:55
  • $\begingroup$ 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. $\endgroup$ – Peter Krautzberger Apr 19 '14 at 8:37
  • $\begingroup$ @peter I will try that next time. $\endgroup$ – MJD Apr 19 '14 at 13:38
  • $\begingroup$ Thanks. That'd be great. $\endgroup$ – 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.

You might try using

\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}$$

  • $\begingroup$ Thanks. Should I use github for future bug reports? It doesn't have MathJax built in, so it seems less perspicuous than SE. $\endgroup$ – MJD Apr 21 '14 at 2:12
  • $\begingroup$ For items that are clearly bugs (like this one), or for feature requests for MathJax, I'd use the issue tracker. For things that are tied to the SE interface, I'd report them here. I do keep a fairly close eye on meta.MSE, and do transfer bugs to the issue tracker like I did here, so if you report here, we usually will see it (especially if it is tagged with the "tex" tag). $\endgroup$ – Davide Cervone Apr 21 '14 at 2:19
  • $\begingroup$ @DavideCervone: Sorry to ping you like this, but I'm curious what should be done about this issue. Oded appears to think it's an issue on the MathJax side. $\endgroup$ – user642796 Jul 16 '14 at 11:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .