A couple of times now, I have drafted a question, only for the automatic preview to completely mangle the MathJax. Examples:
- I expect
$\{X\}$
should display as $\{X\}$. Instead I see just $X$, as if I'd written${X}$
. However, if I write$\\{X\\}$
, then I do see $\{X\}$. - I expect
${X}_{n}$ and ${Y}_{n}$
should display as ${X}_{n}$ and ${Y}_{n}$, but instead I see \${X}{n}and{Y}{n}\$, with the text between the underscores treated as italics. (This is in some sense a minimal example, since${X}_n$ and ${Y}_n$
and$X_{n}$ and $Y_{n}$
show up as expected, as does simply${X}_{n}$
on its own line.) To get things to show up correctly, I can escape one or both underscores, for example with${X}\_{n}$ and ${Y}_{n}$
Some notes:
- This appears to only be a problem on the main site, not here on meta.
- Once the question is posted, everything shows up correctly; only the preview before posting is a problem. This has bitten me at least once: Someone else had to fix a question of mine where I double-escaped some braces to get the preview to look right.
- I do all my editing in Chrome. When I tried to reproduce the problem in Firefox, I was unable. I was also unable to reproduce it in Edge, which is very strange because (if I understand correctly) Edge is built on Chromium. However, a friend was able to reproduce in Chrome on another computer, logged in as himself.
This doesn't appear to be a known issue on meta, but perhaps I missed something. (The most similar I found was Mathjax rendering incorrectly in edit preview., but that error was cause by a plugin and I'm not using any plugins.)