Why doesn't adding MathJax to Page header work?

I’ve tried adding:

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

<script type="text/javascript" async
 src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML">
</script>

both with and without tags to the page’s HTML header field. And a formula in an HTML element on the page is not rendered. But if you include the above into an HTML element with $$\int a$$ for example, then it is rendered.

So essentially you have to include the above script into every place you want to use LaTeX. Is there any way around this?

This topic was automatically closed after 70 days. New replies are no longer allowed.