6
$\begingroup$

In revision 2 of Number of permutations in $S_{a + b}$ with $\operatorname{maj}(\pi) = b$ and $\operatorname{maj}(\pi^{-1}) = b$, I edited an equation that had been manually given the label (\ast) to use \tag. As usual when I have to make up a label for an equation that wasn't already given one, I used the existing tag; in this case, \label{*}, with the corresponding \eqref{*}. This worked fine in the generated preview, but, when the post actually rendered, the * inside \eqref was parsed as Markdown rather than as MathJax.

@GeraldEdgar's test suggests that this might not happen on MMO (or maybe we're not exercising the specific buggy conditions here?), but visiting the specific revision https://mathoverflow.net/revisions/384561/2 shows that it does happen on MO.

In case TeX in the main post affects @GeraldEdgar's test, $1 + 2 = 3$. In case you missed it, \begin{equation} \tag{*}\label{*} 1 + 2 = 3. \end{equation} In case you still missed it, refer back to \eqref{*}

$\endgroup$
2
  • $\begingroup$ An obvious answer is "don't use * as a label", which will certainly mitigate the problem, but my point is more about the preview not matching the rendered post than working around this specific parsing issue. $\endgroup$ – LSpice Feb 21 at 18:28
  • $\begingroup$ Your equation in the question looks OK when I first come here, but goes bad when I edit. $\endgroup$ – Gerald Edgar Feb 27 at 11:46
3
$\begingroup$

Trying to reproduce the problem. An equation $$ 4+2=9 \tag{*}\label{1} $$ and then reference to it \eqref{1}. How does it look?

Another equation $$ 4\times2 = 6 \tag{**}\label{2} $$ and a reference to it \eqref{2}. How does it look?

OK when the page is first rendered, or when the page is re-rendered later. But not OK following an edit with no re-render of the whole page. And I expect problems when there is other LaTeX above this on the same page.

$\endgroup$
6
  • $\begingroup$ Thanks for the test! I'm sure it's my fault, but I can't parse it—what does "following an edit with no re-render of the whole page" mean? $\endgroup$ – LSpice Feb 23 at 13:28
  • $\begingroup$ If you think that exercising this with specific LaTeX in the main post would help, then I would be happy to do so. $\endgroup$ – LSpice Feb 23 at 13:28
  • $\begingroup$ After an edit, if what you see is wrong, re-load the page. That fixes it. $\endgroup$ – Gerald Edgar Feb 23 at 13:31
  • $\begingroup$ @‍GeraldEdgar, re-loading doesn't seem to fix mathoverflow.net/revisions/384561/2 . $\endgroup$ – LSpice Feb 23 at 14:40
  • 1
    $\begingroup$ I think your oroginal solution is it: do not use * or ** as labels. (They are OK as tags.) I changed it to use labels not conflicting with markdown. $\endgroup$ – Gerald Edgar Feb 23 at 15:26
  • $\begingroup$ That certainly fixes this specific problem, but it doesn't fix the problem of preview not matching rendered text, which was my complaint. In this case, since we're trying to reproduce the problem, I'm not sure what's gained by changing the labels so as not to reproduce it. $\endgroup$ – LSpice Feb 27 at 14:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .