Class: Plurimath::Math::Formula::Mstyle

Inherits:
Plurimath::Math::Formula show all
Defined in:
lib/plurimath/math/formula/mstyle.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

Attributes inherited from Plurimath::Math::Formula

#display, #displaystyle, #input_string, #left_right_wrapper, #value

Instance Method Summary collapse

Methods inherited from Plurimath::Math::Formula

#==, #cloned_objects, #extract_class_name_from_text, #initialize, #insert, #intent=, #intent_names, #line_breaked_mathml, #line_breaking, #mathcolor=, #mathml_content, #mathvariant=, #mini_sized?, #nary_attr_value, #new_line_support, #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_mrow?, #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

This class inherits a constructor from Plurimath::Math::Formula

Instance Method Details

#displaystyle=(value) ⇒ Object



7
8
9
# File 'lib/plurimath/math/formula/mstyle.rb', line 7

def displaystyle=(value)
  @displaystyle = boolean_display_style(value)
end

#is_mstyle?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/plurimath/math/formula/mstyle.rb', line 11

def is_mstyle?
  true
end

#omml_content(display_style, options:) ⇒ Object



15
16
17
18
19
# File 'lib/plurimath/math/formula/mstyle.rb', line 15

def omml_content(display_style, options:)
  # Use Mstyle's own @displaystyle, not the passed-in display_style
  effective_display = @displaystyle.nil? ? display_style : @displaystyle
  value&.map { |val| val.insert_t_tag(effective_display, options: options) }
end