plurimath 0.3.7 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/plurimath/asciimath/constants.rb +1 -1
  3. data/lib/plurimath/asciimath/transform.rb +17 -0
  4. data/lib/plurimath/latex/constants.rb +3 -5
  5. data/lib/plurimath/math/core.rb +14 -0
  6. data/lib/plurimath/math/formula.rb +19 -6
  7. data/lib/plurimath/math/function/binary_function.rb +14 -4
  8. data/lib/plurimath/math/function/cancel.rb +4 -0
  9. data/lib/plurimath/math/function/ceil.rb +7 -0
  10. data/lib/plurimath/math/function/color.rb +4 -0
  11. data/lib/plurimath/math/function/ddot.rb +4 -3
  12. data/lib/plurimath/math/function/deg.rb +4 -0
  13. data/lib/plurimath/math/function/det.rb +4 -0
  14. data/lib/plurimath/math/function/dim.rb +4 -0
  15. data/lib/plurimath/math/function/dot.rb +18 -0
  16. data/lib/plurimath/math/function/exp.rb +4 -0
  17. data/lib/plurimath/math/function/floor.rb +8 -0
  18. data/lib/plurimath/math/function/font_style.rb +1 -3
  19. data/lib/plurimath/math/function/gcd.rb +4 -0
  20. data/lib/plurimath/math/function/glb.rb +4 -0
  21. data/lib/plurimath/math/function/hat.rb +13 -0
  22. data/lib/plurimath/math/function/hom.rb +3 -0
  23. data/lib/plurimath/math/function/inf.rb +18 -17
  24. data/lib/plurimath/math/function/int.rb +8 -8
  25. data/lib/plurimath/math/function/ker.rb +3 -0
  26. data/lib/plurimath/math/function/lcm.rb +3 -0
  27. data/lib/plurimath/math/function/lg.rb +4 -0
  28. data/lib/plurimath/math/function/lim.rb +1 -5
  29. data/lib/plurimath/math/function/liminf.rb +3 -0
  30. data/lib/plurimath/math/function/limsup.rb +3 -0
  31. data/lib/plurimath/math/function/ln.rb +4 -0
  32. data/lib/plurimath/math/function/longdiv.rb +3 -0
  33. data/lib/plurimath/math/function/lub.rb +4 -0
  34. data/lib/plurimath/math/function/max.rb +4 -0
  35. data/lib/plurimath/math/function/menclose.rb +1 -3
  36. data/lib/plurimath/math/function/merror.rb +1 -0
  37. data/lib/plurimath/math/function/min.rb +4 -0
  38. data/lib/plurimath/math/function/mod.rb +8 -0
  39. data/lib/plurimath/math/function/msline.rb +3 -0
  40. data/lib/plurimath/math/function/norm.rb +8 -0
  41. data/lib/plurimath/math/function/obrace.rb +29 -4
  42. data/lib/plurimath/math/function/oint.rb +55 -3
  43. data/lib/plurimath/math/function/over.rb +15 -1
  44. data/lib/plurimath/math/function/phantom.rb +7 -4
  45. data/lib/plurimath/math/function/power_base.rb +3 -1
  46. data/lib/plurimath/math/function/prod.rb +4 -0
  47. data/lib/plurimath/math/function/root.rb +2 -6
  48. data/lib/plurimath/math/function/scarries.rb +3 -0
  49. data/lib/plurimath/math/function/semantics.rb +4 -0
  50. data/lib/plurimath/math/function/sqrt.rb +1 -3
  51. data/lib/plurimath/math/function/stackrel.rb +15 -0
  52. data/lib/plurimath/math/function/substack.rb +45 -0
  53. data/lib/plurimath/math/function/sum.rb +8 -0
  54. data/lib/plurimath/math/function/sup.rb +4 -0
  55. data/lib/plurimath/math/function/table.rb +0 -4
  56. data/lib/plurimath/math/function/ternary_function.rb +13 -4
  57. data/lib/plurimath/math/function/tilde.rb +14 -0
  58. data/lib/plurimath/math/function/ubrace.rb +20 -0
  59. data/lib/plurimath/math/function/ul.rb +2 -0
  60. data/lib/plurimath/math/function/unary_function.rb +0 -4
  61. data/lib/plurimath/math/function/underover.rb +2 -5
  62. data/lib/plurimath/math/function/vec.rb +14 -0
  63. data/lib/plurimath/math/symbol.rb +8 -0
  64. data/lib/plurimath/math.rb +3 -1
  65. data/lib/plurimath/mathml/parser.rb +2 -2
  66. data/lib/plurimath/version.rb +1 -1
  67. metadata +2 -3
  68. data/lib/plurimath/math/function/underline.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39522e32ac4e62af9eb862173a64e6e8650a9531bae27f321f25c6a1bc594e95
4
- data.tar.gz: df5419195046dcf270cd4561c8cf3f9657536217a370d7a9aef150d7ca6aec72
3
+ metadata.gz: 1d50026941bd556b94051c14a61a081ad96dbf839ed1aa324a9451382ef512e8
4
+ data.tar.gz: 40bf633bf5c0286daa011bf80d90baa2d522b18b9e545035d5dd6c32593792db
5
5
  SHA512:
6
- metadata.gz: 0a2c7880f03ba5d70c508b61f9c272be5a4780cbc5a30f56e142f7aa6798b5a8059051c6ecaf80ac9c209ab2cda977d55d7354f28e06e42c3dd439e3e96c0349
7
- data.tar.gz: f2c0962524dc14232b0a48a4cd92015551f39603087bc42b08e73d0a3e66952ae2ab260f13166d159de378bd1757c24b0039a58d5b0fd129fb7be431f523e6a1
6
+ metadata.gz: 8cf6f394801e567d2a7b482a14fc4da5e3b4c19515ce549a00fc9c247ce4d26c565dc5ff72586648cd30c51c0361f40808fb1117ed408bd9c319156622b34640
7
+ data.tar.gz: 65d1590db64f33f620ad438ae2d328eb1fe9a6bffeee9a427dba9f782bdc9b429ed5c54e9892ade8c59894ddd57d2bcc6680a4b7cb1b9cee26c67c0cab1b05d2
@@ -312,11 +312,11 @@ module Plurimath
312
312
  ].freeze
313
313
  TERNARY_CLASSES = %w[
314
314
  prod
315
+ oint
315
316
  sum
316
317
  int
317
318
  ].freeze
318
319
  SUB_SUP_CLASSES = %w[
319
- oint
320
320
  lim
321
321
  log
322
322
  ].freeze
@@ -766,6 +766,18 @@ module Plurimath
766
766
  )
767
767
  end
768
768
 
769
+ rule(ternary_class: simple(:function),
770
+ base_value: simple(:base),
771
+ power_value: simple(:power),
772
+ third_value: sequence(:third)) do
773
+ third_value = third.is_a?(Slice) ? nil : third
774
+ Utility.get_class(function).new(
775
+ Utility.unfenced_value(base),
776
+ Utility.unfenced_value(power),
777
+ Utility.filter_values(third_value),
778
+ )
779
+ end
780
+
769
781
  rule(unary_class: simple(:function),
770
782
  intermediate_exp: simple(:int_exp)) do
771
783
  first_value = if Utility::UNARY_CLASSES.include?(function)
@@ -821,6 +833,11 @@ module Plurimath
821
833
  expr.insert(0, ternary)
822
834
  end
823
835
 
836
+ rule(ternary: simple(:ternary),
837
+ left_right: simple(:left_right)) do
838
+ [ternary, left_right]
839
+ end
840
+
824
841
  rule(unary_class: simple(:function),
825
842
  text: simple(:text)) do
826
843
  Utility.get_class(function).new(
@@ -1601,7 +1601,6 @@ module Plurimath
1601
1601
  nmid: "∤",
1602
1602
  land: "∧",
1603
1603
  iint: "∬",
1604
- oint: "∮",
1605
1604
  nsim: "≁",
1606
1605
  cong: "≅",
1607
1606
  sdef: "≙",
@@ -1720,7 +1719,6 @@ module Plurimath
1720
1719
  lor: "∨",
1721
1720
  cap: "∩",
1722
1721
  cup: "∪",
1723
- int: "∫",
1724
1722
  sim: "∼",
1725
1723
  neq: "≠",
1726
1724
  leq: "≤",
@@ -2524,7 +2522,7 @@ module Plurimath
2524
2522
  rmoustache: :symbols,
2525
2523
  sqrtbottom: :symbols,
2526
2524
  underparen: :symbols,
2527
- underbrace: :underover,
2525
+ underbrace: :unary,
2528
2526
  hrectangle: :symbols,
2529
2527
  vrectangle: :symbols,
2530
2528
  LEFTcircle: :symbols,
@@ -3455,7 +3453,7 @@ module Plurimath
3455
3453
  nmid: :symbols,
3456
3454
  land: :symbols,
3457
3455
  iint: :symbols,
3458
- oint: :symbols,
3456
+ oint: :ternary,
3459
3457
  nsim: :symbols,
3460
3458
  cong: :symbols,
3461
3459
  sdef: :symbols,
@@ -3586,7 +3584,7 @@ module Plurimath
3586
3584
  lor: :symbols,
3587
3585
  cap: :symbols,
3588
3586
  cup: :symbols,
3589
- int: :symbols,
3587
+ int: :ternary,
3590
3588
  sim: :symbols,
3591
3589
  neq: :symbols,
3592
3590
  leq: :symbols,
@@ -15,6 +15,10 @@ module Plurimath
15
15
  "subsup"
16
16
  end
17
17
 
18
+ def omml_tag_name
19
+ "subSup"
20
+ end
21
+
18
22
  def nary_attr_value
19
23
  ""
20
24
  end
@@ -38,6 +42,16 @@ module Plurimath
38
42
  def validate_function_formula
39
43
  true
40
44
  end
45
+
46
+ def r_element(string, rpr_tag: true)
47
+ r_tag = Utility.ox_element("r", namespace: "m")
48
+ if rpr_tag
49
+ sty_tag = Utility.ox_element("sty", namespace: "m", attributes: { "m:val": "p" })
50
+ r_tag << (Utility.ox_element("rPr", namespace: "m") << sty_tag)
51
+ end
52
+ r_tag << (Utility.ox_element("t", namespace: "m") << string)
53
+ Array(r_tag)
54
+ end
41
55
  end
42
56
  end
43
57
  end
@@ -3,12 +3,13 @@
3
3
  module Plurimath
4
4
  module Math
5
5
  class Formula < Core
6
- attr_accessor :value, :left_right_wrapper, :displaystyle
6
+ attr_accessor :value, :left_right_wrapper, :displaystyle, :input_string
7
7
 
8
8
  def initialize(
9
9
  value = [],
10
10
  left_right_wrapper = true,
11
- displaystyle: true
11
+ displaystyle: true,
12
+ input_string: nil
12
13
  )
13
14
  @value = value.is_a?(Array) ? value : [value]
14
15
  left_right_wrapper = false if @value.first.is_a?(Function::Left)
@@ -23,6 +24,8 @@ module Plurimath
23
24
 
24
25
  def to_asciimath
25
26
  value.map(&:to_asciimath).join(" ")
27
+ rescue
28
+ parse_error!(:asciimath)
26
29
  end
27
30
 
28
31
  def to_mathml(display_style: displaystyle)
@@ -36,6 +39,8 @@ module Plurimath
36
39
  Utility.update_nodes(style, mathml_content)
37
40
  Utility.update_nodes(math, [style])
38
41
  Ox.dump(math, indent: 2).gsub("&amp;", "&")
42
+ rescue
43
+ parse_error!(:mathml)
39
44
  end
40
45
 
41
46
  def to_mathml_without_math_tag
@@ -53,10 +58,14 @@ module Plurimath
53
58
 
54
59
  def to_latex
55
60
  value&.map(&:to_latex)&.join(" ")
61
+ rescue
62
+ parse_error!(:latex)
56
63
  end
57
64
 
58
65
  def to_html
59
66
  value&.map(&:to_html)&.join(" ")
67
+ rescue
68
+ parse_error!(:html)
60
69
  end
61
70
 
62
71
  def omml_math_attrs
@@ -92,6 +101,8 @@ module Plurimath
92
101
  Utility.update_nodes(math_element, omml_content)
93
102
  Utility.update_nodes(para_element, Array(math_element))
94
103
  Ox.dump(para_element, indent: 2).gsub("&amp;", "&").lstrip
104
+ rescue
105
+ parse_error!(:omml)
95
106
  end
96
107
 
97
108
  def omml_content
@@ -115,10 +126,6 @@ module Plurimath
115
126
  [nary_tag]
116
127
  end
117
128
 
118
- def class_name
119
- self.class.name.split("::").last.downcase
120
- end
121
-
122
129
  def extract_class_from_text
123
130
  return false unless (value.length < 2 && value&.first&.is_a?(Function::Text))
124
131
 
@@ -141,6 +148,12 @@ module Plurimath
141
148
  def validate_function_formula
142
149
  (value.none?(Function::Left) || value.none?(Function::Right))
143
150
  end
151
+
152
+ protected
153
+
154
+ def parse_error!(type)
155
+ Math.parse_error!(input_string, type)
156
+ end
144
157
  end
145
158
  end
146
159
  end
@@ -56,10 +56,6 @@ module Plurimath
56
56
  [r_tag]
57
57
  end
58
58
 
59
- def class_name
60
- self.class.name.split("::").last.downcase
61
- end
62
-
63
59
  protected
64
60
 
65
61
  def latex_wrapped(field)
@@ -85,6 +81,20 @@ module Plurimath
85
81
  r_tag << (Utility.ox_element("t", namespace: "m") << "&#8203;")
86
82
  wrapper_tag << r_tag
87
83
  end
84
+
85
+ def all_values_exist?
86
+ !(parameter_one.nil? && parameter_two.nil?)
87
+ end
88
+
89
+ def underover
90
+ return r_element(class_name, rpr_tag: false) unless all_values_exist?
91
+
92
+ first_value = Symbol.new(class_name)
93
+ overset = Overset.new(first_value, parameter_two)
94
+ return Array(overset.to_omml_without_math_tag) unless parameter_one
95
+
96
+ Array(Underset.new(overset, parameter_one)&.to_omml_without_math_tag)
97
+ end
88
98
  end
89
99
  end
90
100
  end
@@ -14,6 +14,10 @@ module Plurimath
14
14
  first_value = parameter_one&.to_mathml_without_math_tag
15
15
  Utility.update_nodes(cancel_tag, [first_value])
16
16
  end
17
+
18
+ def to_omml_without_math_tag
19
+ omml_value
20
+ end
17
21
  end
18
22
  end
19
23
  end
@@ -19,6 +19,13 @@ module Plurimath
19
19
  first_value << right_value,
20
20
  )
21
21
  end
22
+
23
+ def to_omml_without_math_tag
24
+ lceil = Symbol.new("⌈")
25
+ rceil = Symbol.new("⌉")
26
+ fenced = Fenced.new(lceil, Array(parameter_one), rceil)
27
+ Array(fenced.to_omml_without_math_tag)
28
+ end
22
29
  end
23
30
  end
24
31
  end
@@ -27,6 +27,10 @@ module Plurimath
27
27
  second_value = parameter_two&.to_latex
28
28
  "{\\#{class_name}{#{first_value}} #{second_value}}"
29
29
  end
30
+
31
+ def to_omml_without_math_tag
32
+ Array(parameter_two.insert_t_tag)
33
+ end
30
34
  end
31
35
  end
32
36
  end
@@ -18,11 +18,12 @@ module Plurimath
18
18
  acc_tag = Utility.ox_element("acc", namespace: "m")
19
19
  acc_pr_tag = Utility.ox_element("accPr", namespace: "m")
20
20
  acc_pr_tag << (Utility.ox_element("chr", namespace: "m", attributes: { "m:val": ".." }))
21
- me = Utility.ox_element("e", namespace: "m")
22
- Utility.update_nodes(me, omml_value)
23
21
  Utility.update_nodes(
24
22
  acc_tag,
25
- [acc_pr_tag, me],
23
+ [
24
+ acc_pr_tag,
25
+ omml_parameter(parameter_one, tag_name: "e"),
26
+ ],
26
27
  )
27
28
  [acc_tag]
28
29
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("deg"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("det"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("dim"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -18,6 +18,24 @@ module Plurimath
18
18
  ],
19
19
  )
20
20
  end
21
+
22
+ def to_omml_without_math_tag
23
+ acc_tag = Utility.ox_element("acc", namespace: "m")
24
+ acc_pr_tag = Utility.ox_element("accPr", namespace: "m")
25
+ acc_pr_tag << Utility.ox_element(
26
+ "chr",
27
+ namespace: "m",
28
+ attributes: { "m:val": "." },
29
+ )
30
+ Utility.update_nodes(
31
+ acc_tag,
32
+ [
33
+ acc_pr_tag,
34
+ omml_parameter(parameter_one, tag_name: "e"),
35
+ ],
36
+ )
37
+ [acc_tag]
38
+ end
21
39
  end
22
40
  end
23
41
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("exp"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -21,6 +21,14 @@ module Plurimath
21
21
  ],
22
22
  )
23
23
  end
24
+
25
+ def to_omml_without_math_tag
26
+ [
27
+ r_element("⌊"),
28
+ omml_value,
29
+ r_element("⌋"),
30
+ ]
31
+ end
24
32
  end
25
33
  end
26
34
  end
@@ -22,9 +22,7 @@ module Plurimath
22
22
  end
23
23
 
24
24
  def to_omml_without_math_tag
25
- r_tag = Utility.ox_element("r", namespace: "m")
26
- Utility.update_nodes(r_tag, parameter_one&.insert_t_tag)
27
- [r_tag]
25
+ Array(parameter_one&.insert_t_tag)
28
26
  end
29
27
 
30
28
  def to_html
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("gcd"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("glb"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -22,6 +22,19 @@ module Plurimath
22
22
  def validate_function_formula
23
23
  false
24
24
  end
25
+
26
+ def to_omml_without_math_tag
27
+ acc_tag = Utility.ox_element("acc", namespace: "m")
28
+ acc_pr_tag = Utility.ox_element("accPr", namespace: "m")
29
+ acc_pr_tag << (Utility.ox_element("chr", namespace: "m", attributes: { "m:val": "̂" }))
30
+ me = Utility.ox_element("e", namespace: "m")
31
+ Utility.update_nodes(me, omml_value)
32
+ Utility.update_nodes(
33
+ acc_tag,
34
+ [acc_pr_tag, me],
35
+ )
36
+ [acc_tag]
37
+ end
25
38
  end
26
39
  end
27
40
  end
@@ -6,6 +6,9 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Hom < UnaryFunction
9
+ def to_omml_without_math_tag
10
+ [r_element("hom"), omml_value]
11
+ end
9
12
  end
10
13
  end
11
14
  end
@@ -14,23 +14,24 @@ module Plurimath
14
14
 
15
15
  def to_mathml_without_math_tag
16
16
  first_value = Utility.ox_element("mo") << class_name
17
- if parameter_one || parameter_two
18
- value_array = [first_value]
19
- value_array << parameter_one&.to_mathml_without_math_tag
20
- value_array << parameter_two&.to_mathml_without_math_tag
21
- tag_name = if parameter_two && parameter_one
22
- "underover"
23
- else
24
- parameter_one ? "under" : "over"
25
- end
26
- munderover_tag = Utility.ox_element("m#{tag_name}")
27
- Utility.update_nodes(
28
- munderover_tag,
29
- value_array,
30
- )
31
- else
32
- first_value
33
- end
17
+ return first_value unless all_values_exist?
18
+
19
+ value_array = [first_value]
20
+ value_array << parameter_one&.to_mathml_without_math_tag
21
+ value_array << parameter_two&.to_mathml_without_math_tag
22
+ tag_name = if parameter_two && parameter_one
23
+ "underover"
24
+ else
25
+ parameter_one ? "under" : "over"
26
+ end
27
+ Utility.update_nodes(
28
+ Utility.ox_element("m#{tag_name}"),
29
+ value_array,
30
+ )
31
+ end
32
+
33
+ def to_omml_without_math_tag
34
+ underover
34
35
  end
35
36
  end
36
37
  end
@@ -13,22 +13,22 @@ module Plurimath
13
13
  end
14
14
 
15
15
  def to_latex
16
- first_value = "_#{latex_wrapped(parameter_one)}" if parameter_one
17
- second_value = "^#{latex_wrapped(parameter_two)}" if parameter_two
16
+ first_value = "_{#{parameter_one.to_latex}}" if parameter_one
17
+ second_value = "^{#{parameter_two.to_latex}}" if parameter_two
18
18
  "\\#{class_name}#{first_value}#{second_value} #{parameter_three&.to_latex}".strip
19
19
  end
20
20
 
21
21
  def to_mathml_without_math_tag
22
+ base_element = (Utility.ox_element("mo") << invert_unicode_symbols.to_s)
23
+ return base_element unless all_values_exist?
24
+
22
25
  msubsup_tag = Utility.ox_element("msubsup")
23
- mo_tag = Utility.ox_element("mo") << invert_unicode_symbols.to_s
24
- first_value = parameter_one&.to_mathml_without_math_tag if parameter_one
25
- second_value = parameter_two&.to_mathml_without_math_tag if parameter_two
26
26
  Utility.update_nodes(
27
27
  msubsup_tag,
28
28
  [
29
- mo_tag,
30
- first_value,
31
- second_value,
29
+ base_element,
30
+ validate_mathml_tag(parameter_one),
31
+ validate_mathml_tag(parameter_two),
32
32
  ],
33
33
  )
34
34
  return msubsup_tag if parameter_three.nil?
@@ -6,6 +6,9 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Ker < UnaryFunction
9
+ def to_omml_without_math_tag
10
+ [r_element("ker"), omml_value]
11
+ end
9
12
  end
10
13
  end
11
14
  end
@@ -6,6 +6,9 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Lcm < UnaryFunction
9
+ def to_omml_without_math_tag
10
+ [r_element("lcm"), omml_value]
11
+ end
9
12
  end
10
13
  end
11
14
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("lg"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -40,11 +40,7 @@ module Plurimath
40
40
  end
41
41
 
42
42
  def to_omml_without_math_tag
43
- lim = Symbol.new("lim")
44
- overset = Overset.new(lim, parameter_two)
45
- return overset unless parameter_one
46
-
47
- Underset.new(overset, parameter_one)&.to_omml_without_math_tag
43
+ underover
48
44
  end
49
45
  end
50
46
  end
@@ -6,6 +6,9 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Liminf < UnaryFunction
9
+ def to_omml_without_math_tag
10
+ [r_element("liminf"), omml_value]
11
+ end
9
12
  end
10
13
  end
11
14
  end
@@ -6,6 +6,9 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Limsup < UnaryFunction
9
+ def to_omml_without_math_tag
10
+ [r_element("limsup"), omml_value]
11
+ end
9
12
  end
10
13
  end
11
14
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("ln"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -6,6 +6,9 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Longdiv < UnaryFunction
9
+ def to_omml_without_math_tag
10
+ omml_value
11
+ end
9
12
  end
10
13
  end
11
14
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("lub"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -9,6 +9,10 @@ module Plurimath
9
9
  def validate_function_formula
10
10
  false
11
11
  end
12
+
13
+ def to_omml_without_math_tag
14
+ [r_element("max"), omml_value]
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -30,13 +30,11 @@ module Plurimath
30
30
  borderbox = Utility.ox_element("borderBox", namespace: "m")
31
31
  borderpr = Utility.ox_element("borderBoxPr", namespace: "m")
32
32
  borderpr << Utility.pr_element("ctrl", true, namespace: "m")
33
- me = Utility.ox_element("e", namespace: "m")
34
- Utility.update_nodes(me, Array(parameter_two.to_omml_without_math_tag)) if parameter_two
35
33
  Utility.update_nodes(
36
34
  borderbox,
37
35
  [
38
36
  borderpr,
39
- me,
37
+ omml_parameter(parameter_two, tag_name: "e"),
40
38
  ],
41
39
  )
42
40
  [borderbox]
@@ -6,6 +6,7 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Merror < BinaryFunction
9
+ def to_omml_without_math_tag; end
9
10
  end
10
11
  end
11
12
  end