From 4229f2108449bd49ccbb4dd0f2b7a27a79e59d1f Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Sun, 15 Nov 2020 20:56:50 +0100 Subject: [PATCH] Include default MathJax packages * by default load all the default tex-chtml packages, which additionally include: * require: using \require{package-name} to load a package * autoload: using a command from a different package automatically loads it * configmacros: allows for definition of predefined macros --- qt/aqt/data/web/js/mathjax.js | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/qt/aqt/data/web/js/mathjax.js b/qt/aqt/data/web/js/mathjax.js index c97f7b8a1..6cae47bdb 100644 --- a/qt/aqt/data/web/js/mathjax.js +++ b/qt/aqt/data/web/js/mathjax.js @@ -3,17 +3,19 @@ window.MathJax = { displayMath: [["\\[", "\\]"]], processRefs: false, processEnvironments: false, - packages: [ - 'base', - 'ams', - 'noerrors', - 'noundefined', - 'mhchem', - 'require', - ] + packages: { + '[+]': [ + 'noerrors', + 'mhchem', + ], + } }, startup: { - typeset: false + typeset: false, + pageReady: () => { + console.log('page is ready'); + return MathJax.startup.defaultPageReady(); + }, }, options: { renderActions: { @@ -21,13 +23,12 @@ window.MathJax = { checkLoading: [] }, ignoreHtmlClass: 'tex2jax_ignore', - processHtmlClass: 'tex2jax_process' + processHtmlClass: 'tex2jax_process', }, loader: { load: [ '[tex]/noerrors', '[tex]/mhchem', - '[tex]/require', ] } };