MathJax extension for LaTeX equations

Electrical Engineering Stack Exchange is an interesting case study: to avoid confusion to users that had simply used $ for prices, and specifically to avoid breakage in existing texts, they switched to idiosyncratic \$...\$ for inline math:

IMHO the particular syntax \$ is quite unfortunate. Ideally backslash in MD should only block magic character meanings, not enable them; the only reason \(...\) and \[...\] are used is being familiar to Latex users. But let’s leave that aside an focus on the question why $...$ proved unacceptable.

  • Reading these Meta discussions, I see there were problems with preview then — math would render extremely slowly or not at all until the user pressed Post. Also, it seems mathjax didn’t support $ escaping yet, so even users who were aware of the math syntax didn’t know how to type a dollar, with the best workaround being the obscure math dollar $\$$
    I wonder if working & fast preview can significantly reduce user surprise, i.e. can users who don’t care about math. I.e. is $math$ something that users who just want to type a dollar and don’t care about math can easily learn to avoid (given working $ escaping), or is it a significant tripping point?

  • To this day, Pandoc is the only converter implementing $ with a heuristic, so that $200 ... $5 is not considered math.
    I wonder whether Electronics.SE could have stayed with single dollars if a similar heuristic had been easy to implement with MathJax?

@codinghorror, as you argued both sides there — first that

we don’t want different basic usage of MathJax across the network; that would be like Markdown changing essentials like “how to bold” on a site by side basis.

and later settled on \$...\$ — could you weigh in here on what delimiters/heuristics might be appropriate everywhere?

1 Like