Finally, I managed to get Mathjax working in Squarespace 6.  This is how it works:

1. Under Settings -> Code injection insert the following in the header:

<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

then insert the following in a code block as HTML and you will see the Mathjax rendered equation below:

When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$

Squarespace will only render the equation if you are viewing the website without being in editing or administration mode.  This is a little frustrating but you can have a separate window open to view what a visitor will see. 

7 thoughts on “Mathjax in Squarespace 6

  1. I am running into the same issue as Luis. Simply inserting the header code and putting the math in an HTML code block does not seem to result in MathJax rendering properly. Do you have any thoughts on this. Any details I may be missing in the implementation?

  2. My apologies on my last comment. I didn’t read your post carefully in which you say that the MathJax won’t render properly when you are in editing or administration mode. Your implementation works for me as well as long as I logout of my squarespace account and view the site as a visitor.

    Thank you very much for posting this.

  3. I know this is from a long time ago but Squarespace seems to no longer render mathjax with this solution. It worked up until a few days ago for me. Can you provide any insights to this?

  4. this is not working for inline, i have also seen that you need to configure mathjax to do inline such as

    accepted
    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="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;
    </script>

    but this isnt working for me either…

Comments are closed.