Sha256: 1223cd9d7bc61b734a67b0358dcda80f7d6f7412e31a5be4ae1f4416eebb3a16

Contents?: true

Size: 900 Bytes

Versions: 2

Compression:

Stored size: 900 Bytes

Contents

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

        # output methods
        def to_latex
          "\\upsampi"
        end

        def to_asciimath
          parsing_wrapper("sampi")
        end

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

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

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

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