Sha256: 1ec90d7874b8da08f7600a4afbbfc5fef79a16a04700b47d74b3a3fcf1075e15
Contents?: true
Size: 1.89 KB
Versions: 3
Compression:
Stored size: 1.89 KB
Contents
# frozen_string_literal: true require_relative "binary_function" module Plurimath module Math module Function class Lim < BinaryFunction FUNCTION = { name: "limit", first_value: "limit subscript", second_value: "limit supscript", }.freeze def to_asciimath first_value = "_#{wrapped(parameter_one)}" if parameter_one second_value = "^#{wrapped(parameter_two)}" if parameter_two "lim#{first_value}#{second_value}" end def to_latex first_value = "_{#{parameter_one.to_latex}}" if parameter_one second_value = "^{#{parameter_two.to_latex}}" if parameter_two "\\#{class_name}#{first_value}#{second_value}" end def to_mathml_without_math_tag first_value = (Utility.ox_element("mo") << "lim") if parameter_one || parameter_two value_array = [first_value] value_array << parameter_one&.to_mathml_without_math_tag value_array << parameter_two&.to_mathml_without_math_tag tag_name = if parameter_two && parameter_one "underover" else parameter_one ? "under" : "over" end munderover_tag = Utility.ox_element("m#{tag_name}") Utility.update_nodes( munderover_tag, value_array, ) else first_value end end def to_omml_without_math_tag(display_style) underover(display_style) end def line_breaking(obj) parameter_one.line_breaking(obj) if obj.value_exist? obj.update( Underover.new(nil, Utility.filter_values(obj.value), parameter_two) ) self.parameter_two = nil end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
plurimath-0.7.2 | lib/plurimath/math/function/lim.rb |
plurimath-0.7.1 | lib/plurimath/math/function/lim.rb |
plurimath-0.7.0 | lib/plurimath/math/function/lim.rb |