Created
July 2, 2015 20:27
-
-
Save pkra/0afe895183c32eb8477c to your computer and use it in GitHub Desktop.
MathJax Node mjsingle test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mjAPI = require("./lib/mj-single.js"); | |
mjAPI.start(); | |
var start = Date.now(); | |
for (var i = 0; i < 100; i++) { | |
var input = "\\sqrt{f: X \\to Y }" + i; | |
console.log("\\[" + input + "\\]"); | |
mjAPI.typeset({ | |
math: input, | |
format: "TeX", // "inline-TeX", "MathML" | |
svg: true | |
}, function(data) { | |
if (!data.errors) { | |
// console.log(data.svg); | |
console.log(Date.now() - start); | |
} | |
}); | |
} | |
console.log(Date.now() - start); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment