From 8223f1abb07fd5c26c1361b42e9c7527fd718fa5 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 27 May 2018 21:34:37 +0200 Subject: Add Nix derivation, dependencies --- utility/katex/wrapper | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 utility/katex/wrapper (limited to 'utility/katex/wrapper') diff --git a/utility/katex/wrapper b/utility/katex/wrapper new file mode 100755 index 0000000..24a91d1 --- /dev/null +++ b/utility/katex/wrapper @@ -0,0 +1,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); +}); -- cgit v1.2.3