Sha256: cbd0c994e137cf5e6e3911470242ada9d568e37c48fb892f095ec98493b633d0

Contents?: true

Size: 882 Bytes

Versions: 2

Compression:

Stored size: 882 Bytes

Contents

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

        # output methods
        def to_latex
          "\\imath"
        end

        def to_asciimath
          parsing_wrapper("imath", lang: :asciimath)
        end

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

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

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

        def to_html
          "&#x131;"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plurimath-0.8.14 lib/plurimath/math/symbols/imath.rb
plurimath-0.8.13 lib/plurimath/math/symbols/imath.rb