class BinOpe

Attributes

args[R]
oper[R]

Public Class Methods

new(some_oper, *some_args) click to toggle source
# File lib/annlat/LaRuby.rb, line 122
def initialize(some_oper, *some_args)
  @oper = some_oper.to_ltx
  some_args.map!(&:to_ltx)
  first = some_args[0]
  rest = some_args[1..-1].map {|a| (a.kind_of?(BinOpe) and a.args[0].kind_of?(Negative)) ? a.wrap : a }
  @args = [first] + rest
end

Public Instance Methods

latex() click to toggle source
# File lib/annlat/LaRuby.rb, line 130
def latex
  @args.map{|a| a.latex}.join(@oper.latex)
end