Class: Plurimath::Math::Function::FontStyle::Normal

Inherits:
FontStyle
  • Object
show all
Defined in:
lib/plurimath/math/function/font_style/normal.rb

Instance Method Summary collapse

Constructor Details

#initialize(parameter_one, parameter_two = "rm") ⇒ Normal

Returns a new instance of Normal.



8
9
10
11
# File 'lib/plurimath/math/function/font_style/normal.rb', line 8

def initialize(parameter_one,
               parameter_two = "rm")
  super
end

Instance Method Details

#to_asciimath(options:) ⇒ Object



13
14
15
# File 'lib/plurimath/math/function/font_style/normal.rb', line 13

def to_asciimath(options:)
  "rm(#{parameter_one&.to_asciimath(options: options)})"
end

#to_latex(options:) ⇒ Object



17
18
19
# File 'lib/plurimath/math/function/font_style/normal.rb', line 17

def to_latex(options:)
  "\\mathrm{#{parameter_one&.to_latex(options: options)}}"
end

#to_mathml_without_math_tag(intent, options:) ⇒ Object



21
22
23
24
25
26
27
28
29
30
# File 'lib/plurimath/math/function/font_style/normal.rb', line 21

def to_mathml_without_math_tag(intent, options:)
  Utility.update_nodes(
    Utility.ox_element(
      "mstyle",
      attributes: { mathvariant: "normal" },
    ),
    [parameter_one&.to_mathml_without_math_tag(intent,
                                               options: options)],
  )
end

#to_omml_without_math_tag(display_style, options:) ⇒ Object



32
33
34
# File 'lib/plurimath/math/function/font_style/normal.rb', line 32

def to_omml_without_math_tag(display_style, options:)
  font_styles(display_style, sty: "p", options: options)
end