Hello Davide,
I tried adding this script to the page header, however it did not work for me (I only tested in Chrome). Perhaps my main configuration script is interfering in some way, so I will include it here so perhaps you can tell what this issue is:
<script type="text/x-mathjax-config">
MathJax.Hub.Config(
{
TeX:
{
extensions: ["autoload-all.js"],
noErrors:
{
style: {"display": "block !important",
"margin": "1em 0em 1em 2em",
"border": "none",
"text-decoration": "underline"
}
},
Macros:
{
pd: ["{\\frac{\\partial#1}{\\partial#2}}",2],
d: ["{\\frac{d#1}{d#2}}",2],
E: ["\\times 10^{#1}",1],
csch: ["\\mathop{\\rm csch}\\nolimits"],
arccsc: ["\\mathop{\\rm arccsc}\\nolimits"],
arcsec: ["\\mathop{\\rm arcsec}\\nolimits"],
arccot: ["\\mathop{\\rm arccot}\\nolimits"],
sech: ["\\mathop{\\rm sech}\\nolimits"],
arsinh: ["\\mathop{\\rm arsinh}\\nolimits"],
arcosh: ["\\mathop{\\rm arcosh}\\nolimits"],
artanh: ["\\mathop{\\rm artanh}\\nolimits"],
arcsch: ["\\mathop{\\rm arcsch}\\nolimits"],
arsech: ["\\mathop{\\rm arsech}\\nolimits"],
arcoth: ["\\mathop{\\rm arcoth}\\nolimits"],
}
},
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
"HTML-CSS": {linebreaks: {automatic: true, width: "90% container"}},
"SVG": {linebreaks: {automatic: true, width: "90% container"}},
displayAlign: "left", displayIndent: "2em", displayErrorAlign: "left",
tex2jax:
{
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [['$$','$$'], ['\\\[','\\\]']],
processEscapes: true
}
});
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function ()
{
MathJax.InputJax.TeX.prefilterHooks.Add(function (data)
{
if (data.display)
{
var next = data.script.nextSibling;
while (next && next.nodeName.toLowerCase() === "#text")
{
next = next.nextSibling
}
if (next && next.nodeName.toLowerCase() === "br")
{
next.parentNode.removeChild(next)
}
}
});
});
</script>
I will likely stick with the plain CSS class selector, but I like to experiment with differing options. :D
Best Regards,
Mark.