7
$\begingroup$

The braces disappear in this TeX code (${a,b}$) given by ($\{a,b\}$). This occurs whenever the parenthesis are adjacent to the dollars.

I'm not sure if it is a local bug, or a MathJax but. Either way I figured that reporting it should be a good idea.

$\endgroup$
2
  • 2
    $\begingroup$ I added the (bug) tag. This bug is still unresolved. The accepted answer is just a workaround, and it's unsatisfactory even as a workaround, since it works only when the bug occurs and you can't just always write \\{ to avoid this problem; thus one always has to check for braces going missing. I recently saw a post that was incomprehensible because the braces around a set were missing. Note also that this isn't specific to parentheses; you can put almost any non-space character before or after the dollar signs to trigger it. $\endgroup$
    – joriki
    Dec 26, 2011 at 0:46
  • $\begingroup$ @jor see meta.math.stackexchange.com/questions/1115/… -- between double dollar signs, this isn't necessary, but single dollar signs are not given special treatment. That is indeed by design at the moment. $\endgroup$ Dec 26, 2011 at 6:40

2 Answers 2

7
$\begingroup$

This is (yet another) escaping-symbols-in-Markdown problem. Use ($\\{a,b\\}$) to get ($\{a,b\}$).

$\endgroup$
6
$\begingroup$

Another workaround is $\lbrace a,b \rbrace$. It's more verbose than $\\{ a,b \\}$, but has the advantage that it works regardless of whether this bug is triggered or not.

In any case, this bug has apparently been fixed at some point within the past six years. The Markdown code $\{ a,b \}$ now produces $\{ a,b \}$, just as it should.

Note that, since the Markdown to HTML conversion is done only once when a post is submitted or edited, old posts that have not been edited since this bug was fixed will continue to render as they used to. However, any edits to such posts will cause the Markdown source to be reparsed, so that $\{ a,b \}$ will start working while $\\{ a,b \\}$ will break.

$\endgroup$

You must log in to answer this question.

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