plurimath 0.11.10 → 0.11.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/plurimath/math/function/binary_function.rb +3 -4
- data/lib/plurimath/math/function/cancel.rb +8 -1
- data/lib/plurimath/math/function/ddot.rb +1 -1
- data/lib/plurimath/math/function/dot.rb +1 -1
- data/lib/plurimath/math/function/hat.rb +2 -2
- data/lib/plurimath/math/function/obrace.rb +1 -1
- data/lib/plurimath/math/function/overleftrightarrow.rb +1 -1
- data/lib/plurimath/math/function/overset.rb +5 -8
- data/lib/plurimath/math/function/ternary_function.rb +3 -4
- data/lib/plurimath/math/function/tilde.rb +1 -1
- data/lib/plurimath/math/function/ubrace.rb +1 -1
- data/lib/plurimath/math/function/ul.rb +1 -1
- data/lib/plurimath/math/function/underset.rb +3 -3
- data/lib/plurimath/math/function/vec.rb +1 -1
- data/lib/plurimath/math/symbols/bigodot.rb +1 -1
- data/lib/plurimath/math/symbols/bigoplus.rb +1 -1
- data/lib/plurimath/math/symbols/bigotimes.rb +1 -1
- data/lib/plurimath/math/symbols/bigsqcup.rb +1 -1
- data/lib/plurimath/math/symbols/biguplus.rb +1 -1
- data/lib/plurimath/math/symbols/bigwedge.rb +1 -1
- data/lib/plurimath/math/symbols/coprod.rb +1 -1
- data/lib/plurimath/omml/translator.rb +9 -7
- data/lib/plurimath/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0bdd1dc4754cef478b4fbc48be08d8b4355d3c1e7efba1f4d30060e022daa04e
|
|
4
|
+
data.tar.gz: 8c1a40edf9ae2853b16f28b64d3c61510486b4aad50f8d7367f21053df5be775
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92cf5add4b7acff47121e6a1557fc602f64ef286e57b0611397fe843f5e203722bc65b3eaa489e269aff63a8fb03cfc9a7595f9f9ba899c8cfd9eafb6093d408
|
|
7
|
+
data.tar.gz: e69b68ba523da69b9cac43912d52665f0609de0906928bdd59f5a9711971747ef1083a22f84ccf6e269428dd8b65e2d470c3d2cb51f49ba0c69256164f610e04
|
|
@@ -182,15 +182,14 @@ options:)
|
|
|
182
182
|
options: options)
|
|
183
183
|
end
|
|
184
184
|
|
|
185
|
-
#
|
|
186
|
-
|
|
187
|
-
overset = Overset.new(first_value, parameter_two)
|
|
185
|
+
# Overset and Underset take script before base; OMML stores base in m:e.
|
|
186
|
+
overset = Overset.new(parameter_two, first_value)
|
|
188
187
|
unless parameter_one
|
|
189
188
|
return Array(overset.to_omml_without_math_tag(display_style,
|
|
190
189
|
options: options))
|
|
191
190
|
end
|
|
192
191
|
|
|
193
|
-
underset = Underset.new(
|
|
192
|
+
underset = Underset.new(parameter_one, overset)
|
|
194
193
|
Array(underset.to_omml_without_math_tag(display_style,
|
|
195
194
|
options: options))
|
|
196
195
|
end
|
|
@@ -15,7 +15,14 @@ module Plurimath
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def to_omml_without_math_tag(display_style, options:)
|
|
18
|
-
|
|
18
|
+
value = parameter_one.is_a?(Array) ? parameter_one.compact : parameter_one
|
|
19
|
+
return [] if value.nil? || (value.is_a?(Array) && value.empty?)
|
|
20
|
+
|
|
21
|
+
nodes = Menclose.new("updiagonalstrike", value)
|
|
22
|
+
.to_omml_without_math_tag(display_style, options: options)
|
|
23
|
+
return [] if nodes.first.nodes.last.nodes.empty?
|
|
24
|
+
|
|
25
|
+
nodes
|
|
19
26
|
end
|
|
20
27
|
|
|
21
28
|
def to_unicodemath(options:)
|
|
@@ -23,7 +23,7 @@ module Plurimath
|
|
|
23
23
|
return r_element("..", rpr_tag: false) unless parameter_one
|
|
24
24
|
|
|
25
25
|
symbol = Symbols::Symbol.new("..")
|
|
26
|
-
Overset.new(
|
|
26
|
+
Overset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
27
27
|
options: options)
|
|
28
28
|
end
|
|
29
29
|
|
|
@@ -39,7 +39,7 @@ module Plurimath
|
|
|
39
39
|
acc_tag(display_style, options: options)
|
|
40
40
|
else
|
|
41
41
|
symbol = Symbols::Symbol.new(".")
|
|
42
|
-
Overset.new(
|
|
42
|
+
Overset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
43
43
|
options: options)
|
|
44
44
|
end
|
|
45
45
|
end
|
|
@@ -52,7 +52,7 @@ module Plurimath
|
|
|
52
52
|
accent_tag(display_style, options: options)
|
|
53
53
|
else
|
|
54
54
|
symbol = Symbols::Symbol.new("̂") unless hide_function_name
|
|
55
|
-
Overset.new(
|
|
55
|
+
Overset.new(symbol, parameter_one).to_omml_without_math_tag(
|
|
56
56
|
display_style, options: options
|
|
57
57
|
)
|
|
58
58
|
end
|
|
@@ -66,7 +66,7 @@ module Plurimath
|
|
|
66
66
|
parameter_one&.line_breaking(obj)
|
|
67
67
|
if obj.value_exist?
|
|
68
68
|
obj.update(
|
|
69
|
-
Overset.new(Utility.filter_values(obj.value)
|
|
69
|
+
Overset.new(nil, Utility.filter_values(obj.value)),
|
|
70
70
|
)
|
|
71
71
|
end
|
|
72
72
|
end
|
|
@@ -48,7 +48,7 @@ module Plurimath
|
|
|
48
48
|
acc_tag(display_style, options: options)
|
|
49
49
|
else
|
|
50
50
|
symbol = Symbols::Symbol.new("⏞")
|
|
51
|
-
Overset.new(
|
|
51
|
+
Overset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
52
52
|
options: options)
|
|
53
53
|
end
|
|
54
54
|
end
|
|
@@ -35,7 +35,7 @@ module Plurimath
|
|
|
35
35
|
acc_tag(display_style, options: options)
|
|
36
36
|
else
|
|
37
37
|
symbol = Symbols::Symbol.new("\u20e1")
|
|
38
|
-
Overset.new(
|
|
38
|
+
Overset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
39
39
|
options: options)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -8,8 +8,8 @@ module Plurimath
|
|
|
8
8
|
|
|
9
9
|
FUNCTION = {
|
|
10
10
|
name: "overset",
|
|
11
|
-
first_value: "
|
|
12
|
-
second_value: "
|
|
11
|
+
first_value: "supscript",
|
|
12
|
+
second_value: "base",
|
|
13
13
|
}.freeze
|
|
14
14
|
|
|
15
15
|
def initialize(
|
|
@@ -34,7 +34,7 @@ module Plurimath
|
|
|
34
34
|
|
|
35
35
|
def to_omml_without_math_tag(display_style, options:)
|
|
36
36
|
if !display_style
|
|
37
|
-
power = Power.new(
|
|
37
|
+
power = Power.new(parameter_two, parameter_one)
|
|
38
38
|
return power.to_omml_without_math_tag(display_style,
|
|
39
39
|
options: options)
|
|
40
40
|
end
|
|
@@ -46,12 +46,9 @@ module Plurimath
|
|
|
46
46
|
limupp,
|
|
47
47
|
[
|
|
48
48
|
limupppr,
|
|
49
|
-
|
|
50
|
-
# formats; OMML uses this mapping to avoid remapping fields during
|
|
51
|
-
# MathML/UnicodeMath/OMML round-trips.
|
|
52
|
-
omml_parameter(parameter_one, display_style, tag_name: "e",
|
|
49
|
+
omml_parameter(parameter_two, display_style, tag_name: "e",
|
|
53
50
|
options: options),
|
|
54
|
-
omml_parameter(
|
|
51
|
+
omml_parameter(parameter_one, display_style, tag_name: "lim",
|
|
55
52
|
options: options),
|
|
56
53
|
],
|
|
57
54
|
)
|
|
@@ -241,15 +241,14 @@ options:)
|
|
|
241
241
|
end
|
|
242
242
|
|
|
243
243
|
def underover(display_style, options:)
|
|
244
|
-
#
|
|
245
|
-
|
|
246
|
-
overset = Overset.new(parameter_one, parameter_three)
|
|
244
|
+
# Overset and Underset take script before base; OMML stores base in m:e.
|
|
245
|
+
overset = Overset.new(parameter_three, parameter_one)
|
|
247
246
|
unless parameter_two
|
|
248
247
|
return overset.to_omml_without_math_tag(display_style,
|
|
249
248
|
options: options)
|
|
250
249
|
end
|
|
251
250
|
|
|
252
|
-
Underset.new(
|
|
251
|
+
Underset.new(parameter_two, overset)&.to_omml_without_math_tag(
|
|
253
252
|
display_style, options: options
|
|
254
253
|
)
|
|
255
254
|
end
|
|
@@ -28,7 +28,7 @@ module Plurimath
|
|
|
28
28
|
acc_tag(display_style, options: options)
|
|
29
29
|
else
|
|
30
30
|
symbol = Symbols::Symbol.new("~")
|
|
31
|
-
Overset.new(
|
|
31
|
+
Overset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
32
32
|
options: options)
|
|
33
33
|
end
|
|
34
34
|
end
|
|
@@ -53,7 +53,7 @@ module Plurimath
|
|
|
53
53
|
return r_element("⏟", rpr_tag: false) unless parameter_one
|
|
54
54
|
|
|
55
55
|
symbol = Symbols::Symbol.new("⏟")
|
|
56
|
-
Underset.new(
|
|
56
|
+
Underset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
57
57
|
options: options)
|
|
58
58
|
end
|
|
59
59
|
|
|
@@ -44,7 +44,7 @@ module Plurimath
|
|
|
44
44
|
groupchr_tag(display_style, options: options)
|
|
45
45
|
else
|
|
46
46
|
symbol = Symbols::Symbol.new("̲")
|
|
47
|
-
Underset.new(
|
|
47
|
+
Underset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
48
48
|
options: options)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
@@ -32,7 +32,7 @@ module Plurimath
|
|
|
32
32
|
|
|
33
33
|
def to_omml_without_math_tag(display_style, options:)
|
|
34
34
|
if !display_style
|
|
35
|
-
base = Base.new(
|
|
35
|
+
base = Base.new(parameter_two, parameter_one)
|
|
36
36
|
return base.to_omml_without_math_tag(display_style,
|
|
37
37
|
options: options)
|
|
38
38
|
end
|
|
@@ -48,9 +48,9 @@ module Plurimath
|
|
|
48
48
|
limlow,
|
|
49
49
|
[
|
|
50
50
|
limlowpr,
|
|
51
|
-
omml_parameter(
|
|
51
|
+
omml_parameter(parameter_two, display_style, tag_name: "e",
|
|
52
52
|
options: options),
|
|
53
|
-
omml_parameter(
|
|
53
|
+
omml_parameter(parameter_one, display_style, tag_name: "lim",
|
|
54
54
|
options: options),
|
|
55
55
|
],
|
|
56
56
|
)
|
|
@@ -35,7 +35,7 @@ module Plurimath
|
|
|
35
35
|
acc_tag(display_style, options: options)
|
|
36
36
|
else
|
|
37
37
|
symbol = Symbols::Symbol.new("→")
|
|
38
|
-
Overset.new(
|
|
38
|
+
Overset.new(symbol, parameter_one).to_omml_without_math_tag(true,
|
|
39
39
|
options: options)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
@@ -173,18 +173,19 @@ module Plurimath
|
|
|
173
173
|
)
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
-
#
|
|
177
|
-
#
|
|
178
|
-
#
|
|
176
|
+
# Overset and Underset take the script first and the base second;
|
|
177
|
+
# OMML stores the base in m:e and the script in m:lim.
|
|
178
|
+
# A named operator in m:lim is a script label, not an accent.
|
|
179
179
|
def upper_limit_to_plurimath(node)
|
|
180
180
|
base = omml_argument_value(node.e)
|
|
181
181
|
limit = omml_argument_value(node.lim)
|
|
182
182
|
|
|
183
|
-
if empty_unary_function?(limit)
|
|
183
|
+
if empty_unary_function?(limit) &&
|
|
184
|
+
!Mathml::Constants.named_function_word?(limit.class_name)
|
|
184
185
|
limit.parameter_one = base
|
|
185
186
|
limit
|
|
186
187
|
else
|
|
187
|
-
Math::Function::Overset.new(
|
|
188
|
+
Math::Function::Overset.new(limit, base)
|
|
188
189
|
end
|
|
189
190
|
end
|
|
190
191
|
|
|
@@ -192,11 +193,12 @@ module Plurimath
|
|
|
192
193
|
base = omml_argument_value(node.e)
|
|
193
194
|
limit = omml_argument_value(node.lim)
|
|
194
195
|
|
|
195
|
-
if empty_unary_function?(limit)
|
|
196
|
+
if empty_unary_function?(limit) &&
|
|
197
|
+
!Mathml::Constants.named_function_word?(limit.class_name)
|
|
196
198
|
limit.parameter_one = base
|
|
197
199
|
limit
|
|
198
200
|
else
|
|
199
|
-
Math::Function::Underset.new(
|
|
201
|
+
Math::Function::Underset.new(limit, base)
|
|
200
202
|
end
|
|
201
203
|
end
|
|
202
204
|
|
data/lib/plurimath/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: plurimath
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bigdecimal
|