plurimath 0.8.23 → 0.8.25

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: f301941ca29b5fb67e070e98628d5abf81c5d313101a31e0207c1dd1a0854e12
4
- data.tar.gz: acb29ab0a365553442b91ab9b4aa5d375c2828fd259ab0fed7c5380f71777e86
3
+ metadata.gz: e0d7ee4256ab83d3095548450106032cf44dea17f7cd3918094a4eb694a824d5
4
+ data.tar.gz: 931df05dfa07ad97d8c7b1a39ecce17216e0587ffb36395b602f899a0ee15eb4
5
5
  SHA512:
6
- metadata.gz: 03a28a3df674993a8e952f23c47ae32bd5dbcea003e3a295ba047e44682f786d3ce0c3b1bac47a81f4b4fbae04b2f4963df7ba12e757813aed1bdc4d5f646f48
7
- data.tar.gz: aef680f8b1ebf9e54377a6b6fe921a74369ee24bf6d196f78fe5d52e2357fc0cd6229681228144226525f9c70738557a9439964b8054747e24882d48f4fcabf6
6
+ metadata.gz: e6d918b4b4991b767b261a3f12e80d167af6b8d5a0cf877c29741cf79e62c93727ebce68546410798ecfb31c5ae75030623c36a1bb595fd1d628fbb22f48790e
7
+ data.tar.gz: 754a5efc72f878c15cf9066b352d4c45f3c647432c44bbb187249a7d86a4d62794fdcc1c264ff865e63833916f3e5f75177dccd20fd5137cbfebaa522b03346c
@@ -39,8 +39,8 @@ module Plurimath
39
39
  rad_element,
40
40
  [
41
41
  pr_element,
42
- omml_parameter(parameter_two, display_style, tag_name: "deg", options: options),
43
- omml_parameter(parameter_one, display_style, tag_name: "e", options: options),
42
+ omml_parameter(parameter_one, display_style, tag_name: "deg", options: options),
43
+ omml_parameter(parameter_two, display_style, tag_name: "e", options: options),
44
44
  ],
45
45
  )
46
46
  [rad_element]
@@ -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
@@ -242,8 +242,8 @@ module Plurimath
242
242
  )
243
243
  else
244
244
  Math::Function::Root.new(
245
- Utility.filter_values(rad[2]),
246
245
  rad[1],
246
+ Utility.filter_values(rad[2]),
247
247
  )
248
248
  end
249
249
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plurimath
4
- VERSION = "0.8.23"
4
+ VERSION = "0.8.25"
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.8.23
4
+ version: 0.8.25
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-01-31 00:00:00.000000000 Z
11
+ date: 2025-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ox