blob: 24a91d124addec789f5e19b54a8eb1c5c41f860e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/usr/bin/env node
var katex = require("./katex.min.js");
var input = "";
var args = process.argv.slice(2);
process.stdin.on("data", function(chunk) {
input += chunk.toString();
});
process.stdin.on("end", function() {
var options = { displayMode: args.indexOf("--display-mode") !== -1 };
var output = katex.renderToString(input, options);
console.log(output);
});
|