plurimath 0.3.4 → 0.3.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b189635567597c62c87de4beda13072f0be78d12993bbf8fb88d5a62447c0d9
4
- data.tar.gz: 87960dc1944b7328585f44e8d8605dd5d94d00c2e29522ceebbf6e2f09936e18
3
+ metadata.gz: 18df410d2655f777a8bf6379ec49334cc4d595e73b100e61287e5c385674a7b3
4
+ data.tar.gz: ae5bcfd6527302f5811b80ab02d61c4f25027c9526720402467736d2d4ccdf10
5
5
  SHA512:
6
- metadata.gz: 4525b775b5ceb63822c1e4a0777604684b80b3c85403df64a8443d405a6e93bd3c8f354a905788558224f163caaf8a73eaca52f03f6042e409eae112f26d9805
7
- data.tar.gz: b41b71415e9908bdd5bade1be722f48155473e556b050ecaebf097a21aaec1b478f63a2d72f60ead47b1a972f2c3b13623e6eb4837d426b489b39e7952bf4e0f
6
+ metadata.gz: 671778813a9f27fc1911226f587c93ee156591abf54acba8f922dc620caa8fd13019c72ce40695a659ba8455745ddd007a19d6fc1444cafd1744946d97ae7f1d
7
+ data.tar.gz: 522d01abb0c1d7482fd3d1ff598891007540559f8031d9ad0f53379d9eac577c89e666f827225325df4a10c8ea504479fbb523c11e171cbd7cbc2b96000afaa1
@@ -6,11 +6,6 @@ module Plurimath
6
6
  module Math
7
7
  module Function
8
8
  class Fenced < TernaryFunction
9
- def initialize(parameter_one = nil, parameter_two = nil, parameter_three = nil)
10
- super
11
- circular_parens
12
- end
13
-
14
9
  def to_asciimath
15
10
  first_value = parameter_one ? parameter_one.to_asciimath : "("
16
11
  third_value = parameter_three ? parameter_three.to_asciimath : ")"
@@ -113,11 +108,6 @@ module Plurimath
113
108
 
114
109
  field&.value
115
110
  end
116
-
117
- def circular_parens
118
- parameter_one&.value = "&#x2329;" if Utility.symbol_value(parameter_one, "ᑕ")
119
- parameter_three&.value = "&#x232a;" if Utility.symbol_value(parameter_three, "ᑐ")
120
- end
121
111
  end
122
112
  end
123
113
  end
@@ -129,6 +129,7 @@ module Plurimath
129
129
  def mathml_attrs(column_strings)
130
130
  args = options&.dup&.reject { |arg| arg.to_s == "asterisk" }
131
131
  args[:columnlines] = column_strings.join(" ") if column_strings.include?("solid")
132
+ args[:columnalign] = "left" if close_paren&.include?(":}")
132
133
  args
133
134
  end
134
135
 
@@ -152,8 +153,11 @@ module Plurimath
152
153
  def latex_columnalign
153
154
  return "" unless Hash(options)[:asterisk]
154
155
 
155
- columnalign = Hash(value&.first&.parameter_one&.first&.parameter_two)[:columnalign]
156
- "[#{Utility::ALIGNMENT_LETTERS.invert[columnalign]}]"
156
+ "[#{Utility::ALIGNMENT_LETTERS.invert[Hash(td_hash)[:columnalign]]}]"
157
+ end
158
+
159
+ def td_hash
160
+ value&.first&.parameter_one&.first&.parameter_two
157
161
  end
158
162
 
159
163
  def environment
@@ -91,8 +91,6 @@ module Plurimath
91
91
  "&#x22a4;": "TT",
92
92
  "&#x22a2;": "|--",
93
93
  "&#x22a8;": "|==",
94
- "&#x2329;": "(:",
95
- "&#x232a;": ":)",
96
94
  "&#x2329;": "<<",
97
95
  "&#x232a;": ">>",
98
96
  "&#x222b;": "int",
@@ -395,6 +395,8 @@ module Plurimath
395
395
  value = case value
396
396
  when "ℒ" then "{:"
397
397
  when "ℛ" then ":}"
398
+ when "ᑕ" then "&#x2329;"
399
+ when "ᑐ" then "&#x232a;"
398
400
  else value
399
401
  end
400
402
  Math::Symbol.new(value)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plurimath
4
- VERSION = "0.3.4"
4
+ VERSION = "0.3.5"
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.3.4
4
+ version: 0.3.5
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-06-15 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet