![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | dist/ | 2 years ago | - | |
![]() | node_modules/ | 2 years ago | - | |
![]() | src/ | 2 years ago | - | |
![]() | test/ | 2 years ago | - | |
![]() | README.md | 2 years ago | 804 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 2.2K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | webpack.config.babel.js | 2 years ago | 908 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | yarn.lock | 2 years ago | 141K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
Plugin for markdown-it, supports KaTex and AsciiMath.
yarn install markdown-it-latex
import markdownIt from 'markdown-it'
import markdownItLatex from 'markdown-it-latex'
const mdi = markdownIt()
mdi.use(markdownItLatex)
mdi.render('`$E = mc^2$`')
mdi.render('`@(1/2[1-(1/2)^n])/(1-(1/2))=s_n@`')
mdi.render(`\`\`\`math
\oint_C x^3\, dx + 4y^2\, dy
\`\`\``)
mdi.render(`\`\`\`AsciiMath
oint_Cx^3 dx+4y^2 dy
\`\`\``)
You also need to import the css:
import 'markdown-it-latex/dist/index.css'
Or you can add the css to the web page directly.
yarn build:watch
yarn test
yarn release && npm publish