Sha256: 80015d2a0087fd30d9fe2c865b64571d0c2c7a37ab238a5d47f864ddbf4be95a

Contents?: true

Size: 971 Bytes

Versions: 2

Compression:

Stored size: 971 Bytes

Contents

module Plurimath
  module Math
    module Symbols
      class Rel < Symbol
        INPUT = {
          unicodemath: [["leftrightarrow", "&#x2194;"], parsing_wrapper(["harr", "rel"])],
          asciimath: [["leftrightarrow", "harr", "&#x2194;"], parsing_wrapper(["rel"])],
          mathml: ["&#x2194;"],
          latex: [["leftrightarrow", "rel", "&#x2194;"], parsing_wrapper(["harr"])],
          omml: ["&#x2194;"],
          html: ["&#x2194;"],
        }.freeze

        # output methods
        def to_latex
          "\\leftrightarrow"
        end

        def to_asciimath
          parsing_wrapper("rel")
        end

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

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

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

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