1
$\begingroup$

The following tex works fine, when I write it myself:

$\mathrm{Im} \left( \right) $,

but when I copy the same tex from here it doesn't work:

$\mathrm{Im} \left( \r‌​ight) $

Why is that? And you might have noticed the different look in title and post. It was just a copy-paste. Are they rendered differently?

EDIT

I put this in a comment below:

\$\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\$

thats 589 characters plain tex and 91 when it's tex-ed

$\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\left(\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)$

First of all it doesn't fit to martin suggestion of $>80$ chars without white space, second it totally break the page layout and third it doesn't work there...

$\endgroup$
  • $\begingroup$ Funny after posting it, the title seems to reveal it. But have a look at the edit. It does show up there... $\endgroup$ – draks ... Jan 30 '13 at 20:11
  • 6
    $\begingroup$ Probably the same problem as meta.math.stackexchange.com/q/3953 Mats's comment contains a TeX string of length $> 80$ without whitespace. The two invisible unicode characters 0x200c and 0x200b are inserted at position 79. $\endgroup$ – Martin Jan 30 '13 at 20:39
  • $\begingroup$ @Martin: good catch. Since this was isolated (probably by the copy-paste), I didn't think of that. It is the same problem. Add spaces to long (>80 character) LaTeX strings with no breaks. $\endgroup$ – robjohn Jan 30 '13 at 20:44
  • $\begingroup$ I talked about the input TeX source, not the output. The first broken TeX thing in your comment was between the thirteenth and the fourteenth parenthesis, 6 characters for \left( times 14 = 84 characters. $\endgroup$ – Martin Jan 30 '13 at 21:28
  • $\begingroup$ @martin I know, strange isn't it. So Title, body and comments are all treated differently... $\endgroup$ – draks ... Jan 30 '13 at 21:28
  • $\begingroup$ @martin how to see that is 0x200c and friends? $\endgroup$ – draks ... Jan 30 '13 at 21:33
  • $\begingroup$ I copy-pasted the offending text into my shell which displays unsupported characters as hex strings. If yours doesn't do that, you probably need some text editor capable of displaying hex, I don't know of an online solution. $\endgroup$ – Martin Jan 30 '13 at 21:38
  • 1
    $\begingroup$ @draks, use the MathJax contextual menu to view the MathML code (not the TeX code). You will see the character entities (like &#x200B;) in the <mtext> tag inside the <merror>. This holds the original markup, and so shows the extra characters there. $\endgroup$ – Davide Cervone Jan 31 '13 at 13:59
  • $\begingroup$ @DavideCervone thx that's great. Now I know what it's good for... $\endgroup$ – draks ... Jan 31 '13 at 14:20
4
$\begingroup$

There are a couple of invisible characters that were inadvertently copied between the r and the i of right. 0x200C (Zero Width Space Non-Joiner) and 0x200B (Zero Width Space) from what I can see.

Whatever processing the source page went through converted the 0x200C (Zero Width Space Non-Joiner) in the title to a real space:

Invisible $\LaTeX$ error: $\mathrm{Im} \left( \right) $ vs. $\mathrm{Im} \left( \r ​ight) $

$\endgroup$
  • $\begingroup$ ok, but do you think that mats put'em there (in the comment) to break his own tex? $\endgroup$ – draks ... Jan 30 '13 at 20:39
  • $\begingroup$ How can I see that? $\endgroup$ – draks ... Jan 30 '13 at 20:43
  • $\begingroup$ what about the difference in body and title? $\endgroup$ – draks ... Jan 30 '13 at 20:47
  • 1
    $\begingroup$ @draks...: these invisible spaces seem to be added by the web server or Ajax when a string of more than 80 uninterrupted characters is input. This messes up MathJax which does not simply delete them. $\endgroup$ – robjohn Jan 30 '13 at 20:47
  • $\begingroup$ @draks...: it is hard to see, but when weird things happen to my LaTeX, I make sure there is at least 1 space every 79 characters. $\endgroup$ – robjohn Jan 30 '13 at 21:07
3
$\begingroup$

I think that you are copying some hidden characters while at it. That would be the only plausible explanation.

$\endgroup$
  • $\begingroup$ ok, but do you think that mats put'em there (in the comment) to break his own tex? $\endgroup$ – draks ... Jan 30 '13 at 20:40
  • $\begingroup$ No, but the line seems overly long, it might be an automatic linebreak or something which breaks the $\TeX$. $\endgroup$ – Asaf Karagila Jan 30 '13 at 20:42

You must log in to answer this question.

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