Class: Plurimath::Math::Function::FontStyle::Monospace
- Inherits:
-
FontStyle
- Object
- FontStyle
- Plurimath::Math::Function::FontStyle::Monospace
- Defined in:
- lib/plurimath/math/function/font_style/monospace.rb
Instance Method Summary collapse
-
#initialize(parameter_one, parameter_two = "monospace") ⇒ Monospace
constructor
A new instance of Monospace.
- #to_asciimath(options:) ⇒ Object
- #to_latex(options:) ⇒ Object
- #to_mathml_without_math_tag(intent, options:) ⇒ Object
- #to_omml_without_math_tag(display_style, options:) ⇒ Object
- #to_unicodemath(options:) ⇒ Object
Constructor Details
#initialize(parameter_one, parameter_two = "monospace") ⇒ Monospace
Returns a new instance of Monospace.
8 9 10 11 |
# File 'lib/plurimath/math/function/font_style/monospace.rb', line 8 def initialize(parameter_one, parameter_two = "monospace") super end |
Instance Method Details
#to_asciimath(options:) ⇒ Object
13 14 15 |
# File 'lib/plurimath/math/function/font_style/monospace.rb', line 13 def to_asciimath(options:) "mathtt(#{parameter_one&.to_asciimath(options: )})" end |
#to_latex(options:) ⇒ Object
17 18 19 |
# File 'lib/plurimath/math/function/font_style/monospace.rb', line 17 def to_latex(options:) "\\mathtt{#{parameter_one&.to_latex(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/monospace.rb', line 21 def to_mathml_without_math_tag(intent, options:) Utility.update_nodes( Utility.ox_element( "mstyle", attributes: { mathvariant: "monospace" }, ), [parameter_one&.to_mathml_without_math_tag(intent, options: )], ) end |
#to_omml_without_math_tag(display_style, options:) ⇒ Object
32 33 34 35 |
# File 'lib/plurimath/math/function/font_style/monospace.rb', line 32 def to_omml_without_math_tag(display_style, options:) font_styles(display_style, sty: nil, scr: "monospace", options: ) end |
#to_unicodemath(options:) ⇒ Object
37 38 39 |
# File 'lib/plurimath/math/function/font_style/monospace.rb', line 37 def to_unicodemath(options:) "ᅲ#{unicodemath_parens(parameter_one, options: )}" end |