lib/plurimath/math/function/left.rb in plurimath-0.5.0 vs lib/plurimath/math/function/left.rb in plurimath-0.6.0
- old
+ new
@@ -28,14 +28,32 @@
def to_html
"<i>#{parameter_one}</i>"
end
def to_latex
- "\\left #{Latex::Constants::LEFT_RIGHT_PARENTHESIS.invert[parameter_one] || '.'}"
+ "\\left #{latex_paren}"
end
def validate_function_formula
false
+ end
+
+ def to_asciimath_math_zone(spacing = "", _, _)
+ "#{spacing}\"#{latex_paren}\" left\n"
+ end
+
+ def to_latex_math_zone(spacing = "", _, _)
+ "#{spacing}\"#{latex_paren}\" left\n"
+ end
+
+ def to_mathml_math_zone(spacing = "", _, _)
+ mo_tag = (Utility.ox_element("mo") << left_paren)
+ "#{spacing}\"#{dump_ox_nodes(mo_tag).gsub(/\s+/, "")}\" left\n"
+ end
+
+ def to_omml_math_zone(spacing = "", _, _, display_style:)
+ t_tag = (Utility.ox_element("t", namespace: "m") << left_paren)
+ "#{spacing}\"#{dump_ox_nodes(t_tag).gsub(/\s+/, "")}\" left\n"
end
protected
def left_paren