I'm using MathJax-Node to turn TeX maths equations into both MathML and SVG on my server. Mostly this works fine. But when I render Tupper's self-referential formula, a weird space appears after the second minus sign in the exponent: .
The space also appears on mathURL (which is where the above image comes from). When I examine the MathML generated, I can see that MathJax has explicitly inserted a mspace
element.
The TeX I'm using is as follows:
\frac12<\left\lfloor\mod\left(\left\lfloor\frac y{17}\right\rfloor2^{{-17}\left\lfloor x\right\rfloor-\mod\left(\left\lfloor y\right\rfloor,17\right)},2\right)\right\rfloor
Any idea what's going on here?
Best Answer
You're using “mod” as a math operator like “exp” or “sin”. The command
\mod
is for notation such asand the inserted space is obviously wanted here.
Use
\operatorname{mod}
instead.I've removed useless (and wrong)
\left
and\right
pairs.It works equally well in MathJax (tested on Math.SE):