A JavaScript tool to convert mathml string to LaTeX string. This is a forked repo.
npm install @pie-framework/mathml-to-latexIf you use NPM
```
npm install mathml-to-latex --save
If you use Yarn
``
yarn add mathml-to-latex
`javascript
import { Mathml2latex } from 'mathml-to-latex';
// const { Mathml2latex } = require('mathml-to-latex');
const mathml =
;
Mathml2latex.convert(mathml);
// => a + b
`
`javascript
import { Mathml2latex } from 'mathml-to-latex';
// const { Mathml2latex } = require('mathml-to-latex');
const mathml =
;
Mathml2latex.convert(mathml);
// => A = \begin{bmatrix} x & y \\ z & w \end{bmatrix}
`
Package is also available directly in the browser through CDN:
`html
MathML to LaTeX Converter
id="convertButton"
class="mt-4 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 focus:outline-none"
>
Convert to LaTeX
``
Will output: