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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c97fcf3901a7da18bbac329563b358490117e3ec3103f6c5c9e4e8ad7b5d3c8
4
- data.tar.gz: abe2849aa2d81cb246b2b703576c6ae0df283b323e27433a9af95d07c1dd9932
3
+ metadata.gz: 8e3c4ae1ed317bae5f3e0a651d5c8cfc853d9eee27c77b2c99b2f676007d503a
4
+ data.tar.gz: a47ef6022826a3d08b053644308b8089ab6c095036445d3b8792cc9f88f2818c
5
5
  SHA512:
6
- metadata.gz: 2ac0c52f647ba6ff70bbf2fd0d9af2a33df8176c287699e8e99aa3478eaa44fe9b8fabcb54d115de5116f6823f2cdcda0f53965bbde806f47b948f3ca5d2a81c
7
- data.tar.gz: ba854ed8ecd87cd3fb30e2c80508abfaa0d900a22f3492d531f0b592272d692d9886203db73d81da1dbe0b3402831c2164f8c32472d69926f8976f069eab3718
6
+ metadata.gz: d55ccef97532823305e04b20228e7b4fcc4df440d996f374378231affd5f41a02d8944024d463d68e589f098d26c70cf9271c58ba6787d0043b7d4fdaa8ad5aa
7
+ data.tar.gz: 74efb52bf8b213e0f2c83c565fe897d955f7a0febd9e6f961fc38e57e6f40ee2416435207f8cd6e7744fc487d078e1cafc181f7c753a09f8081858a58b2ace1f
@@ -197,7 +197,7 @@ module Plurimath
197
197
  neg: :"¬",
198
198
  not: :"¬",
199
199
  "*": :"⋅",
200
- "@": :"@",
200
+ "@": :"∘",
201
201
  "<": :"&#x3c;",
202
202
  ">": :"&#x3e;",
203
203
  "/": :"&#x2f;",
@@ -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") << "&#x2308;"
15
+ first_value = mathml_value&.insert(0, left_value)
16
+ right_value = Utility.ox_element("mo") << "&#x2309;"
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.is_a?(Array)
107
- return parameter_one.compact.map(&:to_omml_without_math_tag)
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.to_omml_without_math_tag
111
- if parameter_one.is_a?(Symbol)
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plurimath
4
- VERSION = "0.2.9"
4
+ VERSION = "0.3.0"
5
5
  end
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.2.9
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-19 00:00:00.000000000 Z
11
+ date: 2023-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet