Class: Plurimath::Math::Function::Left

Inherits:
UnaryFunction show all
Defined in:
lib/plurimath/math/function/left.rb

Instance Attribute Summary

Attributes inherited from UnaryFunction

#parameter_one

Instance Method Summary collapse

Methods inherited from UnaryFunction

#==, #initialize

Methods inherited from Core

#class_name, #empty_tag, #insert_t_tag, #nary_attr_value, #omml_parameter, #omml_tag_name, #r_element, #tag_name

Constructor Details

This class inherits a constructor from Plurimath::Math::Function::UnaryFunction

Instance Method Details

#to_asciimathObject



9
10
11
# File 'lib/plurimath/math/function/left.rb', line 9

def to_asciimath
  "left#{parameter_one}"
end

#to_htmlObject



28
29
30
# File 'lib/plurimath/math/function/left.rb', line 28

def to_html
  "<i>#{parameter_one}</i>"
end

#to_latexObject



32
33
34
# File 'lib/plurimath/math/function/left.rb', line 32

def to_latex
  "\\left #{Latex::Constants::LEFT_RIGHT_PARENTHESIS.invert[parameter_one] || '.'}"
end

#to_mathml_without_math_tagObject



13
14
15
16
17
# File 'lib/plurimath/math/function/left.rb', line 13

def to_mathml_without_math_tag
  mo = Utility.ox_element("mo")
  mo << left_paren if parameter_one
  mo
end

#to_omml_without_math_tagObject



19
20
21
22
23
24
25
26
# File 'lib/plurimath/math/function/left.rb', line 19

def to_omml_without_math_tag
  mr = Utility.ox_element("m:r")
  if parameter_one
    mt = Utility.ox_element("m:t")
    mr << (mt << parameter_one)
  end
  [mr]
end

#validate_function_formulaObject



36
37
38
# File 'lib/plurimath/math/function/left.rb', line 36

def validate_function_formula
  false
end