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, #to_asciimath_math_zone, #to_latex_math_zone, #to_mathml_math_zone, #to_omml_math_zone

Methods inherited from Core

#ascii_fields_to_print, #class_name, #common_math_zone_conversion, #dump_mathml, #dump_omml, #dump_ox_nodes, #empty_tag, #extract_class_from_text, #extractable?, #filtered_values, #font_style_t_tag, #gsub_spacing, #insert_t_tag, #invert_unicode_symbols, #latex_fields_to_print, #mathml_fields_to_print, #nary_attr_value, #omml_fields_to_print, #omml_nodes, #omml_parameter, #omml_tag_name, #r_element, #tag_name, #validate_function_formula, #validate_mathml_fields

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