Hello,
We have math that contains the \cancel and \enclose macros (not necessarily together). In our MathJax config file we specify the 'autoload' extension to be loaded explicitly which should then load the 'cancel' and 'enclose' extensions when \cancel and \enclose are first used:
MathJax = {
tex: {
packages: ['base', 'ams', 'autoload'],
autoload: {
color: [],
colorv2: ['color']
}
},
loader: {
load: ['input/asciimath', 'output/chtml', '[tex]/autoload'
},
...
}
The problem is that math containing \cancel and/or \enclose is sometimes rendered correctly and sometimes we see 'Invalid control sequence \cancel / \enclose'. When we get the yellow error, I can confirm that the 'cancel' and/or 'enclose' extension has been loaded (there is a 'input/tex/extensions/cancel.js' file under Network tab of Chrome's Dev Tools) and it appears at the end of list (as expected - loaded on first use).
If I change the above config to explicitly load the 'cancel' and 'enclose' extensions, the yellow error goes away and everything works fine. In this case the extensions are loaded much earlier (also expected).
Any ideas what might be causing this? I don't want to explicitly load those two extensions, because this defeats the autoload concept. And it is a partial solution for these two macros only. Could there be a bug or timing issue in MathJax related to autoloaded extensions? I don't rule out something on our side because as I said it sometimes works, but at the same time it doesn't make the sense to me to have the same configuration and have MathJax sometimes recognize those macros and sometimes not.
We are using version 3.1.2 but I've tried 3.2.0 too and got the same results.
Let me know if you need more info.
Thanks!