Class: Plurimath::Math::Function::Table::Pmatrix

Inherits:
Table
  • Object
show all
Defined in:
lib/plurimath/math/function/table/pmatrix.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, open_paren = "(", close_paren = ")", options = {}) ⇒ Pmatrix

Returns a new instance of Pmatrix.



8
9
10
11
12
13
# File 'lib/plurimath/math/function/table/pmatrix.rb', line 8

def initialize(value,
               open_paren = "(",
               close_paren = ")",
               options = {})
  super
end

Instance Method Details

#to_latex(options:) ⇒ Object



15
16
17
# File 'lib/plurimath/math/function/table/pmatrix.rb', line 15

def to_latex(options:)
  "\\begin#{opening}#{latex_content(options: options)}\\end#{matrix_class}"
end

#to_mathml_without_math_tag(intent) ⇒ Object



26
27
28
29
30
# File 'lib/plurimath/math/function/table/pmatrix.rb', line 26

def to_mathml_without_math_tag(intent, **)
  matrix = super
  matrix["intent"] = intent_names[:parenthesized_matrix] if intent
  matrix
end

#to_unicodemath(options:) ⇒ Object



19
20
21
22
23
24
# File 'lib/plurimath/math/function/table/pmatrix.rb', line 19

def to_unicodemath(options:)
  unicode_value = value.map do |val|
    val.to_unicodemath(options: options)
  end.join("@")
  "⒨(#{unicode_value})"
end