# On using MathJax to create 'white space'

The purpose of this post is, first, to raise awareness (as this, reasonably, might not be clear) that the way some (and it seems to me the number is growing) use MathJax to create 'white space' (or to otherwise influence formatting) creates problems or at least inconvenience for others. And, second, to potentially discuss the implications of and potential solutions for this.

To be more specific what I am talking about, a main usecase:

There is a lower bound on the length of characters a comment needs to have, sometimes one might wish to post a shorter comment and then a way in which some proceed is to add some MathJax code, like ${}{}{}{}{}$ that after having been processed does not display anything (under normal circumstances).

There are also some related things like, displayed equations to have a paragraph in a comment and so on.

What is the problem or the inconvenience?

The problem is that some (or at least I) also view the site on devices where MathJax either does not process properly at all or very slowly. Then, this 'invisible' formatting code is visible, and distracting, and it is not only distracting in the way some normally visible 'filler text' would be distracting, as for example it can happen that first it grays-out (slightly changing size) to then reappear as normal text. So that automatically attention gets focused on this 'movement' against the static background. Or, it simply contributes to slow down the site, impeding smooth scrolling and so on. Also, the paragraph in comments can 'suddenly' open-up while reading the comment when the MathJax is eventually processed. (Besides it being quite a bit too large for a paragraph, which can be inconvenient on devices with a small screen.)

Since this was already misunderstood, let me stress that my problem is not with the fact that some post short comments. I do not mind this at all, and would not mind were there no character limits (actually I would strongly prefer it as then the issue discussed here would disappear). I only mind that this is done using MathJax.

Bottom line:

Personally, I can see why sometimes it is actually convenient to have such tricks available, but it is also my impression that it is frequently used just so, since people know how to do it, so they do it (some likely unaware of negative side effects), and I assumed that at least for some in some cases it would not make much difference to reply, say, 'Yes, this is possible.' instead of 'Yes. [plus some 'invisible' filler]'

So, it is my hope that some might take the above mentioned problems into account when deciding whether to use such tricks or not.

And, possibly, somebody could make a good suggestion for other ways to achieve the same without the negative side aspects. Indeed, there appear to be also ways to do 'invisible' things differently, there are invisible characters that can be 'written' in various ways; personally, I do not yet know how to do this (there is various talk about this on meta.SO but I did not get it to work, which might be my ignorance or that these workarounds meanwhile have been blocked) see Zero-width non-joiner allows unclickable titles for example.

• Could you suggest a non-MathJax solution for padding comments to overcome the 15-character lower bound, a solution other than abstinence? :-) – Joseph O'Rourke Jul 14 '13 at 1:03
• I think is related also to the issue of gratuitous texifying. When viewed with a mobile using cellular data it slows everything down. – Benjamin Steinberg Jul 14 '13 at 1:29
• @JosephO'Rourke: I intended to just reply 'Yes, of course I can do this.' to point out indirectly that a simple 'yes' can be quite naturally expanded into something having more than 15 characters, and the same should apply for most very short comments. But, then I thought I will add this explanation right away to avoid potential confusion, which very short comments can often create. However, all this is in some sense a form of abstinence. Some know how to get invisible (unicode) characters; personally, I don't of hand. Those that know might share the knwledge here. If not, I might investigate. – user9072 Jul 14 '13 at 2:06
• @BenjaminSteinberg: indeed, I thought about mentioning this reasoning against too much MathJax from a recent discussion while writing this. But then did not include it. Thank you for the addition. – user9072 Jul 14 '13 at 2:11
• Test. . . . . . – Joel Reyes Noche Jul 14 '13 at 2:38
• In my previous comment, I just added periods separated by a space until the lower bound was reached. – Joel Reyes Noche Jul 14 '13 at 2:39
• @JoelReyesNoche: yes, 'filler text' that is visually rather non-intrusive is another simple possibility. – user9072 Jul 14 '13 at 2:41
• Joseph asks a good question, and I can easily imagine people not being aesthetically satisfied with Joel's solution. I don't like the heading "What could be a solution?" because the only "solution" you give is "don't do this thing that bothers me", which is redundant. (Hey: why do we even need this 15 character lower bound anyway?) – Todd Trimble Jul 14 '13 at 5:19
• Many (most?) questions/answers/comments on this site have (unavoidably) loads of MathJax. I would have thought that on a device where MathJax is processed improperly or slowly, this site would be nearly impossible to use anyway, and the occasional whitespace hack would be the smallest of problems. But maybe I don't understand how it all works (wouldn't be the first time). – Gerry Myerson Jul 14 '13 at 6:37
• @ToddTrimble: What heading would you prefer? It is formulated in the conditional and I say a not the. I am honestly suprised you still have an issue with that. But I am happy to change it. Also, I did not suggest that people not do it at all but just less often, and also restricted it to 'some' as I anticipated some others will insist on continuing to do this, and I have no intent to start a long debate about this; else I could have approached this quite differently, since this usage of MJ is not the intended one, and that this works at all could qualify as bug. – user9072 Jul 14 '13 at 9:36
• @ToddTrimble: Also, I mentioned in comments another solutions using invisible characters. I guess somebody will provide the details in not too long (there is a nondetailed discussion of this on 'tea'). If not, as I said, I might look into that myself. I prefer not to answer your question why there is a limit since last time you got unhappy me explaining the rational of a design decision here. (But personally I do not need the limit as I said.) If you could suggest another headline, I will likely replace it. As is, it truly not clear what but 'could be a sol.' you prefer. – user9072 Jul 14 '13 at 9:46
• @GerryMyerson: Why should it be impossible to use the site if MathJax is processed improprely in the way I describe? I simply see the MathJax source with in most cases is easy enough to understand and not a distraction. For the slowness, please note that I said 'contributes to'. Finally a reason that might contribute to, beyond it being more frequent (if this is even true but I think it is), me noticing this more is that now it is also used on meta which is pretty free from any MathJax otherwise. – user9072 Jul 14 '13 at 9:58
• @ToddTrimble: thank you for the feedback, I made an edit (I hope in the sense you intended). For (1): Okay. So: AFAIK, the intent the character limit is to encourage people to write longer and thus more informative comments. This does however not work so well, IMO, since there are numerous ways to get by the limit otherwise. Personnaly, I think this chracterlimit does more harm than good, while the orginal idea seems reasonable. – user9072 Jul 14 '13 at 13:31
• quid: thanks, that looks a lot clearer to me. Also: we agree that this 15 character thing is actually not a great idea, but I'm glad to have your insight on why it's there to begin with. Finally: I like this question, and hope that some clever person will provide a clever answer. – Todd Trimble Jul 14 '13 at 13:39
• I can.​​​​​​​​​​ – Andrew Stacey Jul 14 '13 at 19:38

There are alternative ways to post a short comment or answer. My shortest to date is an answer of three visible characters: https://tex.stackexchange.com/a/32692/86 I think that someone else on TeX (or meta-TeX) beat that with an answer that was two characters.

The secret is invisible unicode characters. In answers, you can use entities in which case &#8203; is the one to use (and note that it consists of 7 characters so you only need 5 to get over the minimum character length). Entities in comments are escaped so you need the actual unicode character. Fortunately, this can be cut-and-pasted from the Wikipedia article https://en.wikipedia.org/wiki/Zero-width_space. If you copy the mA of the block text then you will actually have copied three characters, and deleting the first and last leaves you with a zero-width space which can be cut-and-pasted into comments.

(I should say that I approve of it being hard to do. Short comments and answers only rarely make sense and if it is in at all doubt, it should be lengthened to provide context. My answer on TeX-SX above was mildly facetious, but this answer could legitimately have been well under the 30 characters - but note that the author reverted any edits to that answer so please don't get ideas! But better zero-width spaces than MathJaX hacks.)

• See?​​​​​​​​​​​ – Andrew Stacey Jul 14 '13 at 19:37
• I still cannot figure this out. I thought for a moment I knew it, but then I had way too much space. (Thus the preceeding comment "Perhaps?" which came out wrong ase you even noticed it.) – user9072 Jul 14 '13 at 19:56
• Thank you for the explanation! In the end I even managed to figure it out myself in parallel. The issue why my "perhaps?" above failed and had way too much space between the "s" and "?" is that I tried to copy some invisible characters from my "empty" answer where however I left space between several invisble ones...so. Well, in anycase, thanks a lot for the explanation! – user9072 Jul 14 '13 at 20:15
• To add something more reasonable than my excitement about the newly learned trick: A way to get these things for comments without leaving the site is to use an aswer box to create it (using html entities), and to copy the result from the preview into the comment. Also I find &zwnj; for example easier to rememeber Zero Width No Join. – user9072 Jul 14 '13 at 20:25
• In hex it is 200B, for thos of you who can type characters on their keyboard using the code point in hexadecimal representation (on many systems there are shortcuts for it). – The User Jul 14 '13 at 20:30
• It is not quite clear to me what is the etiquette on accepting answers in discussions, but then, there is not much 'competition', so. Thanks, again! And, if you missed it (and if ever you should care), I already used the skill you taught me for real, a two letter accepted answer, but in agreement with your position, I will leave it at that regarding active usage. – user9072 Jul 18 '13 at 22:25
• It was brought to my attention that &zwnj; (zero width non-joiner), which I advertise above, is not so good as it is somewhat visible in some browsers; so it is better to use the character (zero width space) mentioned by Andrew Stacey and The User. – user9072 Jul 22 '13 at 22:25
• Does this trick still work, or has stack exchange broken it? I have done it or something like it in the past, but right now I am trying it and my comment is still getting rejected with "Comments must be at least 15 characters in length". – Mike Shulman Jul 12 '16 at 23:58

‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

• For answers, it is almost trivial. But somehow for comments I do not manage it. – user9072 Jul 14 '13 at 13:24
• There's something very Zen or Taoist about this answer. John Baez once wrote, somewhere on the internet, "Your readers might want to check out my own Taoist blog, where I say everything worth saying about the Tao." where the final words were a link to a blank page. :-) – Todd Trimble Jul 14 '13 at 14:18
• Interesting. My own idea related to this answer was that it might be fitting as reply to certain "questions" we get on main :-) – user9072 Jul 14 '13 at 14:33
• :-D ........... – Todd Trimble Jul 14 '13 at 14:39
• Y‌‌‌‌‌‌‌‌‌‌‌‌‌es! – user9072 Jul 14 '13 at 20:07
• And‌‌‌‌‌‌‌‌ so! – user9072 Jul 14 '13 at 20:23
• @ToddTrimble: sorry for the two preceeding comments. I did not pay attention to you being auto-notified on this thread. But, now it works following Andrew Stacey's explanation. :-) – user9072 Jul 14 '13 at 20:28
• No prob! &#8203;&#8203;&#8203; – Todd Trimble Jul 14 '13 at 20:55
• Hm. I must be doing something dumb. – Todd Trimble Jul 14 '13 at 21:01
• @ToddTrimble: To enter the html entities directly in comments does not work. (This is what Andrew Stacey says with "Entities in comments are escaped") For an answer it would have worked though. If you copy paste the comment in an answer box and copy the preview it should work. (At least if you add some more of the "magic spaces" and perhaps put them before the last actual character. This might not be necessary, I do not yet know all the details.) – user9072 Jul 14 '13 at 21:01

Can you? ​​​

• Y‌‌‌‌‌‌‌‌‌‌‌‌‌es! – user9072 Jul 14 '13 at 20:07
• Yep.​​​​​​​​​​​ – The User Jul 14 '13 at 20:29
• ​​​​​​​​​​​​​​​​​​​​​​​​ – Charles Staats Jul 19 '13 at 15:42
• At this writing, (on a mobile phone browser), I see "Y|es!", "Yep.", and "-". Not exactly, but I want to indicate that quid's rendition does not look as clean as The User's rendition. – The Masked Avenger Jul 19 '13 at 22:41
• ​​​​​​​​​​​​​​​​​​ – Fred Kline Jul 20 '13 at 3:46
• @TheMaskedAvenger: could you tell me if you see this again in one or both of: Y‌es! N​o? – user9072 Jul 22 '13 at 21:56
• It is more challenging, as what I perceive seems lighter than in a few comments above. I approximate (after zooming in) it as "Y(lighter |)es! No?" Again I am reporting, not doing copy-paste. – The Masked Avenger Jul 22 '13 at 22:13
• @TheMaskedAvenger: thanks, it somehow makes sense that this is like this. I used originally for the Yes! several zero width non-joiner (&#8204;) then in the second Yes! only one of those, but in the No? I used a zero width space (&#8203;) which is what The User used presumably (as this is what they mentioned above in hex). So it seems you can see the zero width non-joiner (and if there are several than it is more visible) but not the zero width space. – user9072 Jul 22 '13 at 22:21

The answer that I found that works for me is backslash semicolon
\;

I found this answer at https://texblog.org/2014/04/09/whitespace-in-math-mode/

• Yes, \; is one of the spacing characters in Latex. Generally, you use it between parts of a formula, when you want extra spacing. $\int f(x)dx$ or $\int f(x)\;dx$ for example. So this is perhaps an answer to the title of the question rather than an answer to the full text of the question. – Gerald Edgar May 8 at 13:37
• \; (backslash semicolon space) is my go to separator. Its really useful when I'm building a formula with words rather than math symbols. – Malcolm Anderson May 22 at 2:38