plurimath 0.4.4 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/.rspec +3 -0
- data/.rspec-opal +11 -0
- data/Gemfile +3 -0
- data/Rakefile +11 -0
- data/lib/plurimath/asciimath/transform.rb +15 -0
- data/lib/plurimath/latex/constants.rb +3 -0
- data/lib/plurimath/latex/parse.rb +20 -11
- data/lib/plurimath/latex/transform.rb +24 -2
- data/lib/plurimath/math/core.rb +88 -0
- data/lib/plurimath/math/formula.rb +68 -24
- data/lib/plurimath/math/function/base.rb +8 -2
- data/lib/plurimath/math/function/binary_function.rb +36 -4
- data/lib/plurimath/math/function/color.rb +14 -0
- data/lib/plurimath/math/function/fenced.rb +27 -0
- data/lib/plurimath/math/function/floor.rb +1 -1
- data/lib/plurimath/math/function/font_style.rb +46 -0
- data/lib/plurimath/math/function/frac.rb +6 -0
- data/lib/plurimath/math/function/int.rb +7 -0
- data/lib/plurimath/math/function/left.rb +19 -1
- data/lib/plurimath/math/function/lim.rb +6 -0
- data/lib/plurimath/math/function/limits.rb +7 -0
- data/lib/plurimath/math/function/log.rb +6 -0
- data/lib/plurimath/math/function/menclose.rb +6 -0
- data/lib/plurimath/math/function/mod.rb +6 -0
- data/lib/plurimath/math/function/msgroup.rb +28 -0
- data/lib/plurimath/math/function/multiscript.rb +7 -0
- data/lib/plurimath/math/function/nary.rb +94 -0
- data/lib/plurimath/math/function/oint.rb +6 -0
- data/lib/plurimath/math/function/over.rb +6 -0
- data/lib/plurimath/math/function/overset.rb +6 -0
- data/lib/plurimath/math/function/power.rb +8 -2
- data/lib/plurimath/math/function/power_base.rb +10 -31
- data/lib/plurimath/math/function/prod.rb +19 -18
- data/lib/plurimath/math/function/right.rb +19 -1
- data/lib/plurimath/math/function/root.rb +6 -0
- data/lib/plurimath/math/function/rule.rb +7 -0
- data/lib/plurimath/math/function/semantics.rb +6 -0
- data/lib/plurimath/math/function/stackrel.rb +6 -0
- data/lib/plurimath/math/function/substack.rb +6 -0
- data/lib/plurimath/math/function/sum.rb +26 -25
- data/lib/plurimath/math/function/table.rb +52 -24
- data/lib/plurimath/math/function/td.rb +28 -0
- data/lib/plurimath/math/function/ternary_function.rb +44 -4
- data/lib/plurimath/math/function/text.rb +25 -3
- data/lib/plurimath/math/function/tr.rb +28 -0
- data/lib/plurimath/math/function/unary_function.rb +43 -3
- data/lib/plurimath/math/function/underover.rb +7 -55
- data/lib/plurimath/math/function/underset.rb +6 -0
- data/lib/plurimath/math/function/vec.rb +40 -0
- data/lib/plurimath/math/function.rb +7 -5
- data/lib/plurimath/math/number.rb +9 -5
- data/lib/plurimath/math/symbol.rb +13 -9
- data/lib/plurimath/math.rb +1 -3
- data/lib/plurimath/mathml/parser.rb +4 -4
- data/lib/plurimath/mathml/transform.rb +3 -4
- data/lib/plurimath/omml/parser.rb +19 -3
- data/lib/plurimath/omml/transform.rb +19 -14
- data/lib/plurimath/setup/oga.rb +5 -0
- data/lib/plurimath/setup/opal.rb.erb +8 -0
- data/lib/plurimath/setup/ox.rb +5 -0
- data/lib/plurimath/utility.rb +60 -34
- data/lib/plurimath/version.rb +1 -1
- data/lib/plurimath/xml_engine/oga.rb +246 -0
- data/lib/plurimath/xml_engine/ox.rb +29 -0
- data/lib/plurimath/xml_engine.rb +6 -0
- data/lib/plurimath.rb +12 -2
- metadata +11 -2
data/lib/plurimath.rb
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
1
|
|
3
2
|
require_relative "plurimath/version"
|
4
|
-
|
3
|
+
|
4
|
+
# Select an XML engine
|
5
|
+
if RUBY_ENGINE == 'opal'
|
6
|
+
require "plurimath/setup/oga"
|
7
|
+
require "plurimath/setup/opal"
|
8
|
+
elsif ENV['PLURIMATH_OGA']
|
9
|
+
require "plurimath/setup/oga"
|
10
|
+
else
|
11
|
+
require "plurimath/setup/ox"
|
12
|
+
end
|
13
|
+
|
14
|
+
require "plurimath/math"
|
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.6.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-
|
11
|
+
date: 2023-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|
@@ -49,6 +49,8 @@ files:
|
|
49
49
|
- ".github/workflows/release.yml"
|
50
50
|
- ".gitignore"
|
51
51
|
- ".hound.yml"
|
52
|
+
- ".rspec"
|
53
|
+
- ".rspec-opal"
|
52
54
|
- ".rubocop.yml"
|
53
55
|
- AsciiMath-Supported-Data.adoc
|
54
56
|
- CODE_OF_CONDUCT.md
|
@@ -146,6 +148,7 @@ files:
|
|
146
148
|
- lib/plurimath/math/function/msgroup.rb
|
147
149
|
- lib/plurimath/math/function/msline.rb
|
148
150
|
- lib/plurimath/math/function/multiscript.rb
|
151
|
+
- lib/plurimath/math/function/nary.rb
|
149
152
|
- lib/plurimath/math/function/norm.rb
|
150
153
|
- lib/plurimath/math/function/obrace.rb
|
151
154
|
- lib/plurimath/math/function/oint.rb
|
@@ -202,10 +205,16 @@ files:
|
|
202
205
|
- lib/plurimath/omml.rb
|
203
206
|
- lib/plurimath/omml/parser.rb
|
204
207
|
- lib/plurimath/omml/transform.rb
|
208
|
+
- lib/plurimath/setup/oga.rb
|
209
|
+
- lib/plurimath/setup/opal.rb.erb
|
210
|
+
- lib/plurimath/setup/ox.rb
|
205
211
|
- lib/plurimath/unicode.rb
|
206
212
|
- lib/plurimath/unitsml.rb
|
207
213
|
- lib/plurimath/utility.rb
|
208
214
|
- lib/plurimath/version.rb
|
215
|
+
- lib/plurimath/xml_engine.rb
|
216
|
+
- lib/plurimath/xml_engine/oga.rb
|
217
|
+
- lib/plurimath/xml_engine/ox.rb
|
209
218
|
- plurimath.gemspec
|
210
219
|
homepage: https://github.com/plurimath/plurimath
|
211
220
|
licenses:
|