plurimath 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plurimath/asciimath/constants.rb +1 -1
- data/lib/plurimath/math/function/abs.rb +8 -0
- data/lib/plurimath/math/function/ceil.rb +10 -0
- data/lib/plurimath/math/function/ddot.rb +7 -0
- data/lib/plurimath/math/function/unary_function.rb +4 -4
- 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: 8e3c4ae1ed317bae5f3e0a651d5c8cfc853d9eee27c77b2c99b2f676007d503a
|
4
|
+
data.tar.gz: a47ef6022826a3d08b053644308b8089ab6c095036445d3b8792cc9f88f2818c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d55ccef97532823305e04b20228e7b4fcc4df440d996f374378231affd5f41a02d8944024d463d68e589f098d26c70cf9271c58ba6787d0043b7d4fdaa8ad5aa
|
7
|
+
data.tar.gz: 74efb52bf8b213e0f2c83c565fe897d955f7a0febd9e6f961fc38e57e6f40ee2416435207f8cd6e7744fc487d078e1cafc181f7c753a09f8081858a58b2ace1f
|
@@ -6,6 +6,14 @@ module Plurimath
|
|
6
6
|
module Math
|
7
7
|
module Function
|
8
8
|
class Abs < UnaryFunction
|
9
|
+
def to_mathml_without_math_tag
|
10
|
+
symbol = Utility.ox_element("mo") << "|"
|
11
|
+
first_value = mathml_value&.insert(0, symbol)
|
12
|
+
Utility.update_nodes(
|
13
|
+
Utility.ox_element("mrow"),
|
14
|
+
first_value << symbol,
|
15
|
+
)
|
16
|
+
end
|
9
17
|
end
|
10
18
|
end
|
11
19
|
end
|
@@ -9,6 +9,16 @@ module Plurimath
|
|
9
9
|
def to_latex
|
10
10
|
"{\\lceil #{latex_value} \\rceil}"
|
11
11
|
end
|
12
|
+
|
13
|
+
def to_mathml_without_math_tag
|
14
|
+
left_value = Utility.ox_element("mo") << "⌈"
|
15
|
+
first_value = mathml_value&.insert(0, left_value)
|
16
|
+
right_value = Utility.ox_element("mo") << "⌉"
|
17
|
+
Utility.update_nodes(
|
18
|
+
Utility.ox_element("mrow"),
|
19
|
+
first_value << right_value,
|
20
|
+
)
|
21
|
+
end
|
12
22
|
end
|
13
23
|
end
|
14
24
|
end
|
@@ -6,6 +6,13 @@ module Plurimath
|
|
6
6
|
module Math
|
7
7
|
module Function
|
8
8
|
class Ddot < UnaryFunction
|
9
|
+
def to_mathml_without_math_tag
|
10
|
+
second_value = Utility.ox_element("mo") << ".."
|
11
|
+
Utility.update_nodes(
|
12
|
+
Utility.ox_element("mover", attributes: { accent: "true" }),
|
13
|
+
mathml_value << second_value,
|
14
|
+
)
|
15
|
+
end
|
9
16
|
end
|
10
17
|
end
|
11
18
|
end
|
@@ -103,12 +103,12 @@ module Plurimath
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def omml_value
|
106
|
-
if parameter_one
|
107
|
-
return parameter_one
|
106
|
+
if parameter_one&.is_a?(Array)
|
107
|
+
return parameter_one&.compact.map(&:to_omml_without_math_tag)
|
108
108
|
end
|
109
109
|
|
110
|
-
first_value = parameter_one
|
111
|
-
if parameter_one
|
110
|
+
first_value = parameter_one&.to_omml_without_math_tag
|
111
|
+
if parameter_one&.is_a?(Symbol)
|
112
112
|
first_value = Utility.ox_element("t", namespace: "m") << first_value
|
113
113
|
end
|
114
114
|
Array(first_value)
|
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.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|