Sha256: ccf3e29f56379f056bb94192b8e2d84428ab44d6a2d5f6839e4b2f7513636ce9

Contents?: true

Size: 873 Bytes

Versions: 2

Compression:

Stored size: 873 Bytes

Contents

# frozen_string_literal: true

require_relative "binary_function"

module Plurimath
  module Math
    module Function
      class FontStyle < BinaryFunction
        def to_asciimath
          parameter_one&.to_asciimath
        end

        def to_mathml_without_math_tag
          first_value = parameter_one&.to_mathml_without_math_tag
          Utility.update_nodes(
            Utility.ox_element(
              "mstyle",
              attributes: { mathvariant: parameter_two },
            ),
            [first_value],
          )
        end

        def to_omml_without_math_tag
          Array(parameter_one&.insert_t_tag)
        end

        def to_html
          parameter_one&.to_html
        end

        def to_latex
          parameter_one&.to_latex
        end

        def validate_function_formula
          true
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plurimath-0.3.9 lib/plurimath/math/function/font_style.rb
plurimath-0.3.8 lib/plurimath/math/function/font_style.rb