gulp-mathjaxify
v1.0.0
Published
A gulp wrapper for mathjax-node-page
Downloads
2
Maintainers
Readme
gulp-mathjaxify
A simple gulp
plugin to statically render your math expressions in larger documents using gulp. Specifically, a wrapper around mathjax-node-page
.
Installation
Install from the npm registry by entering the following command into the shell.
npm install gulp-mathjaxify
Usage
Import mathjaxify
from gulp-mathjaxify
and then call mathjaxify
in a gulp pipe with the appropriate mathjax-node-page
options.
// gulpfile.js
const { src, dest } = require("gulp");
const { mathjaxify } = require("gulp-mathjaxify");
// Use mathjax-node-page options
// Refer to https://www.npmjs.com/package/mathjax-node-page#usage
// Render equations as html
src("./src/*.html")
.pipe(mathjaxify({ output: "html" }))
.pipe(dest("./dist/"))
// Render equations as svg
// Interpret single-dollar expressions as inline expressions
src("./src/*.html")
.pipe(mathjaxify({ output: "svg", singleDollars: true }))
.pipe(dest("./dist/"))