Class: Plurimath::Math::Formula::Mrow
- Inherits:
-
Plurimath::Math::Formula
- Object
- Core
- Plurimath::Math::Formula
- Plurimath::Math::Formula::Mrow
- Defined in:
- lib/plurimath/math/formula/mrow.rb
Constant Summary
Constants inherited from Plurimath::Math::Formula
DERIVATIVE_CONSTS, MATH_ZONE_TYPES, OMML_NAMESPACES, POWER_BASE_CLASSES
Constants inherited from Core
Core::ALL_PARAMETERS, Core::REPLACABLES
Instance Attribute Summary collapse
-
#is_mrow ⇒ Object
Returns the value of attribute is_mrow.
Attributes inherited from Plurimath::Math::Formula
#display, #displaystyle, #input_string, #left_right_wrapper, #value
Instance Method Summary collapse
-
#initialize(value = [], left_right_wrapper = true, display_style: true, input_string: nil) ⇒ Mrow
constructor
A new instance of Mrow.
- #is_mrow? ⇒ Boolean
- #organize_value ⇒ Object
Methods inherited from Plurimath::Math::Formula
#==, #cloned_objects, #extract_class_name_from_text, #insert, #intent=, #intent_names, #line_breaked_mathml, #line_breaking, #mathcolor=, #mathml_content, #mathvariant=, #mini_sized?, #nary_attr_value, #new_line_support, #omml_content, #reprocess_value, #to_asciimath, #to_asciimath_math_zone, #to_display, #to_html, #to_latex, #to_latex_math_zone, #to_mathml, #to_mathml_math_zone, #to_mathml_without_math_tag, #to_omml, #to_omml_math_zone, #to_omml_without_math_tag, #to_unicodemath, #to_unicodemath_math_zone, #update, #validate_function_formula, #value_exist?
Methods inherited from Core
#ascii_fields_to_print, #class_name, #cloned_objects, #common_math_zone_conversion, descendants, #dump_mathml, #dump_nodes, #dump_omml, #dump_ox_nodes, #empty_tag, #extract_class_name_from_text, #extractable?, #filtered_values, #font_style_t_tag, #get, #gsub_spacing, inherited, #insert_t_tag, #invert_unicode_symbols, #is_binary_function?, #is_mstyle?, #is_nary_function?, #is_nary_symbol?, #is_ternary_function?, #is_unary?, #latex_fields_to_print, #line_breaking, #linebreak?, #mathml_fields_to_print, #mathml_nodes, #mini_sized?, #msty_tag_with_attrs, #nary_attr_value, #nary_intent_name, #omml_fields_to_print, #omml_nodes, #omml_parameter, #omml_tag_name, #ox_element, #paren?, #pretty_print_instance_variables, #prime_unicode?, #r_element, #replacable_values, #result, #separate_table, #set, #symbol?, #tag_name, #to_ms_value, #unicodemath_fields_to_print, #unicodemath_parens, #updated_object_values, #validate_function_formula, #validate_mathml_fields, #variable_value, #variables
Constructor Details
#initialize(value = [], left_right_wrapper = true, display_style: true, input_string: nil) ⇒ Mrow
Returns a new instance of Mrow.
9 10 11 12 13 14 15 16 17 |
# File 'lib/plurimath/math/formula/mrow.rb', line 9 def initialize( value = [], left_right_wrapper = true, display_style: true, input_string: nil ) super @is_mrow = true end |
Instance Attribute Details
#is_mrow ⇒ Object
Returns the value of attribute is_mrow.
7 8 9 |
# File 'lib/plurimath/math/formula/mrow.rb', line 7 def is_mrow @is_mrow end |
Instance Method Details
#is_mrow? ⇒ Boolean
19 20 21 |
# File 'lib/plurimath/math/formula/mrow.rb', line 19 def is_mrow? @is_mrow end |
#organize_value ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/plurimath/math/formula/mrow.rb', line 23 def organize_value return if value.any?(String) return unless is_mrow value.each_with_index do |element, index| update_current_element(element, value, index) if value[index + 1].is_a?(Math::Function::Mod) update_mod_function(value, index) elsif unary_function_updatable?(value, element, index) unary_function_update(value, index) elsif value.first.paren? && value.last.paren? organize_fencing(value) elsif valid_underset_function?(element) value[index] = new_nary_element(element, value) elsif valid_underover_function?(element) replace_with_nary_function(element, value, index) elsif ternary_function_third_value_present?(element) element.parameter_three = value.delete_at(index + 1) end end end |