Following this page, I try to display a simple equation into a div container.
Here is an example on this jsfiddle link
It seems that equation is not interpreted as a Mathjax equation and I don't know how to make it rendered.
JS :
MathJax.Hub.Config(
{
messageStyle: "none",
TeX:
{
equationNumbers:
{
autoNumber: "all"
}
},
tex2jax:
{
inlineMath: [['$','$'], ['\\(','\\)']],
displayMath: [ ['\\begin{displaymath}','\\end{displaymath}'], ['\\begin{equation}','\\end{equation}'] ],
processEscapes: true,
preview: "none"
}
});
document.getElementById("containerCanvas").innerHTML = "$ax+b=c$";
MathJax.Hub.Queue(["Typeset",MathJax.Hub,"containerCanvas"]);
Your jsFiddle loads the AsciiMath input jax, not the TeX input jax, so dollar not TeX-delimiter math will be processed. Try using
config=TeX-AMS_CHTML
instead ofconfig=AM_CHTML
.