0.0
Low commit activity in last 3 years
No release in over a year
This is a Ruby gem for converting Office Math Markup (OMML) into MathML within Word HTML documents.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.14
~> 12.0
~> 3.6
~> 0.15
~> 0.9
~> 1.5.2
>= 0

Runtime

 Project Readme

DEPRECATION NOTICE: This repository is no longer maintained. Please visit Plurimath for the latest updates and features.

omml2mathml

Gem Version Build Status Code Climate Pull Requests Commits since latest

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 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 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

require "omml2mathml"

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

See Also