class AsciiMath::Expression
Attributes
ast[RW]
Public Class Methods
new(asciimath, ast)
click to toggle source
# File lib/asciimath/parser.rb, line 764 def initialize(asciimath, ast) @asciimath = asciimath @ast = ast end
Public Instance Methods
to_html(prefix = "", inline = true, attrs = {})
click to toggle source
# File lib/asciimath/html.rb, line 246 def to_html(prefix = "", inline = true, attrs = {}) HTMLBuilder.new(:prefix => prefix, :inline => inline).append_expression(ast, attrs).to_s end
to_latex(symbol_table = nil)
click to toggle source
# File lib/asciimath/latex.rb, line 395 def to_latex(symbol_table = nil) LatexBuilder.new(symbol_table).append_expression(ast).to_s end
to_mathml(prefix = "", attrs = {})
click to toggle source
# File lib/asciimath/mathml.rb, line 253 def to_mathml(prefix = "", attrs = {}) if prefix.is_a? Hash attrs = prefix prefix = "" end MathMLBuilder.new(:prefix => prefix).append_expression(ast, attrs).to_s end
to_s()
click to toggle source
# File lib/asciimath/parser.rb, line 769 def to_s @asciimath end