add initial marp implementation with sample content and build configuration
This commit is contained in:
1 parent
dcacc9b409
commit
e5f219507f
10319 files changed
+1402023
No files matched your search
+1
@@ -0,0 +1 @@
|
||||
export var LegacyAsciiMath: any;
|
||||
+39
@@ -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);
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user