Sha256: 60e56e25cf1ebff5f8700f77a7bb061c906158b1617c3a66d701f67d2b80e33e

Contents?: true

Size: 881 Bytes

Versions: 2

Compression:

Stored size: 881 Bytes

Contents

module Plurimath
  module Math
    module Symbols
      class Phi < Symbol
        INPUT = {
          unicodemath: [["varphi", "&#x3c6;"], parsing_wrapper(["upvarphi"])],
          asciimath: [["varphi", "&#x3c6;"], parsing_wrapper(["upvarphi"])],
          mathml: ["&#x3c6;"],
          latex: [["upvarphi", "varphi", "&#x3c6;"]],
          omml: ["&#x3c6;"],
          html: ["&#x3c6;"],
        }.freeze

        # output methods
        def to_latex
          "\\phi"
        end

        def to_asciimath
          "phi"
        end

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

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

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

        def to_html
          "&#x3c6;"
        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/phi.rb
plurimath-0.8.11 lib/plurimath/math/symbols/phi.rb