# How to escape latex markdown?

I should be able to literally write the dollar sign character with $example$ $$example$$ \$example\$ without latex formatting, but I can't seem to figure out the proper escape sequence. How do we escape out of latex mode?

And will someone please add this latex syntax stuff to the markdowns help pop-up?

• a silly solution would be to use backticks: $ – Suresh Venkat Oct 11 '10 at 18:44 • @Suresh: I upvoted your comment. Just in case, this upvote means that I think that it is useful to know that a dollar sign can be used inside backticks. It does not mean that I agree that it is a silly solution. :) – Tsuyoshi Ito Oct 13 '10 at 18:37 ## 2 Answers As far as I know, there are five ways to render dollar signs in questions and answers. 1. $example$$example$. (use backticks in Markdown) 2. $\$$example\$$ → $\$$example\$$. (use LaTeX) 3. \$example\$ → \$example\$. (if you do not mind additional backslashes rendered) 4. $example → $example. (if you need just one dollar sign) 5. ＄example＄ → ＄example＄. (abuse Fullwidth Dollar Sign (U+FF04)) More details: 1. As Suresh wrote in a comment, you can use a code span in Markdown (backticks). 2. You can use LaTeX. 3. As you did in the question, if you prepend a backslash to a dollar sign, the dollar sign is not considered as a LaTeX math delimiter, but the backslash is also rendered. 4. If just one dollar sign is needed, you can write it without any trouble. What counts as one seems complicated (for example, the example above really contains two dollar signs). 5. You can abuse Fullwidth Dollar Sign (U+FF04). But note that most Latin fonts do not contain this letter and that therefore some people may not have a font containing it. Also, this is an abuse because the character U+FF04 exists only for compatibility with some legacy character sets/encodings. See also a related question on meta.math.stackexchange.com, but note that part of the question is obsolete (as stated in an answer). • Would you agree that this ought to be corrected somehow? – Jason Kleban Oct 11 '10 at 23:09 • @uosɐſ: I agree that it is desirable to have some way to render a plain dollar sign without backticks and without going into LaTeX math. Not sure I will ever need that functionality, though. In any case, no one on cstheory has the power to fix it. You or someone else should bring the issue to Meta Stack Overflow if it has to be solved (and if it is not brought there already). – Tsuyoshi Ito Oct 11 '10 at 23:46 I found an evil workaround: $<b></b>example$ →$example\$.

I would not rely on this, but it seems to work at least at the moment.

• that's hilarious. and creative. – Suresh Venkat Oct 12 '10 at 15:38
• @Suresh: I guess you see why I could not help posting this workaround with all its wickedness, once I found it. :) – Tsuyoshi Ito Oct 12 '10 at 16:00