Sha256: 5194fdfca3db4d85e0bf8f1d8ba6a58e1afc897311d1cbb6a737db813f337d94

Contents?: true

Size: 987 Bytes

Versions: 2

Compression:

Stored size: 987 Bytes

Contents

module Plurimath
  module Math
    module Symbols
      class Dots < Symbol
        INPUT = {
          unicodemath: [["ldots", "...", "dots", "&#x2026;"], parsing_wrapper(["unicodeellipsis"], lang: :unicode)],
          asciimath: [["ldots", "...", "&#x2026;"], parsing_wrapper(["dots", "unicodeellipsis"], lang: :asciimath)],
          mathml: ["&#x2026;"],
          latex: [["unicodeellipsis", "ldots", "&#x2026;"], parsing_wrapper(["...", "dots"], lang: :latex)],
          omml: ["&#x2026;"],
          html: ["&#x2026;"],
        }.freeze

        # output methods
        def to_latex
          "\\ldots"
        end

        def to_asciimath
          "..."
        end

        def to_unicodemath
          "..."
        end

        def to_mathml_without_math_tag(_)
          ox_element("mo") << "&#x2026;"
        end

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

        def to_html
          "&#x2026;"
        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/dots.rb
plurimath-0.8.13 lib/plurimath/math/symbols/dots.rb