Sha256: b0abc8b1b3be7fd12e35605dfc33ddd50421c461873f9fae0778892af6a328ec

Contents?: true

Size: 1009 Bytes

Versions: 2

Compression:

Stored size: 1009 Bytes

Contents

module Plurimath
  module Math
    module Symbols
      class Varspade < Symbol
        INPUT = {
          unicodemath: [["diamondsuit", "&#x2664;"], parsing_wrapper(["varspadesuit", "varspade"])],
          asciimath: [["&#x2664;"], parsing_wrapper(["diamondsuit", "varspadesuit", "varspade"])],
          mathml: ["&#x2664;"],
          latex: [["varspadesuit", "varspade", "&#x2664;"], parsing_wrapper(["diamondsuit"])],
          omml: ["&#x2664;"],
          html: ["&#x2664;"],
        }.freeze

        # output methods
        def to_latex
          "\\varspadesuit"
        end

        def to_asciimath
          parsing_wrapper("varspade")
        end

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

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

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

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