Ok, I just found my problem. MathJax stores a JavaScript object in every script[type="math/tex"]
element in the DOM. This object, actually stored in element.MathJax
, contains :
checked: 1
elementJax: Object
preview: span.MathJax_Preview
startNumber: 0
state: 2
where state
is the state of the preview (2 means PROCESSED). So the TypeSet does not render the preview again if it has already been rendered, unless you rewrite the script tag in the DOM (that's what I was doing), this case you lose the MathJax object and the state of the preview. That's why MathJax was keeping re-rendering all my scripts.