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

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...

• Funny after posting it, the title seems to reveal it. But have a look at the edit. It does show up there... Jan 30 '13 at 20:11
• 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. Jan 30 '13 at 20:39
• @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.
– robjohn Mod
Jan 30 '13 at 20:44
• 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. Jan 30 '13 at 21:28
• @martin I know, strange isn't it. So Title, body and comments are all treated differently... Jan 30 '13 at 21:28
• @martin how to see that is 0x200c and friends? Jan 30 '13 at 21:33
• 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. Jan 30 '13 at 21:38
• @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. Jan 31 '13 at 13:59
• @DavideCervone thx that's great. Now I know what it's good for... Jan 31 '13 at 14:20

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)$

• ok, but do you think that mats put'em there (in the comment) to break his own tex? Jan 30 '13 at 20:39
• How can I see that? Jan 30 '13 at 20:43
• what about the difference in body and title? Jan 30 '13 at 20:47
• @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.
– robjohn Mod
Jan 30 '13 at 20:47
• @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.
– robjohn Mod
Jan 30 '13 at 21:07

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

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