If it's possible for escaping \$ to normal $, then latex $ (expressions) $ would not be any problem.
I wanted to make my own hack for this, but I'm not used to string so far.
Is there any plan to support dollar sign escaping?
We already have logic that should skip over backslashes:
Maybe it's not working?
That only works for escaping $ inside of math, but not outside of it. @PaulSohn can you give an example of what you're trying to do?
Rendering this text:
I will give you \$2 if you can solve $y = x^2$.
with this delimiter:
{ left: '$', right: '$', display: false }
results in
<#text>I will give you \</#text>
<span>KATEX MATH</span>
<#text>y = x^2</#text>
<#text>$.</#text>
where <#text> denotes a text DOM node.
Agreed, can not write dollar sign outside of math equations...
@PaulSohn can you use different delimiters, e.g. \(,\) and \[,\]?
I'm going to close this since it's going to be very difficult to implement something that handles the different behaviors people want. Also, there is a workaround by using different delimiters.
Just a question, How can I make the following string be ignored by katex?
John bought a shirt, a pair of pants, and a pair of shoes, which cost $10, $20, and $30, respectively. What percent of the total expense was spent for the pants?
It is being rendered like this:

There is more than one way to do this. If you are using the KaTeX auto-render extension, then you can delimit your math with \(…\) instead of $…$. Or you can nest the whole phrase in <noscript>…</noscript> tags.
Some markdown parsers only recognize the closing $ as a math delimiter if it is not followed by a number. Sometimes I think we should do that too.
Thanks for replying. I simply replaced my $ with <span>$</span> and this made Katex ignore it. I'm putting it out so that someone else also tries it if they're stuck.
Would be nice for MathJax processEscapes compatibility: http://docs.mathjax.org/en/latest/options/preprocessors/tex2jax.html#configure-tex2jax
@Trass3r can you open a new issue for processEscapes?
Isn't it exactly this issue?
When set to true, you may use \$ to represent a literal dollar sign. Typically this is set to true if you enable the $ ... $ in-line delimiter
I'm re-opening and have changed the title to indicate that we'd like an option to ignore \$.
Most helpful comment
Rendering this text:
with this delimiter:
results in
where
<#text>denotes a text DOM node.