# markdown-it-mathjax

> [![Build Status](https://img.shields.io/travis/classeur/markdown-it-mathjax/master.svg?style=flat)](https://travis-ci.org/classeur/markdown-it-mathjax) [![NPM version](https://img.shields.io/npm/v/markdown-it-mathjax.svg?style=flat)](https://www.npmjs.org

Latest version **2.0.0** (published 2016-12-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install markdown-it-mathjax
pnpm add markdown-it-mathjax
yarn add markdown-it-mathjax
bun add markdown-it-mathjax
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-12-04 |
| First published | 2015-12-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 70 |
| Author | Benoit Schweblin |
| Maintainers | benweet |

## Links

- npm: https://www.npmjs.com/package/markdown-it-mathjax
- Repository: https://github.com/classeur/markdown-it-mathjax
- Homepage: https://github.com/classeur/markdown-it-mathjax#readme
- Issues: https://github.com/classeur/markdown-it-mathjax/issues
- npm.io page: https://npm.io/package/markdown-it-mathjax

## Recent versions

- 2.0.0 (latest) — 2016-12-04
- 1.0.3 — 2016-03-13
- 1.0.2 — 2015-12-12
- 1.0.1 — 2015-12-12
- 1.0.0 — 2015-12-12

## README

# markdown-it-mathjax

[![Build Status](https://img.shields.io/travis/classeur/markdown-it-mathjax/master.svg?style=flat)](https://travis-ci.org/classeur/markdown-it-mathjax)
[![NPM version](https://img.shields.io/npm/v/markdown-it-mathjax.svg?style=flat)](https://www.npmjs.org/package/markdown-it-mathjax)

> [Markdown-it](https://github.com/markdown-it/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](http://pandoc.org/README.html#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

```bash
npm install markdown-it-mathjax --save
```

## Use

```js
var md = require('markdown-it')()
            .use(require('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](https://github.com/classeur/markdown-it-mathjax/blob/master/LICENSE)

---
_Source: https://npm.io/package/markdown-it-mathjax · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
