mammoth-math

0.0.2 • Public • Published

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)

Package Sidebar

Install

npm i mammoth-math

Weekly Downloads

1

Version

0.0.2

License

BSD-2-Clause

Unpacked Size

930 kB

Total Files

110

Last publish

Collaborators

  • huwngnosleep