Sha256: 26985ea1bc4ae4b5969d87f2f9497596a95b55865e6cdef4f560fdb1ce3dad1a

Contents?: true

Size: 1.36 KB

Versions: 9

Compression:

Stored size: 1.36 KB

Contents

# frozen_string_literal: true

require_relative "unary_function"

module Plurimath
  module Math
    module Function
      class Ddot < UnaryFunction
        attr_accessor :attributes

        def initialize(parameter_one = nil, attributes = {})
          super(parameter_one)
          @attributes = attributes
        end

        def to_mathml_without_math_tag(intent, options:)
          second_value = Utility.ox_element("mo") << ".."
          Utility.update_nodes(
            Utility.ox_element("mover", attributes: { accent: "true" }),
            mathml_value(intent, options: options) << second_value,
          )
        end

        def to_omml_without_math_tag(_, options:)
          return r_element("..", rpr_tag: false) unless parameter_one

          symbol = Symbols::Symbol.new("..")
          Overset.new(parameter_one, symbol).to_omml_without_math_tag(true, options: options)
        end

        def to_html(options:)
          first_value = "<i>#{parameter_one.to_html(options: options)}</i>" if parameter_one
          "#{first_value}<i>..</i>"
        end

        def to_unicodemath(options:)
          "#{unicodemath_parens(parameter_one, options: options)}̈"
        end

        def line_breaking(obj)
          parameter_one&.line_breaking(obj)
          obj.update(Utility.filter_values(obj.value)) if obj.value_exist?
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
plurimath-0.8.23 lib/plurimath/math/function/ddot.rb
plurimath-0.8.22 lib/plurimath/math/function/ddot.rb
plurimath-0.8.21 lib/plurimath/math/function/ddot.rb
plurimath-0.8.20 lib/plurimath/math/function/ddot.rb
plurimath-0.8.19 lib/plurimath/math/function/ddot.rb
plurimath-0.8.18 lib/plurimath/math/function/ddot.rb
plurimath-0.8.17 lib/plurimath/math/function/ddot.rb
plurimath-0.8.16 lib/plurimath/math/function/ddot.rb
plurimath-0.8.15 lib/plurimath/math/function/ddot.rb