5

Some math equations do not render correctly in the editor preview.

Here's an example of one of them:

$$\text{card}(x) = \|x\|_{0} = \lim_{p \to 0} \left( \sum_{k=1}^{n} |x_{k}|^p \right)^{1/p}$$

Simpler equations do render correctly in the preview, for example:

$$y=x$$

After posting the question, both equations are rendered correctly.

This failure during preview is frustrating, because it leads users to believe they are making a syntax error during composition.

Tested at math.stackexchange.com on Firefox and Chrome with no extensions.

enter image description here

Sonic the Anonymous Hedgehog
103k18 gold badges207 silver badges441 bronze badges
asked Jun 27, 2024 at 3:39
3
  • 2
    It’s the underscores (_) that are causing problems, they are rendering italics (like in regular markdown). And you can "trick" the preview if you escape them (\_). Commented Jun 27, 2024 at 10:17
  • 2
    It used to be that the preview code would protect the math from being processed as markdown, but that no longer seems to be the case. If you use \_ to get the preview to work, it will likely cause the final post not to work as \_ means insert a literal underscore when used in TeX. The preview editor and the processing of the messages on the server seem to have diverged over time. Sigh. Commented Jun 28, 2024 at 13:53
  • 1
    Not exactly the same, but perhaps this can be considered a bit similar: MathJax escape sequences don't work. Commented Aug 1, 2024 at 5:52

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.