Class: Latex

Inherits:
Object
  • Object
show all
Defined in:
lib/annlat/AnnLat.rb,
lib/annlat/LaRuby.rb

Direct Known Subclasses

Atom, BinOpe, Expon, Frac, Func, LatexConsec, Negative, Sum, Wrapped

Instance Method Summary collapse

Instance Method Details

#*(y) ⇒ Object



40
41
42
# File 'lib/annlat/LaRuby.rb', line 40

def *(y)
  Product.new(self, y)
end

#**(y) ⇒ Object



48
49
50
# File 'lib/annlat/LaRuby.rb', line 48

def **(y)
  Expon.new(self, y)
end

#+(y) ⇒ Object



28
29
30
# File 'lib/annlat/LaRuby.rb', line 28

def +(y)
  Sum.new(self, y)
end

#-(y) ⇒ Object



36
37
38
# File 'lib/annlat/LaRuby.rb', line 36

def -(y)
  Sum.new(self, -y)
end

#-@Object



32
33
34
# File 'lib/annlat/LaRuby.rb', line 32

def -@
  kind_of? Negative ? expr : Negative.new(self)
end

#/(y) ⇒ Object



44
45
46
# File 'lib/annlat/LaRuby.rb', line 44

def /(y)
  Frac.new(self, y)
end

#glue(some_expr) ⇒ Object



52
53
54
# File 'lib/annlat/LaRuby.rb', line 52

def glue(some_expr)
  LatexConsec.new(self, some_expr)
end

#is(y) ⇒ Object



16
17
18
# File 'lib/annlat/LaRuby.rb', line 16

def is(y)
  LatexConsec.new(self, '=', y)
end

#latexObject



6
7
8
# File 'lib/annlat/LaRuby.rb', line 6

def latex
  ""
end

#my_jsonObject



146
147
148
# File 'lib/annlat/AnnLat.rb', line 146

def my_json
  latex
end

#ne(y) ⇒ Object



20
21
22
# File 'lib/annlat/LaRuby.rb', line 20

def ne(y)
  LatexConsec.new(self, '\ne ', y)
end

#of(*args) ⇒ Object



24
25
26
# File 'lib/annlat/LaRuby.rb', line 24

def of(*args)
  Func.new(self, *args)
end

#to_ltxObject Also known as: l



10
11
12
# File 'lib/annlat/LaRuby.rb', line 10

def to_ltx
  self
end

#wrapObject



2
3
4
# File 'lib/annlat/LaRuby.rb', line 2

def wrap
  Wrapped.new(self)
end