Sha256: ca1a82416747d5afc832eaa68742b17aba3913e9166b90270442d64646d020b9

Contents?: true

Size: 1.16 KB

Versions: 2

Compression:

Stored size: 1.16 KB

Contents

module Plurimath
  module Math
    module Symbols
      class Paren
        class Rbrack < Paren
          INPUT = {
            unicodemath: [["&#x5d;"], parsing_wrapper(["rbrack"])],
            asciimath: [["&#x5d;"], parsing_wrapper(["rbrack"])],
            mathml: ["&#x5d;"],
            latex: [["\\rbrack", "&#x5d;"]],
            omml: ["&#x5d;"],
            html: ["&#x5d;"],
          }.freeze

          # output methods
          def to_latex
            "\\rbrack"
          end

          def to_asciimath
            parsing_wrapper("rbrack")
          end

          def to_unicodemath
            encoded
          end

          def to_mathml_without_math_tag(_)
            ox_element("mi") << encoded
          end

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

          def to_html
            "&#x5d;"
          end

          def open?
            false
          end

          def close?
            true
          end

          def opening
            Lbrack
          end

          private

          def encoded
            Utility.html_entity_to_unicode("&#x5d;")
          end
        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/paren/rbrack.rb
plurimath-0.8.11 lib/plurimath/math/symbols/paren/rbrack.rb