0

I've previously used MathJax 2.x on Google's Blogger platform, inserting the library and configuration references in the site's template HTML, as per many recommendations here and elsewhere.

On a new Blogger blog, I decided to use MathJAX 3, using the call that always pulls in the latest 3.x version.

In both cases I use dollar symbols, $ and $$, to trigger inline and display maths.

With MathJax 3.x, I can no longer use $$ on it's own line. The following doesn't work.

$$
x=y
$$ 

I need to do this:

$$ x = y $$

The first is cleaner, especially for multiline equations.

Anyone know how to make this work with MathJAX 3.x?

Here is my config code:

<script>
    MathJax = {
      tex: {
        inlineMath: [[&#39;$&#39;, &#39;$&#39;]],
        displayMath: [[&#39;$$&#39;,&#39;$$&#39;]]
      },
      svg: {
        fontCache: &#39;global&#39;
      },
      options: {
        enableMenu: false
      }
    };
    </script>
    <script async='async' id='MathJax-script' src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js'/>

I'm not an expert so there may be something wrong with this. I have spent several hours reading the MathJAX documentation for 3.x and 2.x.

The problems remains if I use the default delimiter characters, so is not related to the $ symbol.

I have tried the config to replace HTML tags with TEX to try to replace the generated

with nothing, but that fails with an error.

1
  • Out of curiosity, do you absolutely have to use $$...$$ for displayed math? I've just run into MathJax, and it worked out of the box using \[...\] for displayed math. The latter is preferable to the former anyway. – Gallifreyan Dec 27 '20 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.