Sha256: 885b344fdb254492f0a1b93f3427b7f6899bbe2ab59e0944a960de0faa6a0b1f

Contents?: true

Size: 745 Bytes

Versions: 15

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

require_relative "unary_function"
module Plurimath
  module Math
    module Function
      class Mbox < UnaryFunction
        def to_mathml_without_math_tag
          text = Utility.ox_element("mtext")
          text << (parameter_one.to_mathml_without_math_tag) if parameter_one
          text
        end

        def to_latex
          first_value = parameter_one&.to_latex
          "\\mbox{#{first_value}}"
        end

        def to_html
          parameter_one&.to_html
        end

        def to_omml_without_math_tag
          text = Utility.ox_element("t", namespace: "m")
          text << parameter_one.to_omml_without_math_tag if parameter_one
          text
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
plurimath-0.3.5 lib/plurimath/math/function/mbox.rb
plurimath-0.3.4 lib/plurimath/math/function/mbox.rb
plurimath-0.3.3 lib/plurimath/math/function/mbox.rb
plurimath-0.3.2 lib/plurimath/math/function/mbox.rb
plurimath-0.3.1.2 lib/plurimath/math/function/mbox.rb
plurimath-0.3.1 lib/plurimath/math/function/mbox.rb
plurimath-0.3.0 lib/plurimath/math/function/mbox.rb
plurimath-0.2.9 lib/plurimath/math/function/mbox.rb
plurimath-0.2.8 lib/plurimath/math/function/mbox.rb
plurimath-0.2.7 lib/plurimath/math/function/mbox.rb
plurimath-0.2.6 lib/plurimath/math/function/mbox.rb
plurimath-0.2.5 lib/plurimath/math/function/mbox.rb
plurimath-0.2.4 lib/plurimath/math/function/mbox.rb
plurimath-0.2.3 lib/plurimath/math/function/mbox.rb
plurimath-0.2.2 lib/plurimath/math/function/mbox.rb