Move from mathjax to katex
This commit is contained in:
parent
b2c9be7bda
commit
08d2437d49
35 changed files with 64 additions and 214 deletions
|
@ -30,31 +30,7 @@ $(function () {
|
|||
$(this).attr("src", $(this).attr("data-src"));
|
||||
})
|
||||
$preview.addClass('dmmd-preview-has-content').removeClass('dmmd-preview-stale');
|
||||
|
||||
var $jax = $content.find('.require-mathjax-support');
|
||||
if ($jax.length) {
|
||||
if (!('MathJax' in window)) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: $jax.attr('data-config'),
|
||||
dataType: 'script',
|
||||
cache: true,
|
||||
success: function () {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js',
|
||||
dataType: 'script',
|
||||
cache: true,
|
||||
success: function () {
|
||||
MathJax.typeset();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
MathJax.typeset($content[0]);
|
||||
}
|
||||
}
|
||||
renderKatex($content[0]);
|
||||
});
|
||||
} else {
|
||||
$content.empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue