The global HEADER code injection (https://your-username.squarespace.com/config/settings/advanced/injection):
<!-- #1: Load MathJax--> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> <!-- The following scripts only work AFTER the script that loads MathJax --> <!-- #2: Enable equation numbers via \begin{equation}. --> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "AMS" } } }); </script> <!-- #3: Enable proper inline equation via $, and also process escape characters (e.g. \$). --> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']], processEscapes:true} }); </script> <!-- #4: Create a MathJax macro that reset's the equation auto-numbers. Thanks to https://github.com/mathjax/MathJax/issues/1294 --> <script type="text/x-mathjax-config"> MathJax.InputJax.TeX.Definitions.Add({ macros: { setCounter: "setCounter" } }, null, true); MathJax.InputJax.TeX.Parse.Augment({ setCounter: function(name) { var num = parseInt(this.GetArgument(name)); MathJax.Extension["TeX/AMSmath"].number = num; } }); </script>
The global FOOTER code injection (https://your-username.squarespace.com/config/settings/advanced/injection):
<!-- Re-typset page in case it is dynamic, per https://stackoverflow.com/questions/25839396/is-it-possible-to-use-mathjax-on-squarespace --> <script> MathJax.Hub.Queue(["Typeset",MathJax.Hub]); </script>
The "post blog entry" code injection (blog settings/advanced):
<!-- Reset equation counter after every blog entry -->
$\setCounter{0}$