1
$\begingroup$

It happened to me a couple of times to see MathJax code not properly rendered in a comment. All occurrences I remember of were caused by a Control Sequence being cut off too soon, as the \limits and \sqrt in this comment, which get interpreted as \+limits and \sq+rt for some reason. Also, the \limits is there just because the _ wouldn't be taken into account without it, for some strange reason. So I was wondering: what is happening here, why, and can it be fixed?

||||||
$\endgroup$
  • $\begingroup$ … evaluating the primitive in 0 and $-\infty$ has the logs cancel each other out, so what we are left with is $\frac{2\sqrt{3}}{6}\arctan(\frac{2\cdot0+1}{\sqrt{3}})-\frac{2\sqrt{3}}{6}\lim\limits_{x\to-\infty}\arctan\frac{2x+1}{\sqrt{3}}=\frac{\sqrt{3}\pi}{18}+\frac{\sqrt{3}\pi}{6}=\frac{2\pi\sqrt{3}}{9}$. Umm… I'll just check my calculations :). $\endgroup$ – user642796 Sep 24 '14 at 18:09
  • $\begingroup$ Is ^^^^ the comment you are referring to? If so, the issue is likely the same as described in this meta-question, as described by robjohn, the reason basically being that in comments zero-width spaces are automatically added to comments when strings of more than 80 characters are written without whitespace, and it doesn't care if you're in the middle of some MathJax. Add more whitespace to your comments. $\endgroup$ – user642796 Sep 24 '14 at 18:09
  • $\begingroup$ … evaluating the primitive in 0 and $-\infty$ has the logs cancel each other out, so what we are left with is $\frac{2\sqrt{3}}{6}\arctan(\frac{2\cdot0+1}{\sqrt{3}})-\frac{2\sqrt{3}}{6} \lim\limits_{x\to-\infty}\arctan\frac{2x+1}{\sqrt{3}}= \frac{\sqrt{3}\pi}{18}+\frac{\sqrt{3}\pi}{6}=\frac{2\pi\sqrt{3}}{9}$. Umm… I'll just check my calculations :). $\endgroup$ – user642796 Sep 24 '14 at 18:13
  • 1
    $\begingroup$ Is it enough to add a blank space somewhere in the formula where it will be ignored in the output? $\endgroup$ – MickG Sep 24 '14 at 18:35
  • $\begingroup$ Yes. You don't want to break the code (so no \lim\li mits), but wherever is natural to put in whitespace is fine.. at times necessary, even. (Comments can be up to 600 characters long, and I personally rarely need to condense my LaTeX code to fit within this limit.) $\endgroup$ – user642796 Sep 24 '14 at 18:41

Browse other questions tagged .