8
\$\begingroup\$

I just asked this question, but my inline math didn't work until I put a backslash before the dollar signs \$like so\$.

Why is the backslash required? That isn't the case on other sites.

![Screenshot

\$\endgroup\$
1
  • 3
    \$\begingroup\$ I came here to ask if it's just me, and found it was already asked. I confirm the issue, and added a screenshot to illustrate the issue. \$\endgroup\$
    – Mołot
    Jun 1 '20 at 8:15
11
\$\begingroup\$

Sometimes, when MathJax is added to a site when it's mature and has a lot of posts already, Stack Exchange staff chooses to use \$ delimiters instead of $. This is to prevent things like

There are a few decent options in the $10-$20 range.

being displayed as

There are a few decent options in the \$10-\$20 range.

There are a handful of other sites in the network where this the case: for a complete list, see Which Stack Exchange sites use MathJax?.

\$\endgroup\$
3
  • \$\begingroup\$ That's cool. Thanks. Out of interest, how would one write $10-$20 in sites which do not use \$? \$\endgroup\$ Jun 1 '20 at 9:30
  • 4
    \$\begingroup\$ Surprise, surprise (I didn't know it either, I just tried): that's possible by using \$. \$\endgroup\$
    – Glorfindel
    Jun 1 '20 at 9:32
  • \$\begingroup\$ haha, nice, thankyou \$\endgroup\$ Jun 1 '20 at 9:50
9
\$\begingroup\$

Because when we added MathJax to the site, Stack Exchange staff decided to use \$ as delimiters rather than $ because many posts would be impacted otherwise. They cite an analysis by one of our citizens:

There are 349 posts that contain dollar signs, more than twice my estimate for posts that might benefit from MathJax (162). 137 of the 349 contain 2 dollar signs, if that matters.

— Miniman Nov 12 '15 at 0:37

You can see the original post requesting MJ on RPG here, and the post announcing its going live here.

(I know this doesn't really add much to Glorfindel's answer—really I just wanted to link both of those posts into this conversation, and my conscience wouldn't let me leave them in comments that really do answer the question.)

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for sharing that info! I think the answer does add something :) \$\endgroup\$
    – V2Blast StaffMod
    Jun 1 '20 at 20:20

You must log in to answer this question.

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