Class: Plurimath::Math::Function::Table::Bmatrix
- Inherits:
-
Plurimath::Math::Function::Table
- Object
- Core
- Plurimath::Math::Function::Table
- Plurimath::Math::Function::Table::Bmatrix
- Defined in:
- lib/plurimath/math/function/table/bmatrix.rb
Instance Attribute Summary
Attributes inherited from Plurimath::Math::Function::Table
#close_paren, #open_paren, #options, #value
Instance Method Summary collapse
-
#initialize(value, open_paren = "[", close_paren = "]", options = {}) ⇒ Bmatrix
constructor
A new instance of Bmatrix.
- #to_latex ⇒ Object
- #to_mathml_without_math_tag ⇒ Object
Methods inherited from Plurimath::Math::Function::Table
#==, #to_asciimath, #to_asciimath_math_zone, #to_html, #to_latex_math_zone, #to_mathml_math_zone, #to_omml_math_zone, #to_omml_without_math_tag
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
#initialize(value, open_paren = "[", close_paren = "]", options = {}) ⇒ Bmatrix
Returns a new instance of Bmatrix.
10 11 12 13 14 15 |
# File 'lib/plurimath/math/function/table/bmatrix.rb', line 10 def initialize(value, open_paren = "[", close_paren = "]", = {}) super end |
Instance Method Details
#to_latex ⇒ Object
17 18 19 |
# File 'lib/plurimath/math/function/table/bmatrix.rb', line 17 def to_latex "\\begin#{opening}#{latex_content}\\end#{matrix_class}" end |
#to_mathml_without_math_tag ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/plurimath/math/function/table/bmatrix.rb', line 21 def to_mathml_without_math_tag table_tag = Utility.ox_element("mtable", attributes: table_attribute) Utility.update_nodes( table_tag, value&.map(&:to_mathml_without_math_tag), ) attributes = { open: mathml_parenthesis(open_paren), close: mathml_parenthesis(close_paren), } Utility.ox_element("mfenced", attributes: attributes) << table_tag end |