In this comment, the penultimate number in the list, $59930$, is displayed (in Firefox $11.0$) with a spurious space between the two $9$s. I made sure I hadn't inadvertently pasted any invisible spaces in the input by selecting the $9$s and overwriting them with two consecutive $9$s typed on the keyboard.
2 Answers
The Problem:
In a comment to a question or an answer, or on chat, when a string of over 80 characters is entered without whitespace, the pair of characters \unicode{x200C}
(zero-width non-joiner) and \unicode{x200B}
(zero-width space) is inserted after 80 characters. This is often bad when it happens in $\LaTeX$ source.
In the comment in question, the following 86 character string appears:
$1,2,2,9,2,46,2,250,37,254,2,31052,2,1480,896,306174,2,2097506,2,6025516,6638,59930,2$
The pair of characters mentioned is inserted after character 80, splitting 59930 into 59 and 930.
A Workaround:
There is a fairly simple workaround: insert a whitespace character, if possible, where it will have no effect. For example, just before the 59930:
$1,2,2,9,2,46,2,250,37,254,2,31052,2,1480,896,306174,2,2097506,2,6025516,6638, 59930,2$
-
$\begingroup$ I guess it is Markdown that is inserting the characters? Certainly adding a space will avoid the issue in general. For this case, I personally would have done
$1$, $2$, $2$, $9$, $2$, $46$, ...
since I consider the commas to be part of the sentence, not part of the math (as suggested by Knuth in the TeXbook). This will have the advantage of allowing line breaks to occur within the list, whereas if it is all one expression, MathJax will typeset it as an unbreakable box. $\endgroup$ Apr 13, 2012 at 12:35 -
1$\begingroup$ @Davide: That works in this case, but what happens when I want to write an 80-digit number? Arbitrarily inserting spaces where there weren't any in the input seems like something that shouldn't happen quite generally, independent of the possibility of workarounds for particular cases. $\endgroup$– jorikiApr 13, 2012 at 12:51
-
$\begingroup$ I agree that inserting the characters is a problem. I was only mentioning here that I think the list of numbers should really be a list of separate math expressions, not a math expression consisting of a list. Really a different issue. $\endgroup$ Apr 13, 2012 at 13:19
-
$\begingroup$ For an 80-digit number you can add
\!
where it occurs, or you can add a space after a thousand break. $10.203.040.506.070.809.010.203.040.506.070.809.010.203.040.506.070.809.010.$ $\!203.040.506.070.809.010.203.040$, coded$10.203.040.506.070.809.010.203.040.506.070.809.010.203.040.506.070.809.010.$ $\!203.040.506.070.809.010.203.040$
. Line breaks are an issue there :). $\endgroup$– MickGSep 24, 2014 at 18:30
Apparently in the last 24 hours a new version of the code that connects MathJax with Markdown has been rolled out (see this answer). Let's see if that helps this issue at all:
$1,2,2,9,2,46,2,250,37,254,2,31052,2,1480,896,306174,2,2097506,2,6025516,6638,59930,2$
Edit: Yes, it seems to work! So it appears that this may be a moot point, at least for new answers/questions.
-
$\begingroup$ Let's try in a comment: $1,2,2,9,2,46,2,250,37,254,2,31052,2,1480,896,306174,2,2097506,2,6025516,6638,59930,2$ Edit: Drat! But it does seem that it is specific to comments. So that suggests that the place where the characters are being added is in the comment-handling code. That makes sense, since comments only have limited formatting, and don't go through the full Markdown process. Perhaps there need to be modifications made to help protect math within comments from being modified. $\endgroup$ Apr 13, 2012 at 13:24
-
$\begingroup$ There's another strange, probably related phenomenon in my browser with the above comment. The line that starts with "Edit:" isn't wrapped; it extends beyond the right margin and is truncated in the middle of the second 'n' in "handling", where the light grid background starts. The next line starts with "limited formatting". Here's a screen shot. When I first commented on this, the subsequent refresh of the comments caused the line to be wrapped, but when I deleted the comment the problem reappeared. $\endgroup$– jorikiApr 13, 2012 at 13:36
-
$\begingroup$ Interesting. What browser and OS are you using? It probably has something to do with the in-line equation being wrapped for you (it is not long enough for that to happen for me). $\endgroup$ Apr 13, 2012 at 13:39
-
$\begingroup$ Yes, it's wrapped; the final $2$ is on a line by itself. Firefox 11.0, Mac OS 10.6.8. $\endgroup$– jorikiApr 13, 2012 at 13:48
-
$\begingroup$ OK, I did some checking and it appears to be a bug in Firefox (version 11 at least -- I didn't look at earlier ones). I will have to look into it further. $\endgroup$ Apr 13, 2012 at 14:47
\b
of\bigvee
(and it looks like\b
is interpreted as a LaTeX command in itself); theb
is the 79th character that was entered without blank space with no possible break point before. If you insert a blank between a comma and a number before the 79th place in your example, the spurious space disappears. $\endgroup$9‌​9
where the two nines are separated, so two null character entities. $\endgroup$‌​
characters in the page source. The first is a "zero-width non-joiner" (though I don't really understand what that means), and the second is a "zero-width space". MathJax does not think of these as belonging within a number, so make the59
into one number and930
into another, with two<mo>
elements in between (in the internal MathML representation), each containing a zero-width character. Those<mo>
elements get a little space around them by default, which is where your space is coming from. $\endgroup$‌​
entities yourself, then perhaps it is your editor that is doing it. Are you editing your responses elsewhere and pasting them in, or are you using the SE editor directly? $\endgroup$<mo>
elements in the MathML that MathJax generates, and by default,<mp>
elements have some space on both sides of them. That is the space you are seeing. It would be possible to modify what MathJax thinks is allowed as part of a single number to include these characters, but I'm not sure if that is the right thing to do or not. $\endgroup$