Class: Frac

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_numer, some_denom) ⇒ Frac

Returns a new instance of Frac.



165
166
167
168
# File 'lib/annlat/LaRuby.rb', line 165

def initialize(some_numer, some_denom)
  @numer = some_numer.to_ltx
  @denom = some_denom.to_ltx
end

Instance Method Details

#latexObject



170
171
172
# File 'lib/annlat/LaRuby.rb', line 170

def latex
  '\frac{' + @numer.latex + '}{' + @denom.latex + '}'
end