lib/plurimath/math/function/table/array.rb in plurimath-0.8.2 vs lib/plurimath/math/function/table/array.rb in plurimath-0.8.4
- old
+ new
@@ -16,27 +16,28 @@
def to_latex
"\\begin{array}#{array_args || '.'}#{latex_content}\\end{array}"
end
+ def to_mathml_without_math_tag
+ Utility.update_nodes(
+ ox_element("mtable", attributes: table_attribute),
+ value&.map(&:to_mathml_without_math_tag),
+ )
+ end
+
+ private
+
def array_args
args = []
value.first.parameter_one.each do |td|
args << if Utility.symbol_value(td.parameter_one.first, "|")
"|"
else
Utility::ALIGNMENT_LETTERS.invert[Hash(td.parameter_two)[:columnalign]]&.to_s
end
end
"{#{args.join}}" unless args.compact.empty?
- end
-
- 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),
- )
end
end
end
end
end