0.0
No commit activity in last 3 years
No release in over 3 years
Convert math markup between LaTeX, MathML, and OMML using Ruby. A wrapper for TeXMath, a Haskell library written by the creator of Pandoc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

texmath-ruby

Build Status Gem Version Gem Downloads

A Ruby wrapper for TeXMath, the Haskell library for converting between LaTeX, presentation MathML, and OMML (Office Math Markup Language).

Example

require 'texmath'

TeXMath.convert('a^2 + b^2 = c^2', :from => :tex, :to => :mathml)
  # => '<math display="block" xmlns=...'

See the source for a list of the supported math markup formats.

Installation

Installing the Haskell library

On OS X, you can install texmath with Homebrew:

$ brew update
$ brew install texmath

On Linux, you'll need to install the The Haskell Platform and install texmath with Cabal:

$ cabal update
$ cabal install texmath -fexecutable

Finally, don't forget to add $HOME/.cabal/bin to your $PATH.

Installing the Ruby wrapper

If you use Bundler, add this line to your application's Gemfile:

gem 'texmath-ruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install texmath-ruby