mdmath2html
v0.3.1
Published
Convert markdown files with math annotations to html files.
Maintainers
Readme
Markdown Math to HTML file.
Convert Markdown files with math annotations to HTML files.
Global installation
npm install -g mdmath2html
mdtohtml file.mdOptions:
Usage mdtohtml [options] <file ...>
-t, --titleTitle of HTML file. default: Markdown file name.-o, --outDirDirectory where to save the files. default: Same director of the markdown file.-f, --forceIgnore file format.-l, --levelLevel for table of contents.-s, --silenceDoes not display info in console.--offLineCSS/JS files linked to local user, by default using CDN.
Installation for your project.
npm install mdmath2html --savevar fs = require("fs");
var mdmath2html = require("mdmath2html");
var mdFile = fs.readFileSync("./latex.md");
var htmlFile = mdmath2html.render(
mdFile.toString(), // markdown
"Markdown to Html.", // title
{ offLine: true } // options
);
fs.writeFile("mk2html.html", htmlFile, "utf8", function(err) {
if (err) throw err;
console.log("The file has been saved!");
});