Sha256: 8ab9e25441636f7f8178cab070c08cd4695a24f5fdc3060011cb5bdd54089f9d

Contents?: true

Size: 926 Bytes

Versions: 1

Compression:

Stored size: 926 Bytes

Contents

module Plurimath
  module Math
    module Symbols
      class Pi < Symbol
        INPUT = {
          unicodemath: ["pi", "&#x3c0;", "&#x1d70b;", parsing_wrapper(["uppi"])],
          asciimath: ["pi", "&#x3c0;", "&#x1d70b;", parsing_wrapper(["uppi"])],
          mathml: ["&#x3c0;", "&#x1d70b;"],
          latex: ["pi", "uppi", "&#x3c0;", "&#x1d70b;"],
          omml: ["&#x3c0;", "&#x1d70b;"],
          html: ["&#x3C0;", "&#x1d70b;"],
        }.freeze

        # output methods
        def to_latex
          "\\pi"
        end

        def to_asciimath
          "pi"
        end

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

        def to_mathml_without_math_tag(_)
          ox_element("mi") << "&#x3c0;"
        end

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

        def to_html
          "&#x3C0;"
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
plurimath-0.8.12 lib/plurimath/math/symbols/pi.rb