# markdown-it-latex

> Plugin for markdown-it, supports KaTex and AsciiMath.

Latest version **0.2.0** (published 2017-12-18) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-12-18 |
| First published | 2017-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Tyler Long |
| Maintainers | tylerlong |

## Links

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

## Dependencies (2)

- [katex](https://npm.io/package/katex.md) ^0.9.0-alpha2
- [asciimath-to-latex](https://npm.io/package/asciimath-to-latex.md) ^0.3.2

## Recent versions

- 0.2.0 (latest) — 2017-12-18
- 0.1.3 — 2017-04-07
- 0.1.2 — 2017-04-04
- 0.1.1 — 2017-04-04
- 0.1.0 — 2017-03-26

## README

# markdown-it-latex

Plugin for markdown-it, supports KaTex and AsciiMath.


## Installation

```
yarn install markdown-it-latex
```


## Usage

### for node.js

```js
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
\`\`\``)
```

### for browser

You also need to import the css:

```js
import 'markdown-it-latex/dist/index.css'
```

Or you can add the css to the web page directly.


## Development

### Build

```
yarn build:watch
```

### Test

```
yarn test
```

### Distribution

```
yarn release && npm publish
```


## Todo

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