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

#==, #initialize, #to_asciimath

Methods inherited from Core

#class_name, #empty_tag, #extract_class_from_text, #extractable?, #font_style_t_tag, #insert_t_tag, #nary_attr_value, #omml_parameter, #omml_tag_name, #r_element, #tag_name, #validate_function_formula

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_tag(display_style) ⇒ Object



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

def to_omml_without_math_tag(display_style)
  omml_value(display_style)
end