19 "\\linear": "\\mathbb{L}" |
19 "\\linear": "\\mathbb{L}" |
20 } |
20 } |
21 }; |
21 }; |
22 |
22 |
23 // process.argv[0] seems to be the node executable itself |
23 // process.argv[0] seems to be the node executable itself |
24 if(process.argv.length<=2){ |
24 if(process.argv.length<=2 || process.argv.length>4){ |
25 console.error(`Usage: ${process.argv[1]} input_file`) |
25 console.error(`Usage: ${process.argv[1]} input_file [katex_options.json]`) |
26 process.exit(1); |
26 process.exit(1); |
|
27 } |
|
28 if(process.argv.length>2){ |
|
29 katexOptions = JSON.parse(fs.readFileSync(process.argv[3])); |
27 } |
30 } |
28 |
31 |
29 fs.readFile(process.argv[2], 'utf8', function (err, input) { |
32 fs.readFile(process.argv[2], 'utf8', function (err, input) { |
30 var output, md; |
33 var output, md; |
31 |
34 |