plurimath 0.3.9 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/lib/plurimath/math/core.rb +16 -4
  3. data/lib/plurimath/math/formula.rb +24 -20
  4. data/lib/plurimath/math/function/abs.rb +2 -2
  5. data/lib/plurimath/math/function/bar.rb +43 -12
  6. data/lib/plurimath/math/function/base.rb +3 -3
  7. data/lib/plurimath/math/function/binary_function.rb +16 -10
  8. data/lib/plurimath/math/function/cancel.rb +2 -2
  9. data/lib/plurimath/math/function/ceil.rb +7 -2
  10. data/lib/plurimath/math/function/color.rb +2 -2
  11. data/lib/plurimath/math/function/ddot.rb +10 -12
  12. data/lib/plurimath/math/function/deg.rb +2 -2
  13. data/lib/plurimath/math/function/det.rb +2 -2
  14. data/lib/plurimath/math/function/dim.rb +2 -2
  15. data/lib/plurimath/math/function/dot.rb +21 -4
  16. data/lib/plurimath/math/function/exp.rb +2 -2
  17. data/lib/plurimath/math/function/fenced.rb +2 -1
  18. data/lib/plurimath/math/function/floor.rb +2 -2
  19. data/lib/plurimath/math/function/font_style/bold-fraktur.rb +17 -0
  20. data/lib/plurimath/math/function/font_style/bold-italic.rb +17 -0
  21. data/lib/plurimath/math/function/font_style/bold-sans-serif.rb +17 -0
  22. data/lib/plurimath/math/function/font_style/bold-script.rb +17 -0
  23. data/lib/plurimath/math/function/font_style/bold.rb +4 -0
  24. data/lib/plurimath/math/function/font_style/double_struck.rb +4 -0
  25. data/lib/plurimath/math/function/font_style/fraktur.rb +4 -0
  26. data/lib/plurimath/math/function/font_style/italic.rb +4 -0
  27. data/lib/plurimath/math/function/font_style/monospace.rb +4 -0
  28. data/lib/plurimath/math/function/font_style/normal.rb +4 -0
  29. data/lib/plurimath/math/function/font_style/sans-serif-bold-italic.rb +17 -0
  30. data/lib/plurimath/math/function/font_style/sans-serif-italic.rb +17 -0
  31. data/lib/plurimath/math/function/font_style/sans-serif.rb +4 -0
  32. data/lib/plurimath/math/function/font_style/script.rb +4 -0
  33. data/lib/plurimath/math/function/font_style.rb +22 -4
  34. data/lib/plurimath/math/function/frac.rb +3 -3
  35. data/lib/plurimath/math/function/gcd.rb +2 -2
  36. data/lib/plurimath/math/function/glb.rb +2 -2
  37. data/lib/plurimath/math/function/hat.rb +37 -11
  38. data/lib/plurimath/math/function/hom.rb +2 -2
  39. data/lib/plurimath/math/function/inf.rb +2 -2
  40. data/lib/plurimath/math/function/int.rb +4 -4
  41. data/lib/plurimath/math/function/ker.rb +2 -2
  42. data/lib/plurimath/math/function/lcm.rb +2 -2
  43. data/lib/plurimath/math/function/left.rb +1 -1
  44. data/lib/plurimath/math/function/lg.rb +2 -2
  45. data/lib/plurimath/math/function/lim.rb +2 -2
  46. data/lib/plurimath/math/function/liminf.rb +2 -2
  47. data/lib/plurimath/math/function/limits.rb +4 -4
  48. data/lib/plurimath/math/function/limsup.rb +2 -2
  49. data/lib/plurimath/math/function/ln.rb +2 -2
  50. data/lib/plurimath/math/function/log.rb +5 -3
  51. data/lib/plurimath/math/function/longdiv.rb +2 -2
  52. data/lib/plurimath/math/function/lub.rb +2 -2
  53. data/lib/plurimath/math/function/max.rb +2 -2
  54. data/lib/plurimath/math/function/mbox.rb +2 -2
  55. data/lib/plurimath/math/function/menclose.rb +2 -2
  56. data/lib/plurimath/math/function/merror.rb +1 -1
  57. data/lib/plurimath/math/function/min.rb +2 -2
  58. data/lib/plurimath/math/function/mod.rb +3 -3
  59. data/lib/plurimath/math/function/msgroup.rb +2 -2
  60. data/lib/plurimath/math/function/msline.rb +2 -2
  61. data/lib/plurimath/math/function/multiscript.rb +4 -4
  62. data/lib/plurimath/math/function/norm.rb +2 -2
  63. data/lib/plurimath/math/function/obrace.rb +35 -28
  64. data/lib/plurimath/math/function/oint.rb +4 -4
  65. data/lib/plurimath/math/function/over.rb +3 -3
  66. data/lib/plurimath/math/function/overset.rb +8 -3
  67. data/lib/plurimath/math/function/power.rb +3 -3
  68. data/lib/plurimath/math/function/power_base.rb +8 -8
  69. data/lib/plurimath/math/function/prod.rb +4 -4
  70. data/lib/plurimath/math/function/right.rb +1 -1
  71. data/lib/plurimath/math/function/root.rb +3 -3
  72. data/lib/plurimath/math/function/rule.rb +1 -1
  73. data/lib/plurimath/math/function/scarries.rb +2 -2
  74. data/lib/plurimath/math/function/semantics.rb +2 -2
  75. data/lib/plurimath/math/function/sqrt.rb +2 -2
  76. data/lib/plurimath/math/function/stackrel.rb +3 -3
  77. data/lib/plurimath/math/function/substack.rb +3 -3
  78. data/lib/plurimath/math/function/sum.rb +14 -19
  79. data/lib/plurimath/math/function/sup.rb +2 -2
  80. data/lib/plurimath/math/function/table.rb +7 -7
  81. data/lib/plurimath/math/function/td.rb +2 -2
  82. data/lib/plurimath/math/function/ternary_function.rb +7 -3
  83. data/lib/plurimath/math/function/text.rb +6 -5
  84. data/lib/plurimath/math/function/tilde.rb +22 -4
  85. data/lib/plurimath/math/function/tr.rb +2 -2
  86. data/lib/plurimath/math/function/ubrace.rb +23 -23
  87. data/lib/plurimath/math/function/ul.rb +50 -20
  88. data/lib/plurimath/math/function/unary_function.rb +7 -5
  89. data/lib/plurimath/math/function/underover.rb +10 -5
  90. data/lib/plurimath/math/function/underset.rb +8 -3
  91. data/lib/plurimath/math/function/vec.rb +20 -5
  92. data/lib/plurimath/math/number.rb +6 -2
  93. data/lib/plurimath/math/symbol.rb +6 -2
  94. data/lib/plurimath/math.rb +1 -0
  95. data/lib/plurimath/mathml/constants.rb +9 -1
  96. data/lib/plurimath/mathml/parser.rb +3 -1
  97. data/lib/plurimath/mathml/transform.rb +51 -22
  98. data/lib/plurimath/omml/parser.rb +24 -1
  99. data/lib/plurimath/omml/transform.rb +43 -36
  100. data/lib/plurimath/utility.rb +114 -9
  101. data/lib/plurimath/version.rb +1 -1
  102. metadata +8 -2
@@ -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
@@ -30,8 +30,8 @@ module Plurimath
30
30
  )
31
31
  end
32
32
 
33
- def to_omml_without_math_tag
34
- underover
33
+ def to_omml_without_math_tag(display_style)
34
+ underover(display_style)
35
35
  end
36
36
  end
37
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,8 +39,8 @@ module Plurimath
39
39
  end
40
40
  end
41
41
 
42
- def to_omml_without_math_tag
43
- underover
42
+ def to_omml_without_math_tag(display_style)
43
+ underover(display_style)
44
44
  end
45
45
  end
46
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
@@ -5,16 +5,16 @@ module Plurimath
5
5
  module Math
6
6
  module Function
7
7
  class Multiscript < TernaryFunction
8
- def to_omml_without_math_tag
8
+ def to_omml_without_math_tag(display_style)
9
9
  pre_element = Utility.ox_element("sPre", namespace: "m")
10
10
  pr_element = Utility.ox_element("sPrePr", namespace: "m")
11
11
  Utility.update_nodes(
12
12
  pre_element,
13
13
  [
14
14
  pr_element << Utility.pr_element("ctrl", true, namespace: "m"),
15
- omml_parameter(parameter_two, tag_name: "sub"),
16
- omml_parameter(parameter_three, tag_name: "sup"),
17
- omml_parameter(parameter_one, tag_name: "e"),
15
+ omml_parameter(parameter_two, display_style, tag_name: "sub"),
16
+ omml_parameter(parameter_three, display_style, tag_name: "sup"),
17
+ omml_parameter(parameter_one, display_style, tag_name: "e"),
18
18
  ],
19
19
  )
20
20
  [pre_element]
@@ -27,10 +27,10 @@ module Plurimath
27
27
  )
28
28
  end
29
29
 
30
- def to_omml_without_math_tag
30
+ def to_omml_without_math_tag(display_style)
31
31
  [
32
32
  r_element("∥"),
33
- omml_value,
33
+ omml_value(display_style),
34
34
  r_element("∥"),
35
35
  ]
36
36
  end