plurimath 0.8.23 → 0.8.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/plurimath/mathml/parser.rb +48 -40
- 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: 4c205999703df727ab9f7a9cda7a4fddb7359b0b57e59413e52ecebc7e961de1
|
4
|
+
data.tar.gz: 158c063d2ae937a256a859cbbcb42826de6289874c592fccb55ef76dde97b7f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02e70b4a39ca41afbe43b2ba6099f07b7882e5908f140ab5d4a6bd0f600272d47912d548ac1d8794707affc57b9efe00e472e2c2a6e92e793d6b2b105b85d5f2
|
7
|
+
data.tar.gz: 7b6172ca6cd799cf8f4d81044eb7380ed9326f87cebf286d1bf25ccd81fa4674f6d9190df0f3555983b1b2a2e946725b1594e4eb72bc18e5d4da16d92d4119e2
|
@@ -1,46 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "constants"
|
4
|
-
::Mml::Configuration.config = {
|
5
|
-
mmultiscripts: Plurimath::Math::Function::Multiscript,
|
6
|
-
mlabeledtr: Plurimath::Math::Function::Mlabeledtr,
|
7
|
-
munderover: Plurimath::Math::Function::Underover,
|
8
|
-
semantics: Plurimath::Math::Function::Semantics,
|
9
|
-
mscarries: Plurimath::Math::Function::Scarries,
|
10
|
-
mfraction: Plurimath::Math::Function::Frac,
|
11
|
-
menclose: Plurimath::Math::Function::Menclose,
|
12
|
-
mlongdiv: Plurimath::Math::Function::Longdiv,
|
13
|
-
mphantom: Plurimath::Math::Function::Phantom,
|
14
|
-
msubsup: Plurimath::Math::Function::PowerBase,
|
15
|
-
msgroup: Plurimath::Math::Function::Msgroup,
|
16
|
-
mpadded: Plurimath::Math::Function::Mpadded,
|
17
|
-
mfenced: Plurimath::Math::Function::Fenced,
|
18
|
-
mstack: Plurimath::Math::Function::Stackrel,
|
19
|
-
munder: Plurimath::Math::Function::Underset,
|
20
|
-
msline: Plurimath::Math::Function::Msline,
|
21
|
-
merror: Plurimath::Math::Function::Merror,
|
22
|
-
mtable: Plurimath::Math::Function::Table,
|
23
|
-
mstyle: Plurimath::Math::Formula::Mstyle,
|
24
|
-
mglyph: Plurimath::Math::Function::Mglyph,
|
25
|
-
mover: Plurimath::Math::Function::Overset,
|
26
|
-
msqrt: Plurimath::Math::Function::Sqrt,
|
27
|
-
mroot: Plurimath::Math::Function::Root,
|
28
|
-
mtext: Plurimath::Math::Function::Text,
|
29
|
-
mfrac: Plurimath::Math::Function::Frac,
|
30
|
-
msrow: Plurimath::Math::Formula,
|
31
|
-
msup: Plurimath::Math::Function::Power,
|
32
|
-
msub: Plurimath::Math::Function::Base,
|
33
|
-
none: Plurimath::Math::Function::None,
|
34
|
-
mrow: Plurimath::Math::Formula::Mrow,
|
35
|
-
math: Plurimath::Math::Formula,
|
36
|
-
mtd: Plurimath::Math::Function::Td,
|
37
|
-
mtr: Plurimath::Math::Function::Tr,
|
38
|
-
mi: Plurimath::Math::Symbols::Symbol,
|
39
|
-
mo: Plurimath::Math::Symbols::Symbol,
|
40
|
-
ms: Plurimath::Math::Function::Ms,
|
41
|
-
mn: Plurimath::Math::Number,
|
42
|
-
}
|
43
|
-
require "mml"
|
44
4
|
|
45
5
|
module Plurimath
|
46
6
|
class Mathml
|
@@ -48,6 +8,7 @@ module Plurimath
|
|
48
8
|
attr_accessor :text
|
49
9
|
|
50
10
|
def initialize(text)
|
11
|
+
mml_config
|
51
12
|
@text = text
|
52
13
|
end
|
53
14
|
|
@@ -55,6 +16,53 @@ module Plurimath
|
|
55
16
|
namespace_exist = text.split(">").first.include?(" xmlns=")
|
56
17
|
::Mml.parse(text, namespace_exist: namespace_exist)
|
57
18
|
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def mml_config
|
23
|
+
return if ::Mml.respond_to?(:config)
|
24
|
+
|
25
|
+
::Mml::Configuration.config = {
|
26
|
+
mmultiscripts: Plurimath::Math::Function::Multiscript,
|
27
|
+
mlabeledtr: Plurimath::Math::Function::Mlabeledtr,
|
28
|
+
munderover: Plurimath::Math::Function::Underover,
|
29
|
+
semantics: Plurimath::Math::Function::Semantics,
|
30
|
+
mscarries: Plurimath::Math::Function::Scarries,
|
31
|
+
mfraction: Plurimath::Math::Function::Frac,
|
32
|
+
menclose: Plurimath::Math::Function::Menclose,
|
33
|
+
mlongdiv: Plurimath::Math::Function::Longdiv,
|
34
|
+
mphantom: Plurimath::Math::Function::Phantom,
|
35
|
+
msubsup: Plurimath::Math::Function::PowerBase,
|
36
|
+
msgroup: Plurimath::Math::Function::Msgroup,
|
37
|
+
mpadded: Plurimath::Math::Function::Mpadded,
|
38
|
+
mfenced: Plurimath::Math::Function::Fenced,
|
39
|
+
mstack: Plurimath::Math::Function::Stackrel,
|
40
|
+
munder: Plurimath::Math::Function::Underset,
|
41
|
+
msline: Plurimath::Math::Function::Msline,
|
42
|
+
merror: Plurimath::Math::Function::Merror,
|
43
|
+
mtable: Plurimath::Math::Function::Table,
|
44
|
+
mstyle: Plurimath::Math::Formula::Mstyle,
|
45
|
+
mglyph: Plurimath::Math::Function::Mglyph,
|
46
|
+
mover: Plurimath::Math::Function::Overset,
|
47
|
+
msqrt: Plurimath::Math::Function::Sqrt,
|
48
|
+
mroot: Plurimath::Math::Function::Root,
|
49
|
+
mtext: Plurimath::Math::Function::Text,
|
50
|
+
mfrac: Plurimath::Math::Function::Frac,
|
51
|
+
msrow: Plurimath::Math::Formula,
|
52
|
+
msup: Plurimath::Math::Function::Power,
|
53
|
+
msub: Plurimath::Math::Function::Base,
|
54
|
+
none: Plurimath::Math::Function::None,
|
55
|
+
mrow: Plurimath::Math::Formula::Mrow,
|
56
|
+
math: Plurimath::Math::Formula,
|
57
|
+
mtd: Plurimath::Math::Function::Td,
|
58
|
+
mtr: Plurimath::Math::Function::Tr,
|
59
|
+
mi: Plurimath::Math::Symbols::Symbol,
|
60
|
+
mo: Plurimath::Math::Symbols::Symbol,
|
61
|
+
ms: Plurimath::Math::Function::Ms,
|
62
|
+
mn: Plurimath::Math::Number,
|
63
|
+
}
|
64
|
+
require "mml"
|
65
|
+
end
|
58
66
|
end
|
59
67
|
end
|
60
68
|
end
|
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.8.
|
4
|
+
version: 0.8.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ox
|