Sha256: a718161f82a19bd3221f0fbb0871227338ff609176baeb9b02f6ea43b935b126

Contents?: true

Size: 754 Bytes

Versions: 4

Compression:

Stored size: 754 Bytes

Contents

# frozen_string_literal: true

require_relative "unary_function"

module Plurimath
  module Math
    module Function
      class Cancel < UnaryFunction
        def to_mathml_without_math_tag(intent)
          cancel_tag = Utility.ox_element(
            "menclose",
            attributes: { notation: "updiagonalstrike" },
          )
          first_value = parameter_one&.to_mathml_without_math_tag(intent)
          Utility.update_nodes(cancel_tag, [first_value])
        end

        def to_omml_without_math_tag(display_style)
          omml_value(display_style)
        end

        def to_unicodemath
          first_value = unicodemath_parens(parameter_one) if parameter_one
          "╱#{first_value}"
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
plurimath-0.8.14 lib/plurimath/math/function/cancel.rb
plurimath-0.8.13 lib/plurimath/math/function/cancel.rb
plurimath-0.8.12 lib/plurimath/math/function/cancel.rb
plurimath-0.8.11 lib/plurimath/math/function/cancel.rb