Class: Plurimath::Math::Function::Text
Constant Summary
collapse
- PARSER_REGEX =
%r{unicode\[:(?<unicode>\w{1,})\]}.freeze
Instance Attribute Summary
#parameter_one
Instance Method Summary
collapse
#==, #class_name, #initialize
Instance Method Details
#to_asciimath ⇒ Object
12
13
14
|
# File 'lib/plurimath/math/function/text.rb', line 12
def to_asciimath
"\"#{parse_text('asciimath') || parameter_one}\""
end
|
#to_html ⇒ Object
26
27
28
|
# File 'lib/plurimath/math/function/text.rb', line 26
def to_html
parse_text("html") || parameter_one
end
|
#to_latex ⇒ Object
21
22
23
24
|
# File 'lib/plurimath/math/function/text.rb', line 21
def to_latex
text_value = parse_text("latex") || parameter_one
"\\text{#{text_value}}"
end
|
#to_mathml_without_math_tag ⇒ Object
16
17
18
19
|
# File 'lib/plurimath/math/function/text.rb', line 16
def to_mathml_without_math_tag
text = Utility.ox_element("mtext")
text << (parse_text("mathml") || parameter_one) if parameter_one
end
|
#to_omml_without_math_tag ⇒ Object
30
31
32
33
|
# File 'lib/plurimath/math/function/text.rb', line 30
def to_omml_without_math_tag
text = Utility.ox_element("t", namespace: "m")
text << (parse_text("omml") || parameter_one)
end
|