Sha256: 87f1a289ab2d32f2793546af3f058d0c171d88dfc80fa9d79739687e7b684bd4

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

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

          # output methods
          def to_latex
            "\\lbrace"
          end

          def to_asciimath
            parsing_wrapper("lbrace")
          end

          def to_unicodemath
            encoded
          end

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

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

          def to_html
            "&#x7b;"
          end

          def open?
            true
          end

          def close?
            false
          end

          def closing
            Rbrace
          end

          private

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