plurimath 0.3.8 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/lib/plurimath/asciimath/transform.rb +17 -0
  3. data/lib/plurimath/math/core.rb +20 -4
  4. data/lib/plurimath/math/formula.rb +42 -25
  5. data/lib/plurimath/math/function/abs.rb +2 -2
  6. data/lib/plurimath/math/function/bar.rb +43 -12
  7. data/lib/plurimath/math/function/base.rb +3 -3
  8. data/lib/plurimath/math/function/binary_function.rb +21 -5
  9. data/lib/plurimath/math/function/cancel.rb +2 -2
  10. data/lib/plurimath/math/function/ceil.rb +7 -2
  11. data/lib/plurimath/math/function/color.rb +2 -2
  12. data/lib/plurimath/math/function/ddot.rb +10 -12
  13. data/lib/plurimath/math/function/deg.rb +2 -2
  14. data/lib/plurimath/math/function/det.rb +2 -2
  15. data/lib/plurimath/math/function/dim.rb +2 -2
  16. data/lib/plurimath/math/function/dot.rb +21 -4
  17. data/lib/plurimath/math/function/exp.rb +2 -2
  18. data/lib/plurimath/math/function/fenced.rb +2 -1
  19. data/lib/plurimath/math/function/floor.rb +2 -2
  20. data/lib/plurimath/math/function/font_style/bold-fraktur.rb +17 -0
  21. data/lib/plurimath/math/function/font_style/bold-italic.rb +17 -0
  22. data/lib/plurimath/math/function/font_style/bold-sans-serif.rb +17 -0
  23. data/lib/plurimath/math/function/font_style/bold-script.rb +17 -0
  24. data/lib/plurimath/math/function/font_style/bold.rb +4 -0
  25. data/lib/plurimath/math/function/font_style/double_struck.rb +4 -0
  26. data/lib/plurimath/math/function/font_style/fraktur.rb +4 -0
  27. data/lib/plurimath/math/function/font_style/italic.rb +4 -0
  28. data/lib/plurimath/math/function/font_style/monospace.rb +4 -0
  29. data/lib/plurimath/math/function/font_style/normal.rb +4 -0
  30. data/lib/plurimath/math/function/font_style/sans-serif-bold-italic.rb +17 -0
  31. data/lib/plurimath/math/function/font_style/sans-serif-italic.rb +17 -0
  32. data/lib/plurimath/math/function/font_style/sans-serif.rb +4 -0
  33. data/lib/plurimath/math/function/font_style/script.rb +4 -0
  34. data/lib/plurimath/math/function/font_style.rb +22 -4
  35. data/lib/plurimath/math/function/frac.rb +3 -3
  36. data/lib/plurimath/math/function/gcd.rb +2 -2
  37. data/lib/plurimath/math/function/glb.rb +2 -2
  38. data/lib/plurimath/math/function/hat.rb +37 -11
  39. data/lib/plurimath/math/function/hom.rb +2 -2
  40. data/lib/plurimath/math/function/inf.rb +3 -9
  41. data/lib/plurimath/math/function/int.rb +4 -4
  42. data/lib/plurimath/math/function/ker.rb +2 -2
  43. data/lib/plurimath/math/function/lcm.rb +2 -2
  44. data/lib/plurimath/math/function/left.rb +1 -1
  45. data/lib/plurimath/math/function/lg.rb +2 -2
  46. data/lib/plurimath/math/function/lim.rb +2 -8
  47. data/lib/plurimath/math/function/liminf.rb +2 -2
  48. data/lib/plurimath/math/function/limits.rb +4 -4
  49. data/lib/plurimath/math/function/limsup.rb +2 -2
  50. data/lib/plurimath/math/function/ln.rb +2 -2
  51. data/lib/plurimath/math/function/log.rb +5 -3
  52. data/lib/plurimath/math/function/longdiv.rb +2 -2
  53. data/lib/plurimath/math/function/lub.rb +2 -2
  54. data/lib/plurimath/math/function/max.rb +2 -2
  55. data/lib/plurimath/math/function/mbox.rb +2 -2
  56. data/lib/plurimath/math/function/menclose.rb +2 -2
  57. data/lib/plurimath/math/function/merror.rb +1 -1
  58. data/lib/plurimath/math/function/min.rb +2 -2
  59. data/lib/plurimath/math/function/mod.rb +3 -3
  60. data/lib/plurimath/math/function/msgroup.rb +2 -2
  61. data/lib/plurimath/math/function/msline.rb +2 -2
  62. data/lib/plurimath/math/function/multiscript.rb +4 -4
  63. data/lib/plurimath/math/function/norm.rb +2 -2
  64. data/lib/plurimath/math/function/obrace.rb +35 -28
  65. data/lib/plurimath/math/function/oint.rb +15 -16
  66. data/lib/plurimath/math/function/over.rb +3 -3
  67. data/lib/plurimath/math/function/overset.rb +8 -3
  68. data/lib/plurimath/math/function/power.rb +3 -3
  69. data/lib/plurimath/math/function/power_base.rb +10 -8
  70. data/lib/plurimath/math/function/prod.rb +8 -4
  71. data/lib/plurimath/math/function/right.rb +1 -1
  72. data/lib/plurimath/math/function/root.rb +3 -3
  73. data/lib/plurimath/math/function/rule.rb +1 -1
  74. data/lib/plurimath/math/function/scarries.rb +2 -2
  75. data/lib/plurimath/math/function/semantics.rb +2 -2
  76. data/lib/plurimath/math/function/sqrt.rb +2 -2
  77. data/lib/plurimath/math/function/stackrel.rb +3 -3
  78. data/lib/plurimath/math/function/substack.rb +3 -3
  79. data/lib/plurimath/math/function/sum.rb +22 -19
  80. data/lib/plurimath/math/function/sup.rb +2 -2
  81. data/lib/plurimath/math/function/table.rb +7 -11
  82. data/lib/plurimath/math/function/td.rb +2 -2
  83. data/lib/plurimath/math/function/ternary_function.rb +11 -0
  84. data/lib/plurimath/math/function/text.rb +6 -5
  85. data/lib/plurimath/math/function/tilde.rb +22 -4
  86. data/lib/plurimath/math/function/tr.rb +2 -2
  87. data/lib/plurimath/math/function/ubrace.rb +27 -23
  88. data/lib/plurimath/math/function/ul.rb +50 -20
  89. data/lib/plurimath/math/function/unary_function.rb +7 -5
  90. data/lib/plurimath/math/function/underover.rb +10 -8
  91. data/lib/plurimath/math/function/underset.rb +8 -3
  92. data/lib/plurimath/math/function/vec.rb +20 -5
  93. data/lib/plurimath/math/number.rb +6 -2
  94. data/lib/plurimath/math/symbol.rb +14 -2
  95. data/lib/plurimath/math.rb +4 -1
  96. data/lib/plurimath/mathml/constants.rb +9 -1
  97. data/lib/plurimath/mathml/parser.rb +4 -2
  98. data/lib/plurimath/mathml/transform.rb +51 -22
  99. data/lib/plurimath/omml/parser.rb +24 -1
  100. data/lib/plurimath/omml/transform.rb +43 -36
  101. data/lib/plurimath/utility.rb +114 -9
  102. data/lib/plurimath/version.rb +1 -1
  103. metadata +8 -2
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../font_style"
4
+
5
+ module Plurimath
6
+ module Math
7
+ module Function
8
+ class FontStyle
9
+ class BoldSansSerif < FontStyle
10
+ def to_omml_without_math_tag(display_style)
11
+ font_styles(display_style, sty: "b", scr: "sans-serif")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../font_style"
4
+
5
+ module Plurimath
6
+ module Math
7
+ module Function
8
+ class FontStyle
9
+ class BoldScript < FontStyle
10
+ def to_omml_without_math_tag(display_style)
11
+ font_styles(display_style, sty: "b", scr: "script")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, sty: "b")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, sty: nil, scr: "double-struck")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, scr: "fraktur")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, sty: "i")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, sty: nil, scr: "monospace")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, sty: "p")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../font_style"
4
+
5
+ module Plurimath
6
+ module Math
7
+ module Function
8
+ class FontStyle
9
+ class SansSerifBoldItalic < FontStyle
10
+ def to_omml_without_math_tag(display_style)
11
+ font_styles(display_style, sty: "bi", scr: "sans-serif")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../font_style"
4
+
5
+ module Plurimath
6
+ module Math
7
+ module Function
8
+ class FontStyle
9
+ class SansSerifItalic < FontStyle
10
+ def to_omml_without_math_tag(display_style)
11
+ font_styles(display_style, sty: "i", scr: "sans-serif")
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, sty: "p", scr: "sans-serif")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -29,6 +29,10 @@ module Plurimath
29
29
  [parameter_one&.to_mathml_without_math_tag],
30
30
  )
31
31
  end
32
+
33
+ def to_omml_without_math_tag(display_style)
34
+ font_styles(display_style, scr: "script")
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -21,10 +21,6 @@ module Plurimath
21
21
  )
22
22
  end
23
23
 
24
- def to_omml_without_math_tag
25
- Array(parameter_one&.insert_t_tag)
26
- end
27
-
28
24
  def to_html
29
25
  parameter_one&.to_html
30
26
  end
@@ -36,6 +32,28 @@ module Plurimath
36
32
  def validate_function_formula
37
33
  true
38
34
  end
35
+
36
+ def extract_class_from_text
37
+ parameter_one.parameter_one if parameter_one.is_a?(Text)
38
+ parameter_one.class_name
39
+ end
40
+
41
+ def extractable?
42
+ parameter_one.is_a?(Text)
43
+ end
44
+
45
+ def font_styles(display_style, sty: "p", scr: nil)
46
+ r_tag = Utility.ox_element("r", namespace: "m")
47
+ rpr_tag = Utility.ox_element("rPr", namespace: "m")
48
+ fonts = []
49
+ fonts << Utility.ox_element("scr", namespace: "m", attributes: { "m:val": scr }) if scr
50
+ fonts << Utility.ox_element("sty", namespace: "m", attributes: { "m:val": sty }) if sty
51
+ r_tag << Utility.update_nodes(rpr_tag, fonts)
52
+ Utility.update_nodes(
53
+ r_tag,
54
+ Array(parameter_one.font_style_t_tag(display_style)),
55
+ )
56
+ end
39
57
  end
40
58
  end
41
59
  end
@@ -31,7 +31,7 @@ module Plurimath
31
31
  "\\frac{#{first_value}}{#{two_value}}"
32
32
  end
33
33
 
34
- def to_omml_without_math_tag
34
+ def to_omml_without_math_tag(display_style)
35
35
  f_element = Utility.ox_element("f", namespace: "m")
36
36
  fpr_element = Utility.ox_element("fPr", namespace: "m")
37
37
  fpr_element << Utility.pr_element("ctrl", true, namespace: "m")
@@ -39,8 +39,8 @@ module Plurimath
39
39
  f_element,
40
40
  [
41
41
  fpr_element,
42
- omml_parameter(parameter_one, tag_name: "num"),
43
- omml_parameter(parameter_two, tag_name: "den"),
42
+ omml_parameter(parameter_one, display_style, tag_name: "num"),
43
+ omml_parameter(parameter_two, display_style, tag_name: "den"),
44
44
  ],
45
45
  )
46
46
  [f_element]
@@ -10,8 +10,8 @@ module Plurimath
10
10
  false
11
11
  end
12
12
 
13
- def to_omml_without_math_tag
14
- [r_element("gcd"), omml_value]
13
+ def to_omml_without_math_tag(display_style)
14
+ [r_element("gcd", rpr_tag: false), omml_value(display_style)]
15
15
  end
16
16
  end
17
17
  end
@@ -10,8 +10,8 @@ module Plurimath
10
10
  false
11
11
  end
12
12
 
13
- def to_omml_without_math_tag
14
- [r_element("glb"), omml_value]
13
+ def to_omml_without_math_tag(display_style)
14
+ [r_element("glb", rpr_tag: false), omml_value(display_style)]
15
15
  end
16
16
  end
17
17
  end
@@ -1,20 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "unary_function"
3
+ require_relative "binary_function"
4
4
 
5
5
  module Plurimath
6
6
  module Math
7
7
  module Function
8
- class Hat < UnaryFunction
8
+ class Hat < BinaryFunction
9
+ def to_asciimath
10
+ first_value = "(#{parameter_one.to_asciimath})" if parameter_one
11
+ "hat#{first_value}"
12
+ end
13
+
14
+ def to_latex
15
+ first_value = "{#{parameter_one.to_latex}}" if parameter_one
16
+ "\\hat#{first_value}"
17
+ end
18
+
9
19
  def to_mathml_without_math_tag
10
- mover_tag = Utility.ox_element("mover")
11
- first_value = parameter_one&.to_mathml_without_math_tag
12
- second_value = (Utility.ox_element("mo") << "^")
20
+ mo_tag = (Utility.ox_element("mo") << "^")
21
+ return mo_tag unless parameter_one
22
+
23
+ mover_tag = Utility.ox_element("mover")
24
+ mover_tag.attributes.merge!(parameter_two) if parameter_two && !parameter_two.empty?
13
25
  Utility.update_nodes(
14
26
  mover_tag,
15
27
  [
16
- first_value,
17
- second_value,
28
+ parameter_one&.to_mathml_without_math_tag,
29
+ mo_tag,
18
30
  ],
19
31
  )
20
32
  end
@@ -23,15 +35,29 @@ module Plurimath
23
35
  false
24
36
  end
25
37
 
26
- def to_omml_without_math_tag
38
+ def to_omml_without_math_tag(display_style)
39
+ return r_element("^", rpr_tag: false) unless all_values_exist?
40
+
41
+ if parameter_two && parameter_two[:accent]
42
+ accent_tag(display_style)
43
+ else
44
+ symbol = Symbol.new("&#x302;")
45
+ Overset.new(parameter_one, symbol).to_omml_without_math_tag(true)
46
+ end
47
+ end
48
+
49
+ protected
50
+
51
+ def accent_tag(display_style)
27
52
  acc_tag = Utility.ox_element("acc", namespace: "m")
28
53
  acc_pr_tag = Utility.ox_element("accPr", namespace: "m")
29
54
  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
55
  Utility.update_nodes(
33
56
  acc_tag,
34
- [acc_pr_tag, me],
57
+ [
58
+ acc_pr_tag,
59
+ omml_parameter(parameter_one, display_style, tag_name: "e", namespace: "m"),
60
+ ],
35
61
  )
36
62
  [acc_tag]
37
63
  end
@@ -6,8 +6,8 @@ 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]
9
+ def to_omml_without_math_tag(display_style)
10
+ [r_element("hom", rpr_tag: false), omml_value(display_style)]
11
11
  end
12
12
  end
13
13
  end
@@ -14,7 +14,7 @@ module Plurimath
14
14
 
15
15
  def to_mathml_without_math_tag
16
16
  first_value = Utility.ox_element("mo") << class_name
17
- return first_value if all_values_exist?
17
+ return first_value unless all_values_exist?
18
18
 
19
19
  value_array = [first_value]
20
20
  value_array << parameter_one&.to_mathml_without_math_tag
@@ -30,14 +30,8 @@ module Plurimath
30
30
  )
31
31
  end
32
32
 
33
- def to_omml_without_math_tag
34
- return r_element("inf", rpr_tag: false) unless all_values_exist?
35
-
36
- inf = Symbol.new("inf")
37
- overset = Overset.new(inf, parameter_two)
38
- return Array(overset.to_omml_without_math_tag) unless parameter_one
39
-
40
- Array(Underset.new(overset, parameter_one)&.to_omml_without_math_tag)
33
+ def to_omml_without_math_tag(display_style)
34
+ underover(display_style)
41
35
  end
42
36
  end
43
37
  end
@@ -42,16 +42,16 @@ module Plurimath
42
42
  )
43
43
  end
44
44
 
45
- def to_omml_without_math_tag
45
+ def to_omml_without_math_tag(display_style)
46
46
  if all_values_exist?
47
47
  nary = Utility.ox_element("nary", namespace: "m")
48
48
  Utility.update_nodes(
49
49
  nary,
50
50
  [
51
51
  narypr("∫", function_type: "subSup"),
52
- omml_parameter(parameter_one, tag_name: "sub"),
53
- omml_parameter(parameter_two, tag_name: "sup"),
54
- omml_parameter(parameter_three, tag_name: "e"),
52
+ omml_parameter(parameter_one, display_style, tag_name: "sub"),
53
+ omml_parameter(parameter_two, display_style, tag_name: "sup"),
54
+ omml_parameter(parameter_three, display_style, tag_name: "e"),
55
55
  ],
56
56
  )
57
57
  [nary]
@@ -6,8 +6,8 @@ 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]
9
+ def to_omml_without_math_tag(display_style)
10
+ [r_element("ker", rpr_tag: false), omml_value(display_style)]
11
11
  end
12
12
  end
13
13
  end
@@ -6,8 +6,8 @@ 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]
9
+ def to_omml_without_math_tag(display_style)
10
+ [r_element("lcm", rpr_tag: false), omml_value(display_style)]
11
11
  end
12
12
  end
13
13
  end
@@ -16,7 +16,7 @@ module Plurimath
16
16
  mo
17
17
  end
18
18
 
19
- def to_omml_without_math_tag
19
+ def to_omml_without_math_tag(display_style)
20
20
  mr = Utility.ox_element("m:r")
21
21
  if parameter_one
22
22
  mt = Utility.ox_element("m:t")
@@ -10,8 +10,8 @@ module Plurimath
10
10
  false
11
11
  end
12
12
 
13
- def to_omml_without_math_tag
14
- [r_element("lg"), omml_value]
13
+ def to_omml_without_math_tag(display_style)
14
+ [r_element("lg", rpr_tag: false), omml_value(display_style)]
15
15
  end
16
16
  end
17
17
  end
@@ -39,14 +39,8 @@ module Plurimath
39
39
  end
40
40
  end
41
41
 
42
- def to_omml_without_math_tag
43
- return r_element("lim", rpr_tag: false) unless all_values_exist?
44
-
45
- lim = Symbol.new("lim")
46
- overset = Overset.new(lim, parameter_two)
47
- return overset.to_omml_without_math_tag unless parameter_one
48
-
49
- Underset.new(overset, parameter_one)&.to_omml_without_math_tag
42
+ def to_omml_without_math_tag(display_style)
43
+ underover(display_style)
50
44
  end
51
45
  end
52
46
  end
@@ -6,8 +6,8 @@ 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]
9
+ def to_omml_without_math_tag(display_style)
10
+ [r_element("liminf", rpr_tag: false), omml_value(display_style)]
11
11
  end
12
12
  end
13
13
  end
@@ -22,11 +22,11 @@ module Plurimath
22
22
  "#{first_value}\\#{class_name}_#{second_value}^#{third_value}"
23
23
  end
24
24
 
25
- def to_omml_without_math_tag
25
+ def to_omml_without_math_tag(display_style)
26
26
  value_array = []
27
- value_array << parameter_one.insert_t_tag if parameter_one
28
- value_array << parameter_two.insert_t_tag if parameter_two
29
- value_array << parameter_three.insert_t_tag if parameter_three
27
+ value_array << parameter_one.insert_t_tag(display_style) if parameter_one
28
+ value_array << parameter_two.insert_t_tag(display_style) if parameter_two
29
+ value_array << parameter_three.insert_t_tag(display_style) if parameter_three
30
30
  value_array
31
31
  end
32
32
  end
@@ -6,8 +6,8 @@ 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]
9
+ def to_omml_without_math_tag(display_style)
10
+ [r_element("limsup", rpr_tag: false), omml_value(display_style)]
11
11
  end
12
12
  end
13
13
  end
@@ -10,8 +10,8 @@ module Plurimath
10
10
  false
11
11
  end
12
12
 
13
- def to_omml_without_math_tag
14
- [r_element("ln"), omml_value]
13
+ def to_omml_without_math_tag(display_style)
14
+ [r_element("ln", rpr_tag: false), omml_value(display_style)]
15
15
  end
16
16
  end
17
17
  end
@@ -24,7 +24,9 @@ module Plurimath
24
24
  "<i>log</i>#{first_value}#{second_value}"
25
25
  end
26
26
 
27
- def to_omml_without_math_tag
27
+ def to_omml_without_math_tag(display_style)
28
+ return r_element("log", rpr_tag: false) unless all_values_exist?
29
+
28
30
  ssubsup = Utility.ox_element("sSubSup", namespace: "m")
29
31
  ssubsuppr = Utility.ox_element("sSubSupPr", namespace: "m")
30
32
  ssubsuppr << hide_tags(
@@ -35,8 +37,8 @@ module Plurimath
35
37
  [
36
38
  ssubsuppr,
37
39
  e_parameter,
38
- omml_parameter(parameter_one, tag_name: "sub"),
39
- omml_parameter(parameter_two, tag_name: "sup"),
40
+ omml_parameter(parameter_one, display_style, tag_name: "sub"),
41
+ omml_parameter(parameter_two, display_style, tag_name: "sup"),
40
42
  ],
41
43
  )
42
44
  [ssubsup]
@@ -6,8 +6,8 @@ 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
9
+ def to_omml_without_math_tag(display_style)
10
+ omml_value(display_style)
11
11
  end
12
12
  end
13
13
  end
@@ -10,8 +10,8 @@ module Plurimath
10
10
  false
11
11
  end
12
12
 
13
- def to_omml_without_math_tag
14
- [r_element("lub"), omml_value]
13
+ def to_omml_without_math_tag(display_style)
14
+ [r_element("lub", rpr_tag: false), omml_value(display_style)]
15
15
  end
16
16
  end
17
17
  end
@@ -10,8 +10,8 @@ module Plurimath
10
10
  false
11
11
  end
12
12
 
13
- def to_omml_without_math_tag
14
- [r_element("max"), omml_value]
13
+ def to_omml_without_math_tag(display_style)
14
+ [r_element("max", rpr_tag: false), omml_value(display_style)]
15
15
  end
16
16
  end
17
17
  end
@@ -20,8 +20,8 @@ module Plurimath
20
20
  parameter_one&.to_html
21
21
  end
22
22
 
23
- def to_omml_without_math_tag
24
- omml_value
23
+ def to_omml_without_math_tag(display_style)
24
+ omml_value(display_style)
25
25
  end
26
26
  end
27
27
  end
@@ -26,7 +26,7 @@ module Plurimath
26
26
  "<menclose notation=\"#{parameter_one}\">#{second_value}</menclose>"
27
27
  end
28
28
 
29
- def to_omml_without_math_tag
29
+ def to_omml_without_math_tag(display_style)
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")
@@ -34,7 +34,7 @@ module Plurimath
34
34
  borderbox,
35
35
  [
36
36
  borderpr,
37
- omml_parameter(parameter_two, tag_name: "e"),
37
+ omml_parameter(parameter_two, display_style, tag_name: "e"),
38
38
  ],
39
39
  )
40
40
  [borderbox]
@@ -6,7 +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
+ def to_omml_without_math_tag(display_style); end
10
10
  end
11
11
  end
12
12
  end
@@ -10,8 +10,8 @@ module Plurimath
10
10
  false
11
11
  end
12
12
 
13
- def to_omml_without_math_tag
14
- [r_element("min"), omml_value]
13
+ def to_omml_without_math_tag(display_style)
14
+ [r_element("min", rpr_tag: false), omml_value(display_style)]
15
15
  end
16
16
  end
17
17
  end
@@ -39,11 +39,11 @@ module Plurimath
39
39
  "#{first_value}<i>mod</i>#{second_value}"
40
40
  end
41
41
 
42
- def to_omml_without_math_tag
42
+ def to_omml_without_math_tag(display_style)
43
43
  values = []
44
- values << parameter_one.insert_t_tag if parameter_one
44
+ values << parameter_one.insert_t_tag(display_style) if parameter_one
45
45
  values << r_element("mod")
46
- values << parameter_two.insert_t_tag if parameter_two
46
+ values << parameter_two.insert_t_tag(display_style) if parameter_two
47
47
  values
48
48
  end
49
49
  end
@@ -21,8 +21,8 @@ module Plurimath
21
21
  )
22
22
  end
23
23
 
24
- def to_omml_without_math_tag
25
- omml_value
24
+ def to_omml_without_math_tag(display_style)
25
+ omml_value(display_style)
26
26
  end
27
27
 
28
28
  def to_html
@@ -6,8 +6,8 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Msline < UnaryFunction
9
- def to_omml_without_math_tag
10
- omml_value
9
+ def to_omml_without_math_tag(display_style)
10
+ omml_value(display_style)
11
11
  end
12
12
  end
13
13
  end