Sha256: 7ca3fb383066de38695b94f675ec79e94623a986bf4a6caa97f276121aa0a8f5

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 KB

Contents

module Plurimath
  module Math
    module Symbols
      class Paren
        class Lceil < Paren
          INPUT = {
            unicodemath: [["&#x2308;", "lceil"], parsing_wrapper(["lceiling", "|~"])],
            asciimath: [["lceiling", "|~", "&#x2308;"], parsing_wrapper(["lceil"])],
            mathml: ["&#x2308;"],
            latex: [["\\lceil", "&#x2308;"], parsing_wrapper(["lceiling", "|~"])],
            omml: ["&#x2308;"],
            html: ["&#x2308;"],
          }.freeze

          # output methods
          def to_latex
            "\\lceil"
          end

          def to_asciimath
            "|~"
          end

          def to_unicodemath
            encoded
          end

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

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

          def to_html
            "&#x2308;"
          end

          def open?
            true
          end

          def close?
            false
          end

          def closing
            Rceil
          end

          private

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