Skip to content

[combined configurations] Add the Menu extension from the MathJax Accessibility tools #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pkra opened this issue Aug 25, 2016 · 7 comments

Comments

@pkra
Copy link

pkra commented Aug 25, 2016

I.e. load https://github.com/mathjax/MathJax-a11y/blob/master/extensions/accessibility-menu.js from the third party extension repository.

@dpvc
Copy link
Member

dpvc commented Aug 28, 2016

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?

@dpvc
Copy link
Member

dpvc commented Aug 30, 2016

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?

@dpvc
Copy link
Member

dpvc commented Aug 30, 2016

Maybe &contrib=ignore would be better?

@pkra
Copy link
Author

pkra commented Aug 31, 2016

That sounds great! I'd pick ignore but both are fine, I think.

@dpvc
Copy link
Member

dpvc commented Aug 31, 2016

Even better, how about just &noContrib? So that it is

<script src="/mathjax/MathJax.js?config=TeX-AMS_CHTML&noContrib"></script>

@dpvc
Copy link
Member

dpvc commented Aug 31, 2016

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.

@pkra
Copy link
Author

pkra commented Aug 31, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants