Sha256: 0bc3dfd29bf256d3b994f7e4c1fba341ee2dc70718095d4a7aaf33f96e53e2a3

Contents?: true

Size: 968 Bytes

Versions: 2

Compression:

Stored size: 968 Bytes

Contents

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

        # output methods
        def to_latex
          "\\upharpoonright"
        end

        def to_asciimath
          parsing_wrapper("restriction")
        end

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

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

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

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