Mathjax issue with MathJax.Hub.Queue and Typeset

2.3k views Asked by At

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"]);
1

There are 1 answers

0
Davide Cervone On BEST ANSWER

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 of config=AM_CHTML.