mathjax.js 794 B

1234567891011121314151617181920
  1. import { EnginePromise } from './engine.js';
  2. import * as EngineConst from '../common/engine_const.js';
  3. import * as System from './system.js';
  4. (function () {
  5. const SIGNAL = MathJax.Callback.Signal('Sre');
  6. MathJax.Extension.Sre = {
  7. version: System.version,
  8. signal: SIGNAL,
  9. ConfigSre: function () {
  10. EnginePromise.getall().then(() => MathJax.Callback.Queue(MathJax.Hub.Register.StartupHook('mml Jax Ready', {}), ['Post', MathJax.Hub.Startup.signal, 'Sre Ready']));
  11. }
  12. };
  13. System.setupEngine({
  14. mode: EngineConst.Mode.HTTP,
  15. json: MathJax.Ajax.config.path['SRE'] + '/mathmaps',
  16. xpath: MathJax.Ajax.config.path['SRE'] + '/wgxpath.install.js',
  17. semantics: true
  18. });
  19. MathJax.Extension.Sre.ConfigSre();
  20. })();