Sha256: f0d14f7213e238ba07d68f272a7011bf3e9cfd830beeba558a959eda6269218a

Contents?: true

Size: 1010 Bytes

Versions: 10

Compression:

Stored size: 1010 Bytes

Contents

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

        # output methods
        def to_latex(**)
          "\\hslash"
        end

        def to_asciimath(**)
          parsing_wrapper("hbar", lang: :asciimath)
        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

10 entries across 10 versions & 1 rubygems

Version Path
plurimath-0.8.24 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.23 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.22 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.21 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.20 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.19 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.18 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.17 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.16 lib/plurimath/math/symbols/hbar.rb
plurimath-0.8.15 lib/plurimath/math/symbols/hbar.rb