An AsciiMath parser and MathML generator written in pure Ruby.
Add this line to your application’s Gemfile:
gem 'asciimath'
And then execute:
$ bundle
Or install it yourself as:
$ gem install asciimath
First require the library.
require 'asciimath'
Then parse an AsciiMath string.
parsed_expression = AsciiMath.parse(asciimath)
The parsed expression is a set of nested Array and Hash objects.
This expression can then be converted to MathML.
math_ml = parsed_expression.to_mathml
The MathML code is returned as a String.
-
Create your feature branch (
git checkout -b my-new-feature
) -
Commit your changes (
git commit -am 'Add some feature'
) -
Push to the branch (
git push origin my-new-feature
) -
Create a new Pull Request