This commit is contained in:
counterweight 2026-05-14 10:56:04 +02:00
parent bc92231240
commit b8225c639e
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
11904 changed files with 1472749 additions and 133 deletions

View file

@ -0,0 +1,39 @@
MathJax = Object.assign(global.MathJax || {}, require("../legacy/MathJax.js").MathJax);
//
// Load component-based configuration, if any
//
if (MathJax.config && MathJax.config.asciimath) {
MathJax.Hub.Config({AsciiMath: MathJax.config.asciimath});
}
MathJax.Ajax.Preloading(
"[MathJax]/jax/input/AsciiMath/config.js",
"[MathJax]/jax/input/AsciiMath/jax.js",
"[MathJax]/jax/element/mml/jax.js"
);
require("../legacy/jax/element/mml/jax.js");
require("../legacy/jax/input/AsciiMath/config.js");
require("../legacy/jax/input/AsciiMath/jax.js");
require("../legacy/jax/element/MmlNode.js");
var MmlFactory = require("../../../../core/MmlTree/MmlFactory.js").MmlFactory;
var factory = new MmlFactory();
exports.LegacyAsciiMath = {
Compile: function (am,display) {
var script = {
type: "math/asciimath",
innerText: am,
MathJax: {}
};
var node = MathJax.InputJax.AsciiMath.Translate(script).root.toMmlNode(factory);
node.setInheritedAttributes({}, display, 0, false);
return node;
},
Translate: function (am,display) {
return this.Compile(am,display);
}
};