Coder Social home page Coder Social logo

mathml2omml's Introduction

mathml2omml

Convert MathML to the OOML format used in DOCX files without XSLT.

You can use it like this:

import {mml2omml} from "mathml2omml"

const mml = '<math xmlns="http://www.w3.org/1998/Math/MathML">
  <semantics>
    <mrow>
      <mn>2</mn>
      <mo>+</mo>
      <mn>2</mn>
      <mo>=</mo>
      <mn>4</mn>
    </mrow>
  </semantics>
</math>'

const omml = mml2omml(mml)

console.log(omml)

> <m:oMath xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math">
>    <m:r>
>        <m:t xml:space="preserve">2+2=4</m:t>
>    </m:r>
> </m:oMath>

License

LGPL v.3.0 or later.

The xml parser/stringifier in the parse-stringify-folder is based upon html-parse-stringify (MIT).

License of test files depends on source of files.

Some test fixtures fall under other licenses/copyrights. See the LICENSE and copyright.txt files in the different test fixture folders.

Remaining test fixtures fall under the same license and copyright as the source code.

mathml2omml's People

Contributors

johanneswilm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

luyentm seewo-doc

mathml2omml's Issues

Types definition for intellisense and/or typescript

Hi there,

Very nice job on that converter.

Would it be possible to have the public api being typed, or using jsDoc, or using typescript or using a type declaration file. This helps making your lib easy to use and integrate in other projects. I'm sure it will meet a wide success, so it's probably worth the trouble.

If you're not used to those techs, I can help you, but I need you to give me the types of the methods exposed in your index.js.

Thanks a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.