Sha256: 2f4afd4de338054b4a0299f0d7764d32a4fdbece42c3ec608020ec4faad52cfb
Contents?: true
Size: 1.29 KB
Versions: 17
Compression:
Stored size: 1.29 KB
Contents
# frozen_string_literal: true require_relative "binary_function" module Plurimath module Math module Function class Mod < BinaryFunction def to_asciimath first_value = parameter_one&.to_asciimath second_value = parameter_two&.to_asciimath "#{first_value} mod #{second_value}" end def to_mathml_without_math_tag mrow_tag = Utility.ox_element("mrow") mo_tag = Utility.ox_element("mi") << "mod" first_value = parameter_one&.to_mathml_without_math_tag if parameter_one second_value = parameter_two&.to_mathml_without_math_tag if parameter_two Utility.update_nodes( mrow_tag, [ first_value, mo_tag, second_value, ], ) end def to_latex first_value = "{#{parameter_one.to_latex}}" if parameter_one second_value = "{#{parameter_two.to_latex}}" if parameter_two "#{first_value} \\mod #{second_value}" end def to_html first_value = "<i>#{parameter_one.to_html}</i>" if parameter_one second_value = "<i>#{parameter_two.to_html}</i>" if parameter_two "#{first_value}<i>mod</i>#{second_value}" end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems