# mammoth-math

> Convert Word documents from docx to simple HTML and Markdown

Latest version **0.0.2** (published 2022-05-24) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install mammoth-math
pnpm add mammoth-math
yarn add mammoth-math
bun add mammoth-math
```

Provides the command `mammoth`.

## 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.0.2 |
| Published | 2022-05-24 |
| First published | 2022-04-29 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 908 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michael Williamson |
| Maintainers | huwngnosleep |
| Keywords | docx, html, office, word, markdown, md, mathml, math |

## Links

- npm: https://www.npmjs.com/package/mammoth-math
- Repository: https://github.com/huwngnosleep/mammoth-math
- Homepage: https://github.com/huwngnosleep/mammoth-math#readme
- Issues: https://github.com/huwngnosleep/mammoth-math/issues
- npm.io page: https://npm.io/package/mammoth-math

## Dependencies (9)

- [lop](https://npm.io/package/lop.md) ^0.4.1
- [sax](https://npm.io/package/sax.md) ~1.1.1
- [jszip](https://npm.io/package/jszip.md) ^3.7.1
- [argparse](https://npm.io/package/argparse.md) ~1.0.3
- [bluebird](https://npm.io/package/bluebird.md) ~3.4.0
- [underscore](https://npm.io/package/underscore.md) ^1.13.1
- [xmlbuilder](https://npm.io/package/xmlbuilder.md) ^10.0.0
- [path-is-absolute](https://npm.io/package/path-is-absolute.md) ^1.0.0
- [dingbat-to-unicode](https://npm.io/package/dingbat-to-unicode.md) ^1.0.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.0.2 (latest) — 2022-05-24
- 0.0.1 — 2022-04-29

## README

This is an extended version of npm package "mammoth". I added an indicator for **OMML** element read called ```</thisismath>```. This indicator can be filled by others external math reader. Such as I am using "word-math" for my projects.

# Usage

```
const mammoth = require('mammoth-math')
const word = require('word-math');

let data = await mammoth.convertToHtml({ path: docxFile.path })

const mathData = word.readFile(docxFile.path).maths
for (const mathElement of mathData) {
  data.value = data.value.replace(/&lt;\/thisismath&gt;/, mathElement)
}

console.log(data.value)
```

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