包详细信息

@gerhobbelt/markdown-it-mathjax

GerHobbelt162MIT2.0.1-3

Markdown-it plugin to bypass LaTeX math for mathjax processing

自述文件

markdown-it-mathjax

Build Status NPM version Coverage Status

Markdown-it plugin to bypass LaTeX math for mathjax processing.

Processes TeX displayed math

$$1 *2* 3$$ => \[1 *2* 3\]

Processes TeX in-line math

$1 *2* 3$ => \(1 *2* 3\)

Skips in-line math if numbers are around (according to pandoc math)

$1 *2* 3$5 => $1 <em>2</em> 3$5

Also processes LaTeX delimiters (double backslashed)

\\(1 *2* 3\\) => \(1 *2* 3\)

\\[1 *2* 3\\] => \[1 *2* 3\]

And sections

\begin{abc}1 *2* 3\end{abc} => \begin{abc}1 *2* 3\end{abc}

Install

npm install @gerhobbelt/markdown-it-mathjax --save

Use

var md = require('@gerhobbelt/markdown-it')()
            .use(require('@gerhobbelt/markdown-it-mathjax')());

md.render('$1 *2* 3$') // => '<p>\(1 *2* 3\)</p>'

Differences in browser. If you load script directly into the page, without package system, module will add itself globally as window.markdownitMathjax.

License

MIT

更新日志

2017-11-04

  • bumped build revision and tweaked everything to work with the scoped package approach we'll be using from today.

2017-11-02

  • adjust TravisCI spec to test on all modern NodeJS versions
  • typo fixes
  • update NPM packages & correct license in the package.json spec

2016-12-29

  • change into a module
  • Adding a basic typescript typings file

2016-12-04

  • Wrapping options

2016-03-13

  • Removed unnecessary token level

2015-12-12

  • First release.