https://github.com/diversen/markdown-it-embed-mathjax
Markdown-it with support for CSS classes, mathjax, and html5 video embed.
https://github.com/diversen/markdown-it-embed-mathjax
Last synced: over 1 year ago
JSON representation
Markdown-it with support for CSS classes, mathjax, and html5 video embed.
- Host: GitHub
- URL: https://github.com/diversen/markdown-it-embed-mathjax
- Owner: diversen
- Created: 2016-05-30T17:36:59.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-28T10:37:21.000Z (over 9 years ago)
- Last Synced: 2025-03-21T05:04:01.044Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 87.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# markdown-it-embed-mathjax
Markdown-it with mathjax, and html5 video embed
[Video embed](https://www.npmjs.com/package/markdown-it-html5-embed)
[Mathjax](https://www.npmjs.com/package/markdown-it-mathjax)
[Decorate](https://github.com/rstacruz/markdown-it-decorate)
# Install:
// Install and save
npm install markdown-it-embed-mathjax --save
# Usage as lib:
// include the lib.
md = require('markdown-it-embed-mathjax');
// Change markdown-it default options as you like, e.g.:
md.options.html = true;
// Render a string
var str = "
test
# her er en test  $1 *2* 3$";
str+="\n\nPara with a CSS class{my-class}";
console.log(md.render(str));
# Usage as CLI command
npm install -g markdown-it-embed-mathjax
Translate a string to a markdown-it rendered string (with option for CSS classes, mp4 embedding and mathjax):
Reads from stdin or file(s), and outputs to stdout.
Example with stdin from a shell:
echo "A test with a auto link: http://github.com/diversen" | markdown-it-embed-mathjax --linkify
Example with file(s):
markdown-it-embed-mathjax README.md --linkify --html --breaks
Options are the same as markdown-it options:
opts.boolean = ['help', 'html', 'xhtmlOut', 'breaks', 'linkify', 'typographer','decorate', 'embed', 'mathjax'];
opts.string = ['langPrefix', 'quotes'];
Video (like images):

Mathjax:
$1 *2* 3$
@ MIT