Sha256: 4a2db8c8b12d3b1e2fe7464d902f6bd42387b2617c9aff42d3b62465131f4616

Contents?: true

Size: 1.16 KB

Versions: 4

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

require_relative "ternary_function"

module Plurimath
  module Math
    module Function
      class Limits < TernaryFunction
        def to_mathml_without_math_tag
          underover = Utility.ox_element("munderover")
          value_array = []
          value_array << parameter_one&.to_mathml_without_math_tag
          value_array << parameter_two&.to_mathml_without_math_tag
          value_array << parameter_three&.to_mathml_without_math_tag
          Utility.update_nodes(underover, value_array)
        end

        def to_latex
          first_value  = parameter_one&.to_latex
          second_value = "{#{parameter_two.to_latex}}" if parameter_two
          third_value  = "{#{parameter_three.to_latex}}" if parameter_three
          "#{first_value}\\#{class_name}_#{second_value}^#{third_value}"
        end

        def to_omml_without_math_tag
          value_array = []
          value_array << parameter_one.insert_t_tag if parameter_one
          value_array << parameter_two.insert_t_tag if parameter_two
          value_array << parameter_three.insert_t_tag if parameter_three
          value_array
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
plurimath-0.3.9 lib/plurimath/math/function/limits.rb
plurimath-0.3.8 lib/plurimath/math/function/limits.rb
plurimath-0.3.7 lib/plurimath/math/function/limits.rb
plurimath-0.3.6 lib/plurimath/math/function/limits.rb