Class: Plurimath::Math::Function::Mbox

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

Instance Attribute Summary

Attributes inherited from UnaryFunction

#parameter_one

Instance Method Summary collapse

Methods inherited from UnaryFunction

#==, #class_name, #initialize, #to_asciimath

Constructor Details

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

Instance Method Details

#to_htmlObject



19
20
21
# File 'lib/plurimath/math/function/mbox.rb', line 19

def to_html
  parameter_one&.to_html
end

#to_latexObject



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

def to_latex
  first_value = parameter_one&.to_latex
  "\\mbox{#{first_value}}"
end

#to_mathml_without_math_tagObject



8
9
10
11
12
# File 'lib/plurimath/math/function/mbox.rb', line 8

def to_mathml_without_math_tag
  text = Utility.ox_element("mtext")
  text << (parameter_one.to_mathml_without_math_tag) if parameter_one
  text
end

#to_omml_without_math_tagObject



23
24
25
26
27
# File 'lib/plurimath/math/function/mbox.rb', line 23

def to_omml_without_math_tag
  text = Utility.ox_element("t", namespace: "m")
  text << parameter_one.to_omml_without_math_tag if parameter_one
  text
end