Sha256: 1f0c21904662588a218faea65c0f23d272471d1aca3bd592057b2b91511a098f

Contents?: true

Size: 920 Bytes

Versions: 2

Compression:

Stored size: 920 Bytes

Contents

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

        # output methods
        def to_latex
          "\\hslash"
        end

        def to_asciimath
          parsing_wrapper("hbar")
        end

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

        def to_mathml_without_math_tag(_)
          ox_element("mi") << "&#x210f;"
        end

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

        def to_html
          "&#x210f;"
        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/hbar.rb
plurimath-0.8.11 lib/plurimath/math/symbols/hbar.rb