Mathjax inline mode not rendering

You can enable the $ … $-style inline mode by inserting the following code into the <head> section of your HTML before MathJax is being loaded. This way, you can invent new delimiters, too.

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>
    
<script type="text/javascript"
        src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

Remember that after enabling this, you have to escape 'normal' dollar signs with \$.

A more detailed description can be found in the MathJax documentation. It also describes why the single dollar delimiters are disabled by default:

Note that the single dollar signs are not enabled by default because they are used too frequently in normal text, so if you want to use them for math delimiters, you must specify them explicitly.

In MathJax v3, the configuration API changed. You now create a global MathJax object:

<script type="text/x-mathjax-config">
  MathJax = {
    tex: {
      inlineMath: [['$', '$'], ["\\(", "\\)"]],
      processEscapes: true,
    }
  }
</script>

Does it work if you use \( and \) ? At least for me, mathjax is pretty picky when it comes to formulas with just dollars around them.

Tags:

Mathjax