@qtikit/mathml-to-latex
TypeScript icon, indicating that this package has built-in type declarations

1.3.7 • Public • Published

mathml-to-latex

It converts MathML to LaTeX.

Instalation

If you use NPM

npm install mathml-to-latex --save

If you use Yarn

yarn add mathml-to-latex

Usage

const Mathml2latex = require('mathml-to-latex');

const mathml = `
      <math>
        <mrow>
          <mn>a</mn>
          <mo>+</mo>
          <mn>b</mn>
        </mrow>
      </math>
      `;

Mathml2latex.convert(mathml);
// => a + b
const Mathml2latex = require('mathml-to-latex');

const mathml = `
    <math>
        <mrow>
            <mi>A</mi>
            <mo>=</mo>
            <mfenced open = "[" close="]">
            <mtable>
                <mtr>
                <mtd><mi>x</mi></mtd>
                <mtd><mi>y</mi></mtd>
                </mtr>
                <mtr>
                <mtd><mi>z</mi></mtd>
                <mtd><mi>w</mi></mtd>
                </mtr>
            </mtable>
            </mfenced>
        </mrow>
    </math>
    `;

Mathml2latex.convert(mathml);
// => A = \begin{bmatrix} x & y \\ z & w \end{bmatrix}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.71latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.71
1.3.60
1.3.50
1.3.40
1.3.30
1.3.20
1.3.10
1.3.00

Package Sidebar

Install

npm i @qtikit/mathml-to-latex

Weekly Downloads

0

Version

1.3.7

License

MIT

Unpacked Size

137 kB

Total Files

113

Last publish

Collaborators

  • ragingwind
  • disjukr