Sha256: c2c95b715ceb21e1259d4c3e416cf0ec19c249b2b1013caca0085e7d221a946a

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

module Plurimath
  module Math
    module Symbols
      class Ee < Symbol
        INPUT = {
          unicodemath: [["ee", "&#x2147;"], parsing_wrapper(["EE", "exi"])],
          asciimath: [["mathbb(e)", "&#x2147;"], parsing_wrapper(["ee"])],
          mathml: ["&#x2147;"],
          latex: [["\\mathbb{e}", "&#x2147;"], parsing_wrapper(["ee"])],
          omml: ["&#x2147;"],
          html: ["&#x2147;"],
        }.freeze

        # output methods
        def to_latex
          "\\mathbb{e}"
        end

        def to_asciimath
          "mathbb(e)"
        end

        def to_unicodemath
          Utility.html_entity_to_unicode("&#x2147;")
        end

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

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

        def to_html
          "&#x2147;"
        end

        private

        def encoded
          Utility.html_entity_to_unicode("&#x2147;")
        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/ee.rb
plurimath-0.8.11 lib/plurimath/math/symbols/ee.rb