How do you type the dollar sign when you have mathjax installed?

前端 未结 3 1478
[愿得一人]
[愿得一人] 2020-12-31 18:22

So in Jekyll and Markdown, I can\'t type $ or its HTML equivalent code, and not \\$ nor $\\$$. How should I type the dollar sign?

相关标签:
3条回答
  • 2020-12-31 18:53

    I used mathjax's dollar symbol in that paragraph. It works.

    0 讨论(0)
  • 2020-12-31 19:01

    Enable processEscapes:

    MathJax.Hub.Config({
      tex2jax: {
        inlineMath: [['$','$'], ['\\(','\\)']],
        processEscapes: true
      }
    });
    

    Then you can simply use \$ to get a plain $.

    0 讨论(0)
  • 2020-12-31 19:07

    To prevent MathJax from using the dollar sign as a delimiter, you can put it in a span, like so:

    <span>$</span>
    

    Alternatively, you can enable processEscapes and then you can use the backslash escape \$ for the dollar sign.

    0 讨论(0)
提交回复
热议问题