markdown-it-asciimath
Markdown-it plugin to include ascii-math.
Code block
Example input:
```math 1+1=2 varphi = int_0^10 x^2 dx ```
Output: HTML, renders to:
Inline math
Example input:
Test `1+1=2` or ``2+2=4``. Optional: `math 3+3=6`.
Usage
markdown-it-asciimath converts ASCII-math to TeX and then uses KaTeX to render the math. The ASCII-math - TeX conversion is done using the ASCIIMathML Scripts. The following file needs to be included:
The plugin uses KaTeX to render TeX-math so the KaTeX stylesheet needs to be included:
To use the plugin:
var md = ; md;
LaTeX math code can be rendered, too. Just use the keyword latex
instead of math
.
Options
Options can be specified:
md;
Now only this option is available:
Name | Description | Default |
---|---|---|
"useKeyword" | Use the keywords math and latex to specify inline math syntax |
false |