Class: Latexmath::Equation
- Inherits:
-
Object
- Object
- Latexmath::Equation
- Defined in:
- lib/latexmath/equation.rb
Instance Method Summary collapse
-
#initialize(string) ⇒ Equation
constructor
A new instance of Equation.
- #to_mathml ⇒ Object
Constructor Details
#initialize(string) ⇒ Equation
Returns a new instance of Equation.
3 4 5 |
# File 'lib/latexmath/equation.rb', line 3 def initialize(string) @latex = string end |
Instance Method Details
#to_mathml ⇒ Object
7 8 9 10 11 |
# File 'lib/latexmath/equation.rb', line 7 def to_mathml tokens = Tokenizer.new(@latex).tokenize aggregate = Aggregator.new(tokens).aggregate Converter.new(aggregate).convert end |