Sha256: 8df6248e02d4f79e52c04f5616960485b4f74ee2f1715e3b27120c10b468e7e5

Contents?: true

Size: 843 Bytes

Versions: 7

Compression:

Stored size: 843 Bytes

Contents

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

        # output methods
        def to_latex
          "\\&"
        end

        def to_asciimath
          "&"
        end

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

        def to_mathml_without_math_tag
          ox_element("mo") << "&"
        end

        def to_omml_without_math_tag(_)
          "&"
        end

        def to_html
          "&"
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
plurimath-0.8.10 lib/plurimath/math/symbols/ampersand.rb
plurimath-0.8.9 lib/plurimath/math/symbols/ampersand.rb
plurimath-0.8.8 lib/plurimath/math/symbols/ampersand.rb
plurimath-0.8.7 lib/plurimath/math/symbols/ampersand.rb
plurimath-0.8.6 lib/plurimath/math/symbols/ampersand.rb
plurimath-0.8.5 lib/plurimath/math/symbols/ampersand.rb
plurimath-0.8.4 lib/plurimath/math/symbols/ampersand.rb