Class: Plurimath::Math::Function::Ubrace
Instance Attribute Summary collapse
#parameter_one
Instance Method Summary
collapse
#==, #to_asciimath_math_zone, #to_html, #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, #r_element, #validate_mathml_fields
Constructor Details
#initialize(parameter_one = nil, attributes = {}) ⇒ Ubrace
Returns a new instance of Ubrace.
11
12
13
14
|
# File 'lib/plurimath/math/function/ubrace.rb', line 11
def initialize(parameter_one = nil, attributes = {})
super(parameter_one)
@attributes = attributes
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
9
10
11
|
# File 'lib/plurimath/math/function/ubrace.rb', line 9
def attributes
@attributes
end
|
Instance Method Details
#omml_tag_name ⇒ Object
45
46
47
|
# File 'lib/plurimath/math/function/ubrace.rb', line 45
def omml_tag_name
"undOvr"
end
|
#tag_name ⇒ Object
41
42
43
|
# File 'lib/plurimath/math/function/ubrace.rb', line 41
def tag_name
"underover"
end
|
#to_asciimath ⇒ Object
16
17
18
19
|
# File 'lib/plurimath/math/function/ubrace.rb', line 16
def to_asciimath
first_value = "(#{parameter_one.to_asciimath})" if parameter_one
"ubrace#{first_value}"
end
|
#to_latex ⇒ Object
21
22
23
24
|
# File 'lib/plurimath/math/function/ubrace.rb', line 21
def to_latex
first_value = "{#{parameter_one.to_latex}}" if parameter_one
"\\underbrace#{first_value}"
end
|
#to_mathml_without_math_tag ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/plurimath/math/function/ubrace.rb', line 26
def to_mathml_without_math_tag
mo_tag = (Utility.ox_element("mo") << "⏟")
return mo_tag unless parameter_one
over_tag = Utility.ox_element("munder")
over_tag.attributes.merge!(attributes) if attributes && !attributes.empty?
Utility.update_nodes(
over_tag,
[
parameter_one.to_mathml_without_math_tag,
mo_tag,
],
)
end
|
#to_omml_without_math_tag(display_style) ⇒ Object
53
54
55
56
57
58
|
# File 'lib/plurimath/math/function/ubrace.rb', line 53
def to_omml_without_math_tag(display_style)
return r_element("⏟", rpr_tag: false) unless parameter_one
symbol = Symbol.new("⏟")
Underset.new(parameter_one, symbol).to_omml_without_math_tag(true)
end
|
49
50
51
|
# File 'lib/plurimath/math/function/ubrace.rb', line 49
def validate_function_formula
false
end
|