Gem Version Build Status Code Climate Pull Requests Commits since latest

Purpose

Ruby gem to translate LaTeX math into MathML. The MathML is supposed to be compliant with output of LaTeXML.

It also works in reverse by translating MathML into LaTeX code.

The LaTeX math syntax supports amsmath, array, split and pmatrix packages.

Note
Bolding, symbols like \backepsilon, equation alignment, are all supported.

Usage

require "latexmath"

latex = "$$f_i =  \sum_{j=1}^2 s_{ij} n_j \quad {\rm for} \quad i = 1,2$$"
mathml = Latexmath.parse(latex).to_mathml