Class: ToLatex::LatexString

Inherits:
String
  • Object
show all
Defined in:
lib/to_latex.rb

Overview

A string converted to latex

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



47
48
49
# File 'lib/to_latex.rb', line 47

def +(other)
  dup.concat(other)
end

#concat(value) ⇒ Object Also known as: <<



37
38
39
40
41
42
43
# File 'lib/to_latex.rb', line 37

def concat value
  if value.latex?
    super value
  else
    super value.to_latex
  end
end

#latex!Object



29
30
31
# File 'lib/to_latex.rb', line 29

def latex!
  self
end

#latex?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/to_latex.rb', line 33

def latex?
  true
end

#to_latexObject



25
26
27
# File 'lib/to_latex.rb', line 25

def to_latex
  self
end

#to_sObject



51
52
53
# File 'lib/to_latex.rb', line 51

def to_s
  self
end