Mathjax: Calling "MathJax.Hub.Queue(["Typeset",MathJax.Hub]);" is generating the markup again.

Created on 8 Oct 2016  路  4Comments  路  Source: mathjax/MathJax

Hey guys, I recently started using Mathjax and I having an issue with "MathJax.Hub.Queue(["Typeset",MathJax.Hub])" command and I have a simple editor that adds latex commands to my html document and whenever I add something and click ok it runs that command and generate output like this. It works fine for the first time.
screen shot 2016-10-08 at 6 53 32 pm

But whenever I add another item and it runs typeset command and it generate the output again from <script type="math/tex" ></script> on existing elements like so.

screen shot 2016-10-08 at 6 53 44 pm

How can I avoid either generating that script tag or avoid parsing it when the typeset runs. Adding tex2jax_ignore class on it doesn't work as well.

Thanks in advance 馃槉

Question

All 4 comments

There's not much to say without a live sample page, I'm afraid.

Most likely, you are modifying the DOM in a way that makes MathJax think the equation has not yet been typeset.

You might want to check out http://docs.mathjax.org/en/latest/advanced/typeset.html and the example at http://cdn.mathjax.org/mathjax/latest/test/sample-dynamic-2.html.

@pkra Oh yeah I figured it out, I was copying the whole html content instead of just copying the latex that why it was recompiling everything that was in that <script>.

Thanks for the follow-up, @abhikhatri. Glad to hear you could resolve the issue.

Yeah finally resolved it 馃榿

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mt4c picture mt4c  路  3Comments

lk-geimfari picture lk-geimfari  路  5Comments

josephernest picture josephernest  路  7Comments

albertodiazdorado picture albertodiazdorado  路  6Comments

parhizkari picture parhizkari  路  5Comments