4
$\begingroup$

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

$\endgroup$
6
  • $\begingroup$ I almost exclusively use basically the latest version of Microsoft Edge on a Windows $10$ machine to do my math answers postings. Note I have had issues with the preview not working properly on quite a few occasions, including your specific problem (other examples are where tags and labels aren't handled properly). It seems that the automatic updates of what you are seeing sometimes get out of sync with your most recent changes. I've found that I just save what I have, exit from editing or posting, refresh the screen, and then repost it, with this solving the problem. Note that I have not ... $\endgroup$ Sep 7 at 20:00
  • $\begingroup$ (cont.) posted anything here because MathJax is used on multiple SE sites, with there being several related posts on the network Meta site that I've seen related to this (I can search for this and provide a few links if you wish, e.g., if you can't find anything yourself). One final thing to note is that, like you, I'm also not using any plugins, i.e., it's just the basic browser itself. $\endgroup$ Sep 7 at 20:04
  • $\begingroup$ @JohnOmielan Interesting. But just now I discarded my draft question and closed the browser, and when I reopened everything and pasted the question back in, the problem showed up immediately. So I think this is not exactly what you are describing (or maybe it's just worse in Chrome than Edge). Regarding Meta, your comment prompted me to search there, and I found a few related questions (for example meta.stackexchange.com/questions/386776/…), but no answers. $\endgroup$
    – A. Howells
    Sep 7 at 20:33
  • $\begingroup$ Thanks for your additional information. Since reposting on a clean instance didn't solve the problem, I agree it's likely a somewhat different issue for you. As for your example Meta question that you found, I recall that's one which I've also seen previously. Regarding answers to those questions, my recollection is that most of them didn't have any. $\endgroup$ Sep 7 at 20:40
  • $\begingroup$ I'm using Chromium and Chrome across a myriad of platforms and have no problems. $\endgroup$
    – Asaf Karagila Mod
    Sep 7 at 22:34
  • 2
    $\begingroup$ The problem is seen during question preview both on main site and meta site. I use the site on Android mobile device with Firefox. Surprisingly the answer preview works fine and that's one of the reasons I didn't notice it so far. $\endgroup$
    – Paramanand Singh Mod
    Sep 8 at 1:33

0

You must log in to answer this question.

Browse other questions tagged .