Skip to content

Commit

Permalink
Add MathJax3 Compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Daltz333 committed Apr 14, 2021
1 parent 14c8da2 commit aba61eb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions hoverxref/_static/js/hoverxref.js_t
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ function reRenderTooltip (instance, helper) {


function reLoadMathJax(elementId) {
console.debug('Triggering MathJax.Hub.Typeset()');
MathJax.Hub.Queue((["Typeset", MathJax.Hub, elementId]));
console.debug('Typesetting new node');

if (parseInt(MathJax.version[0]) >= 3) {}
MathJax.typesetPromise([elementId]).then(() => {
// the new content is has been typeset
});
} else {
MathJax.Hub.Queue((["Typeset", MathJax.Hub, elementId]));
}
}


Expand Down

0 comments on commit aba61eb

Please sign in to comment.