# react-markdown-math

> A react wrapper library for React Markdown so that you can render complex math equations in no time

Latest version **1.0.2** (published 2022-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-markdown-math
pnpm add react-markdown-math
yarn add react-markdown-math
bun add react-markdown-math
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-07-09 |
| First published | 2022-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 12.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | aivinthomas |
| Maintainers | aivinthomas |
| Keywords | react-markdown, react-mathjax, react-math |

## Links

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

## Dependencies (3)

- [remark-math](https://npm.io/package/remark-math.md) ^5.1.1
- [react-markdown](https://npm.io/package/react-markdown.md) ^8.0.3
- [better-react-mathjax](https://npm.io/package/better-react-mathjax.md) ^2.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

- 1.0.2 (latest) — 2022-07-09
- 1.0.1 — 2022-07-03
- 1.0.0 — 2022-07-02

## README

# react-markdown-math

A react wrapper library for React Markdown so that you can render complex math equations in no time.

## Contents

*   [What is this?](#what-is-this)
*   [When should I use this?](#when-should-i-use-this)
*   [Install](#install)
*   [Usage](#use)
*   [API](#api)
    *   [`markdown`](#markdown)
    *   [`reactMarkdownProps`](#reactMarkdownProps)
*   [Contribute](#contribute)
*   [License](#license)
*   [Related](#related)

## What is this?

This package is a [React][] component that can be given a string of markdown with math (in Latex format)
that it’ll safely render to React elements.
You can pass plugins to change how markdown is transformed to React elements and
pass components that will be used instead of normal HTML elements.

*   to learn markdown, see this [cheatsheet and tutorial][cheat]
*   to learn math using Latex, see [this][latex]
## When should I use this?

You might need to render complex mathematical equations written in Markdown for your React application. This library uses [React Markdown][react-markdown] and [Better React Mathjax][better-react-mathjax] under the hood. You can use this for a quick implementation.

## Install

```sh
npm install react-markdown-math
```
## Usage

```sh
<ReactMarkdownMath markdown='\\(\\frac{10}{4x} \\approx 2^{12}\\)' />
```

## API

The default export is `ReactMarkdownMath`.

### `markdown`

The markdown string
### `reactMarkdownProps`

This optional prop is for additional configuration of React Markdown. Find the details [here][react-markdown-props]

## Contribute

If you find any issues or scope for improvement, please feel free to raise a pull request. If you feel like you don't have the bandwidth to get your hands dirty, please do create a [new][create-issue] issue while ensuring its not a duplicate.

## License

[MIT][license]

## Related

* [React Markdown][react-markdown]
* [Better React MathJax][better-react-mathjax]

[latex]: https://www1.cmc.edu/pages/faculty/aaksoy/latex/latexthree.html

[react]: http://reactjs.org

[license]: license

[cheat]: https://commonmark.org/help/

[unified]: https://github.com/unifiedjs/unified

[rehype]: https://github.com/rehypejs/rehype

[react-remark]: https://github.com/remarkjs/react-remark

[react-markdown]: https://github.com/remarkjs/react-markdown

[react-markdown-props]: https://github.com/remarkjs/react-markdown#props

[better-react-mathjax]: https://github.com/fast-reflexes/better-react-mathjax

[create-issue]: https://github.com/aivinthomas/react-markdown-math/issues/new/choose

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