Sha256: e7f2367cdc2b1ec0309f008c21b0633cba81b0b4c8bde259f86f8e1c7b992902
Contents?: true
Size: 938 Bytes
Versions: 17
Compression:
Stored size: 938 Bytes
Contents
# frozen_string_literal: true require_relative "binary_function" module Plurimath module Math module Function class Color < BinaryFunction def to_asciimath first_value = "(#{parameter_one&.to_asciimath&.gsub(/\s/, '')})" second_value = "(#{parameter_two&.to_asciimath})" "color#{first_value}#{second_value}" end def to_mathml_without_math_tag Utility.update_nodes( Utility.ox_element( "mstyle", attributes: { mathcolor: parameter_one&.to_asciimath&.gsub(/\s/, "")&.gsub(/"/, "") }, ), [parameter_two&.to_mathml_without_math_tag], ) end def to_latex first_value = parameter_one&.to_asciimath&.gsub(/\s/, "") second_value = parameter_two&.to_latex "{\\#{class_name}{#{first_value}} #{second_value}}" end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems