# mathjax-parser

> Find & Replace the mathjax delimiters in a HTML string

Latest version **4.0.7** (published 2017-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install mathjax-parser
pnpm add mathjax-parser
yarn add mathjax-parser
bun add mathjax-parser
```

## 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 | 4.0.7 |
| Published | 2017-03-01 |
| First published | 2017-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Daniel Niederberger |
| Maintainers | bersling |
| Keywords | Mathjax, mathjax-parser, html, find-replace |

## Links

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

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 4.0.7 (latest) — 2017-03-01
- 4.0.6 — 2017-03-01
- 4.0.5 — 2017-02-26
- 4.0.4 — 2017-02-25
- 4.0.3 — 2017-02-25
- 4.0.2 — 2017-02-25
- 4.0.1 — 2017-02-25
- 4.0.0 — 2017-02-25
- 3.0.4 — 2017-02-25
- 3.0.3 — 2017-02-25
- 3.0.2 — 2017-02-22
- 3.0.1 — 2017-02-22
- 3.0.0 — 2017-02-22
- 2.0.1 — 2017-02-14
- 2.0.0 — 2017-02-03
- … 2 more at https://npm.io/package/mathjax-parser/versions

## README

# mathjax-parser

[![Build Status](https://travis-ci.org/bersling/mathjax-parser.svg?branch=master)](https://travis-ci.org/bersling/mathjax-parser)

A simple mathjax parser in order to find and replace occurences of mathjax in a HTML String. No Jquery. Zero Regex. 0 Code Warnings. 10+ unit tests. 

## Installation
```
npm install --save mathjax-parser
```

## Running the parser
```
var parser = new MathjaxParser();
parser.parse(demoString).outputHtml;
```
See the demo.html or the [plunker](https://embed.plnkr.co/h84SUO5jzUayIIEYSfum/).

## Providing a configuration
Running the parser without a configuration is a bit pointless. Provide it with a config that looks like this:
```
var parser = new MathjaxParser();

var config = {
          inlineMath: [['$','$'],['\\(','\\)']],
          displayMath: [['$$','$$'],['\\[','\\]']],
          inlineMathReplacement: ['XXX', 'XXX'],
          displayMathReplacement: ['YYY','ZZZ']
        }

parser.parse(demoString, config).outputHtml;
```

## Thoughts behind the parser
A description of the building-and-thought-process of the parser can be found here: https://www.bersling.com/2017/01/22/mathjax-parser-for-html-strings/

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