Closed pkra closed 3 years ago
I was looking into this, and I thought of something that might be a problem. When we do this, that will mean that the combined configurations can't be used as stand-alone configurations (for off-line work), as they will all call on the CDN for [Contrib]
. I don't see an easy way out of this, other than to provide either a convenient method of removing the extension during the configuration process (there isn't one now), or another configuration parameter that would ignore [Contrib]
extensions (e.g., something that indicates off-line work). Otherwise, for stand-alone situations, y9ou would have to use a custom configuration.
@pkra, @zorkow, any comments or suggestions?
The solution that I have worked out is to use another option on the script call that loads MathJax.js to control this. E.g.
<script src="/mathjax/MathJax.js?config=TeX-AMS_CHTML&contrib=false"></script>
So that &contrib=false
would (silently) prevent any files from being loaded from [Contrib]
. This would mean the combined configuration files could be loaded locally without calling on the CDN for the extra menu without error messages or delays, but at the loss of the accessibility menus.
How does that sound?
Maybe &contrib=ignore
would be better?
That sounds great! I'd pick ignore
but both are fine, I think.
Even better, how about just &noContrib
? So that it is
<script src="/mathjax/MathJax.js?config=TeX-AMS_CHTML&noContrib"></script>
There are already several other parameters that I don't think are documented anywhere. The config
parameter is certainly documented, but there is also locale=...
(e.g., locale=fr
), delayStartupUntil=...
(which can be set to none
, onload
or configured
), noDOMContentEvent
(which is obsolete now, but was a way around using the DOMContentLoaded event to start MathJax's processing phase, when that was less well supported), and NoMathPlayer
(which prevented MathJax from trying to use MathPlayer even if it was available). And now noContrib
.
Even better, how about just &noContrib?
Sound good.
There are already several other parameters that I don't think are documented anywhere.
I'll make an issue
I.e. load https://github.com/mathjax/MathJax-a11y/blob/master/extensions/accessibility-menu.js from the third party extension repository.