10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-23 03:07:44 +02:00

Downgrade to MathJax 2.7 to fix the \ce problem and add MathJaxPolyfill.js to add the typesetPromise() function that is missing in the V2 API

This commit is contained in:
Mickaël Véril 2020-04-28 17:27:22 +02:00
parent b2890c266e
commit 75c849cf98
2 changed files with 20 additions and 2 deletions

View File

@ -2,9 +2,19 @@
<link rel="stylesheet" href="https://unpkg.com/tippy.js@5/dist/backdrop.css" />
<link rel="stylesheet" href="https://unpkg.com/tippy.js@5/themes/light.css" />
<script src="https://unpkg.com/tippy.js@5"></script>
<script type="text/x-mathjax-config">
MathJax.Ajax.config.path["mhchem"] =
"https://cdnjs.cloudflare.com/ajax/libs/mathjax-mhchem/3.3.2";
MathJax.Hub.Config({
TeX: {
extensions: ["[mhchem]/mhchem.js"]
}
});
</script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script src="/js/MathJaxUtils.js"></script>
<script type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js">
<script src="/js/MathJaxPolyfill.js"></script>
<script type="text/javascript" async
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML" onload="MathJaxPolyfillInit()">
</script>
<script src="https://cdn.rawgit.com/larsgw/citation.js/archive/citation.js/citation-0.4.0-9.js" type="text/javascript"></script>

View File

@ -0,0 +1,8 @@
function MathJaxPolyfillInit(){
var typesetPromise = function() {
return new Promise(function (resolve, reject) {
MathJax.Hub.Queue(["Typeset",MathJax.Hub],[resolve]);
})
}
MathJax.typesetPromise=typesetPromise
}