Socket
Book a DemoInstallSign in
Socket

omml2mathml

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omml2mathml

0.0.12
bundlerRubygems
Version published
Maintainers
1
Created
Source

= omml2mathml

image:https://img.shields.io/gem/v/omml2mathml.svg["Gem Version", link="https://rubygems.org/gems/omml2mathml"] image:https://github.com/plurimath/omml2mathml/workflows/rake/badge.svg["Build Status", link="https://github.com/plurimath/omml2mathml/actions?query=workflow%3Arake"] image:https://codeclimate.com/github/plurimath/omml2mathml/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/plurimath/omml2mathml"] image:https://img.shields.io/github/issues-pr-raw/plurimath/omml2mathml.svg["Pull Requests", link="https://github.com/plurimath/omml2mathml/pulls"] image:https://img.shields.io/github/commits-since/plurimath/omml2mathml/latest.svg["Commits since latest",link="https://github.com/plurimath/omml2mathml/releases"]

Convert Office Math Markup to MathML

This is a Ruby gem for converting Office Math Markup (OMML) into MathML within Word HTML documents.

The smarts of this gem comes from different sources:

  • Most of the conversion of the OMML conversion is done by the omml2mml.xsl stylesheet. This is a prerelease version of the omml2mathml.xsl that currently ships with Microsoft Word, and which is how Word allows you to copy-paste MathML out of Word. The omml2mml.xsl version of the stylesheet has been published for several years now as part of the https://github.com/TEIC/Stylesheets[TEI stylesheet set]. (We have made some minor edits to the stylesheet, downgrading it from XSLT v2 to v1.) The stylesheets have been published under a dual Creative Commons Sharealike/BSD licence.

  • The omml2mml.xsl stylesheet does most of the conversion; the remainder is done by the xhtml-mathml.xsl stylesheet, created by David Carlisle in 2007 (and https://github.com/davidcarlisle/web-xslt/tree/master/omml2mml[available on Github]). We have done some minor edits to this stylesheet too, downgrading it from XSLT v2 to v1 and removing some functionality in the process; the MathML itself is unaffected.

The gem also converts any file it processes from HTML to XHTML, so that the stylesheets can deal with it. In the process, it needs to restore the casing of OOXML tags, which are case-sensitive.

== Usage

[source,ruby]

require "omml2mathml"

html = Ooml2Mathml.convert("Word.html")

== See Also

FAQs

Package last updated on 11 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.