Upgrade to MathJax 3
This commit is contained in:
parent
6bd15ded9c
commit
710fae5fe3
6 changed files with 31 additions and 37 deletions
|
@ -36,23 +36,17 @@ $(function () {
|
|||
success: function () {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML',
|
||||
url: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js',
|
||||
dataType: 'script',
|
||||
cache: true,
|
||||
success: function () {
|
||||
MathJax.Hub.Queue(function () {
|
||||
$content.find('.tex-image').hide();
|
||||
$content.find('.tex-text').show();
|
||||
});
|
||||
MathJax.typeset();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MathJax.Hub.Queue(['Typeset', MathJax.Hub, $content[0]], function () {
|
||||
$content.find('.tex-image').hide();
|
||||
$content.find('.tex-text').show();
|
||||
});
|
||||
MathJax.typeset($content[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue