Sha256: d330d62cc8d607777f14429f694b5c17c5e5410df9ccfd2a63dc04ca18deb4b8

Contents?: true

Size: 1.04 KB

Versions: 14

Compression:

Stored size: 1.04 KB

Contents

module Plurimath
  module Math
    module Symbols
      class Box < Symbol
        INPUT = {
          unicodemath: [["box", "&#x25a1;"], parsing_wrapper(["square", "mdlgwhtsquare"], lang: :unicode)],
          asciimath: [["square", "&#x25a1;"], parsing_wrapper(["box", "mdlgwhtsquare"], lang: :asciimath)],
          mathml: ["&#x25a1;"],
          latex: [["mdlgwhtsquare", "&#x25a1;"], parsing_wrapper(["box", "square"], lang: :latex)],
          omml: ["&#x25a1;"],
          html: ["&#x25a1;"],
        }.freeze

        # output methods
        def to_latex(**)
          "\\mdlgwhtsquare"
        end

        def to_asciimath(**)
          parsing_wrapper("box", lang: :asciimath)
        end

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

        def to_mathml_without_math_tag(_, **)
          ox_element("mo") << "&#x25a1;"
        end

        def to_omml_without_math_tag(_, **)
          "&#x25a1;"
        end

        def to_html(**)
          "&#x25a1;"
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
plurimath-0.9.0 lib/plurimath/math/symbols/box.rb
plurimath-0.8.27 lib/plurimath/math/symbols/box.rb
plurimath-0.8.26 lib/plurimath/math/symbols/box.rb
plurimath-0.8.25 lib/plurimath/math/symbols/box.rb
plurimath-0.8.24 lib/plurimath/math/symbols/box.rb
plurimath-0.8.23 lib/plurimath/math/symbols/box.rb
plurimath-0.8.22 lib/plurimath/math/symbols/box.rb
plurimath-0.8.21 lib/plurimath/math/symbols/box.rb
plurimath-0.8.20 lib/plurimath/math/symbols/box.rb
plurimath-0.8.19 lib/plurimath/math/symbols/box.rb
plurimath-0.8.18 lib/plurimath/math/symbols/box.rb
plurimath-0.8.17 lib/plurimath/math/symbols/box.rb
plurimath-0.8.16 lib/plurimath/math/symbols/box.rb
plurimath-0.8.15 lib/plurimath/math/symbols/box.rb