Class: Latexmath::Equation

Inherits:
Object
  • Object
show all
Defined in:
lib/latexmath/equation.rb

Instance Method Summary collapse

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_mathmlObject



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