Class: Plurimath::Math::Function::Ceil

Inherits:
UnaryFunction show all
Defined in:
lib/plurimath/math/function/ceil.rb

Instance Attribute Summary

Attributes inherited from UnaryFunction

#parameter_one

Instance Method Summary collapse

Methods inherited from UnaryFunction

#==, #initialize, #to_asciimath, #to_html

Methods inherited from Core

#class_name, #empty_tag, #insert_t_tag, #nary_attr_value, #omml_parameter, #omml_tag_name, #r_element, #tag_name, #validate_function_formula

Constructor Details

This class inherits a constructor from Plurimath::Math::Function::UnaryFunction

Instance Method Details

#to_latexObject



9
10
11
# File 'lib/plurimath/math/function/ceil.rb', line 9

def to_latex
  "{\\lceil #{latex_value} \\rceil}"
end

#to_mathml_without_math_tagObject



13
14
15
16
17
18
19
20
21
# File 'lib/plurimath/math/function/ceil.rb', line 13

def to_mathml_without_math_tag
  left_value = Utility.ox_element("mo") << "&#x2308;"
  first_value = mathml_value&.insert(0, left_value)
  right_value = Utility.ox_element("mo") << "&#x2309;"
  Utility.update_nodes(
    Utility.ox_element("mrow"),
    first_value << right_value,
  )
end

#to_omml_without_math_tagObject



23
24
25
26
27
28
# File 'lib/plurimath/math/function/ceil.rb', line 23

def to_omml_without_math_tag
  lceil = Symbol.new("")
  rceil = Symbol.new("")
  fenced = Fenced.new(lceil, Array(parameter_one), rceil)
  Array(fenced.to_omml_without_math_tag)
end