A tool to build MathJax bundles.
This project assumes you have NodeJS 6+ installed.
- Install dependencies
npm install
- Use
This library exports a single method build
which takes several options and returns a string (the JS string of the build); it can write that string to disk.
const build = require('main.js').build;
build(
fontname, // TeX, STIX-Web, Asana-Math, Neo-Euler, Gyre-Pagella, Gyre-Termes, cf. http://docs.mathjax.org/en/latest/font-support.html Latin-Modern
input, // MathML, TeX, AsciiMath
output, // SVG, CommonHTML, (TODO: HTML-CSS)
{ // options
toFile: true, // write to file
compress: true, // uglify output
customExtensions: [], // array of extension filenames; if empty, default extensions of the input are used
folder: '' // folder name to write file output to; relative to `dist` defaults to `options.input+options.output+options.fontname`, e.g., `dist/MathMLSVGTeX`
});
- Build pre-configured bundles
npm run build
See build.js
for details for those builds.
- View test pages in your browser
npm start