Class: Plurimath::Math::Function::Mglyph

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

Constant Summary

Constants inherited from Core

Core::ALL_PARAMETERS, Core::REPLACABLES

Instance Attribute Summary

Attributes inherited from UnaryFunction

#hide_function_name, #parameter_one

Instance Method Summary collapse

Methods inherited from UnaryFunction

#==, #custom_array_line_breaking, #intent_names, #reprocess_parameter_one, #to_asciimath_math_zone, #to_html, #to_latex_math_zone, #to_mathml_math_zone, #to_omml_math_zone, #to_unicodemath_math_zone, #update, #value_nil?

Methods inherited from Core

#ascii_fields_to_print, #class_name, #cloned_objects, #common_math_zone_conversion, descendants, #dump_mathml, #dump_nodes, #dump_omml, #dump_ox_nodes, #empty_tag, #extract_class_name_from_text, #extractable?, #filtered_values, #font_style_t_tag, #get, #gsub_spacing, inherited, #insert_t_tag, #invert_unicode_symbols, #is_binary_function?, #is_mrow?, #is_mstyle?, #is_nary_function?, #is_nary_symbol?, #is_ternary_function?, #is_unary?, #latex_fields_to_print, #line_breaking, #linebreak?, #mathml_fields_to_print, #mathml_nodes, #mini_sized?, #msty_tag_with_attrs, #nary_attr_value, #nary_intent_name, #omml_fields_to_print, #omml_nodes, #omml_parameter, #omml_tag_name, #ox_element, #paren?, #pretty_print_instance_variables, #prime_unicode?, #r_element, #replacable_values, #result, #separate_table, #set, #symbol?, #tag_name, #to_ms_value, #unicodemath_fields_to_print, #unicodemath_parens, #updated_object_values, #validate_function_formula, #validate_mathml_fields, #variable_value, #variables

Constructor Details

#initialize(parameter_one = {}) ⇒ Mglyph

Returns a new instance of Mglyph.



7
8
9
# File 'lib/plurimath/math/function/mglyph.rb', line 7

def initialize(parameter_one = {})
  super
end

Instance Method Details

#altObject



35
# File 'lib/plurimath/math/function/mglyph.rb', line 35

def alt; end

#alt=(value) ⇒ Object



45
46
47
# File 'lib/plurimath/math/function/mglyph.rb', line 45

def alt=(value)
  set_option(:alt, value)
end

#indexObject



39
# File 'lib/plurimath/math/function/mglyph.rb', line 39

def index; end

#index=(value) ⇒ Object



49
50
51
# File 'lib/plurimath/math/function/mglyph.rb', line 49

def index=(value)
  set_option(:index, value)
end

#srcObject



37
# File 'lib/plurimath/math/function/mglyph.rb', line 37

def src; end

#src=(value) ⇒ Object



41
42
43
# File 'lib/plurimath/math/function/mglyph.rb', line 41

def src=(value)
  set_option(:src, value)
end

#to_asciimathObject



11
12
13
# File 'lib/plurimath/math/function/mglyph.rb', line 11

def to_asciimath(**)
  parameter_one[:alt]
end

#to_latexObject



15
16
17
# File 'lib/plurimath/math/function/mglyph.rb', line 15

def to_latex(**)
  parameter_one[:alt]
end

#to_mathml_without_math_tag(_intent) ⇒ Object



19
20
21
# File 'lib/plurimath/math/function/mglyph.rb', line 19

def to_mathml_without_math_tag(_intent, **)
  ox_element(class_name, attributes: parameter_one)
end

#to_omml_without_math_tag(_) ⇒ Object



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

def to_omml_without_math_tag(_, **)
  index = parameter_one[:index].to_i
  r_element(
    (ignoring_index(index) ? parameter_one[:alt].to_s : "&#x#{glyph_user_index(index)};"),
    rpr_tag: false,
  )
end

#to_unicodemathObject



31
32
33
# File 'lib/plurimath/math/function/mglyph.rb', line 31

def to_unicodemath(**)
  parameter_one[:alt] if parameter_one
end