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.
I don’t know what may be happening but ir does not work in my web site:
https://luis-fontes-zmx4.squarespace.com/new-page-2/
I inserted the code in the header and did everything you say but I don’t get the math well rendered.
I would be very pleased to hear any ideas from you. Thank you
My email is: luis@zplot.com
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?
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.
awesomeness
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?
I believe it’s happening because cdn.mathjax.org hit the end of its life. Replacing
src="http://cdn.mathjax.org/...
withsrc="https://cdnjs.cloudflare.com/ajax/libs/...
worked fine for me.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">
</script>
but this isnt working for me either…