Class: Expon

Inherits:
Latex show all
Defined in:
lib/annlat/LaRuby.rb

Instance Method Summary collapse

Methods inherited from Latex

#*, #**, #+, #-, #-@, #/, #glue, #is, #my_json, #ne, #of, #to_ltx, #wrap

Constructor Details

#initialize(some_base, some_exp) ⇒ Expon

Returns a new instance of Expon.



176
177
178
179
# File 'lib/annlat/LaRuby.rb', line 176

def initialize(some_base, some_exp)
  @base = some_base.to_ltx
  @exp = some_exp.to_ltx
end

Instance Method Details

#latexObject



181
182
183
184
# File 'lib/annlat/LaRuby.rb', line 181

def latex
  the_base = @base.wrap if (@base.kind_of?(Expon) or @base.kind_of?(Negative) or @base.kind_of?(BinOpe))
  the_base.latex + '^{' + @exp.latex +  '}'
end