From 75c849cf984a1064a62585877afbbdb4e9581717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Tue, 28 Apr 2020 17:27:22 +0200 Subject: [PATCH] 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 --- layouts/partials/head_custom.html | 14 ++++++++++++-- static/js/MathJaxPolyfill.js | 8 ++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 static/js/MathJaxPolyfill.js diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html index 1ffe2c29..6510406f 100644 --- a/layouts/partials/head_custom.html +++ b/layouts/partials/head_custom.html @@ -2,9 +2,19 @@ + - + \ No newline at end of file diff --git a/static/js/MathJaxPolyfill.js b/static/js/MathJaxPolyfill.js new file mode 100644 index 00000000..6c09d8ce --- /dev/null +++ b/static/js/MathJaxPolyfill.js @@ -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 +} \ No newline at end of file