Annotatorjs causes Mathjax to fail intermittently

65 views Asked by At

On a large page with many mathml tags, that also uses annotatorjs the math intermittently reverts to browser rendering, or renders with MathJax, but the context menu does not appear.

1

There are 1 answers

0
Neil Stevens On

Annotator js removes script tags from the document, to avoid them re-running when it wraps the content. Mathjax stores the original mathml tags code in a script tag with type="math/mathml".

Options include

  1. host annotator js yourself and modify the line this.element.find('script').remove(); to this.element.find('script[type!="math/mml"]').remove();
  2. ensure annotator runs completely before mathjax runs.