Class: Plurimath::Math::Function::Ubrace

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

Instance Attribute Summary

Attributes inherited from UnaryFunction

#parameter_one

Instance Method Summary collapse

Methods inherited from UnaryFunction

#==, #initialize, #to_asciimath, #to_html

Methods inherited from Core

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

Constructor Details

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

Instance Method Details

#omml_tag_nameObject



29
30
31
# File 'lib/plurimath/math/function/ubrace.rb', line 29

def omml_tag_name
  "undOvr"
end

#tag_nameObject



25
26
27
# File 'lib/plurimath/math/function/ubrace.rb', line 25

def tag_name
  "underover"
end

#to_latexObject



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

def to_latex
  first_value = "{#{parameter_one.to_latex}}" if parameter_one
  "\\underbrace#{first_value}"
end

#to_mathml_without_math_tagObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/plurimath/math/function/ubrace.rb', line 14

def to_mathml_without_math_tag
  mo_tag = (Utility.ox_element("mo") << "&#x23df;")
  if parameter_one
    over_tag = Utility.ox_element("munder")
    arr_value = mathml_value
    Utility.update_nodes(over_tag, (arr_value << mo_tag))
  else
    mo_tag
  end
end

#to_omml_without_math_tagObject



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/plurimath/math/function/ubrace.rb', line 37

def to_omml_without_math_tag
  limlow   = Utility.ox_element("limLow", namespace: "m")
  limlowpr = Utility.ox_element("limLowPr", namespace: "m")
  limlowpr << Utility.pr_element("ctrl", true, namespace: "m")
  lim = Utility.ox_element("lim", namespace: "m")
  Utility.update_nodes(
    limlow,
    [
      limlowpr,
      omml_parameter(parameter_one, tag_name: "e"),
      Utility.update_nodes(lim, r_element("")),
    ],
  )
  [limlow]
end

#validate_function_formulaObject



33
34
35
# File 'lib/plurimath/math/function/ubrace.rb', line 33

def validate_function_formula
  false
end