Sha256: 2f58374c1fc69575bc3d4f461d0dde958f68798a1ec7e5fb822fdd4f8a43f0d6

Contents?: true

Size: 812 Bytes

Versions: 2

Compression:

Stored size: 812 Bytes

Contents

# frozen_string_literal: true

require_relative "unary_function"

module Plurimath
  module Math
    module Function
      class Obrace < UnaryFunction
        def to_latex
          first_value = "{#{parameter_one.to_latex}}" if parameter_one
          "\\overbrace#{first_value}"
        end

        def to_mathml_without_math_tag
          mo_tag = (Utility.ox_element("mo") << "&#x23de;")
          if parameter_one
            over_tag = Utility.ox_element("mover")
            arr_value = mathml_value
            Utility.update_nodes(over_tag, (arr_value << mo_tag))
          else
            mo_tag
          end
        end

        def tag_name
          "underover"
        end

        def validate_function_formula
          false
        end
      end

      Overbrace = Obrace
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plurimath-0.3.7 lib/plurimath/math/function/obrace.rb
plurimath-0.3.6 lib/plurimath/math/function/obrace.rb