Sha256: dab1d121a18cfab2967920370e362882a1a7e0373517cf72b979f4125c4b4a6d

Contents?: true

Size: 815 Bytes

Versions: 10

Compression:

Stored size: 815 Bytes

Contents

module Plurimath
  module Math
    module Symbols
      class Bar < Symbol
        INPUT = {
          unicodemath: [["¯"]],
          asciimath: [["¯"]],
          mathml: ["¯"],
          latex: [["¯"]],
          omml: ["¯"],
          html: ["¯"],
        }.freeze

        # output methods
        def to_latex(**)
          parsing_wrapper("bar", lang: :latex)
        end

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

        def to_unicodemath(**)
          Utility.html_entity_to_unicode("¯")
        end

        def to_mathml_without_math_tag(_, **)
          ox_element("mi") << "¯"
        end

        def to_omml_without_math_tag(_, **)
          "¯"
        end

        def to_html(**)
          "¯"
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
plurimath-0.8.24 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.23 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.22 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.21 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.20 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.19 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.18 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.17 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.16 lib/plurimath/math/symbols/bar.rb
plurimath-0.8.15 lib/plurimath/math/symbols/bar.rb