Sha256: 032ce174f29f66b11e02cc62792d0d648675efd9278c3214f70fb35555f4ce65

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

module Plurimath
  module Math
    module Symbols
      class UpcaseDd < Symbol
        INPUT = {
          unicodemath: ["Dd", "&#x2145;"],
          asciimath: [["&#x2145;"], parsing_wrapper(["Dd"])],
          mathml: ["&#x2145;"],
          latex: ["&#x2145;", parsing_wrapper(["Dd"])],
          omml: ["&#x2145;"],
          html: ["&#x2145;"],
        }.freeze

        # output methods
        def to_latex
          parsing_wrapper("Dd")
        end

        def to_asciimath
          parsing_wrapper("Dd")
        end

        def to_unicodemath
          encoded
        end

        def to_mathml_without_math_tag(intent)
          attributes = { intent: encoded } if intent
          ox_element("mi", attributes: attributes) << "&#x2145;"
        end

        def to_omml_without_math_tag(_)
          "&#x2145;"
        end

        def to_html
          "&#x2145;"
        end

        private

        def encoded
          Utility.html_entity_to_unicode("&#x2145;")
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plurimath-0.8.12 lib/plurimath/math/symbols/upcase_dd.rb
plurimath-0.8.11 lib/plurimath/math/symbols/upcase_dd.rb