4

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

2
  • 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 at 10:17
  • 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 at 13:53

0

You must log in to answer this question.

Browse other questions tagged .