plurimath 0.8.21 → 0.8.23

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: b3a7ae1abcf2006337731693d6db921907fd0e2d88b1a5c51fe7816d93f8f344
4
- data.tar.gz: 69f61049df44aed7a64d150c28beba03acaf5955fdd75c8e7b38601df52e1d7b
3
+ metadata.gz: f301941ca29b5fb67e070e98628d5abf81c5d313101a31e0207c1dd1a0854e12
4
+ data.tar.gz: acb29ab0a365553442b91ab9b4aa5d375c2828fd259ab0fed7c5380f71777e86
5
5
  SHA512:
6
- metadata.gz: 06e23a1f2a49fd6eec9200860fa374d955fa4655fbe3ac6cadd61e018e37f278bcdfa4d378586577bccafb04b82f1c96412a65113e0e84ff70c5f62cde29adb6
7
- data.tar.gz: 9a98624fe8d07c680c1dd01675f22fe03b45924e6d9acf8732a9373db4f16a934d3f0de4a02adbc10176a9f4b8d39f4ca80cc10be3088daceab7cdcca40b928e
6
+ metadata.gz: 03a28a3df674993a8e952f23c47ae32bd5dbcea003e3a295ba047e44682f786d3ce0c3b1bac47a81f4b4fbae04b2f4963df7ba12e757813aed1bdc4d5f646f48
7
+ data.tar.gz: aef680f8b1ebf9e54377a6b6fe921a74369ee24bf6d196f78fe5d52e2357fc0cd6229681228144226525f9c70738557a9439964b8054747e24882d48f4fcabf6
@@ -7,7 +7,7 @@ module Plurimath
7
7
  class Formula < Core
8
8
  include Mathml::Utility
9
9
 
10
- attr_accessor :value, :left_right_wrapper, :displaystyle, :input_string, :unitsml, :unitsml_xml
10
+ attr_accessor :value, :left_right_wrapper, :displaystyle, :input_string, :unitsml, :unitsml_xml, :display
11
11
 
12
12
  MATH_ZONE_TYPES = %i[
13
13
  omml
@@ -68,6 +68,9 @@ module Plurimath
68
68
  end
69
69
 
70
70
  def to_omml_without_math_tag(_, **)
71
+ # TODO: remove this condition once to word rendering issue is resolved, plurimath/plurimath/pull/328
72
+ return if value == "&#x2062;"
73
+
71
74
  value
72
75
  end
73
76
 
@@ -80,6 +83,9 @@ module Plurimath
80
83
  end
81
84
 
82
85
  def insert_t_tag(_, options:)
86
+ # TODO: remove this condition once to word rendering issue is resolved, plurimath/plurimath/pull/328
87
+ return if value == "&#x2062;"
88
+
83
89
  [(Utility.ox_element("r", namespace: "m") << t_tag(options: options))]
84
90
  end
85
91
 
@@ -1,6 +1,46 @@
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"
4
44
 
5
45
  module Plurimath
6
46
  class Mathml
@@ -8,7 +48,6 @@ module Plurimath
8
48
  attr_accessor :text
9
49
 
10
50
  def initialize(text)
11
- mml_config
12
51
  @text = text
13
52
  end
14
53
 
@@ -16,51 +55,6 @@ module Plurimath
16
55
  namespace_exist = text.split(">").first.include?(" xmlns=")
17
56
  ::Mml.parse(text, namespace_exist: namespace_exist)
18
57
  end
19
-
20
- private
21
-
22
- def mml_config
23
- ::Mml::Configuration.config = {
24
- mmultiscripts: Plurimath::Math::Function::Multiscript,
25
- mlabeledtr: Plurimath::Math::Function::Mlabeledtr,
26
- munderover: Plurimath::Math::Function::Underover,
27
- semantics: Plurimath::Math::Function::Semantics,
28
- mscarries: Plurimath::Math::Function::Scarries,
29
- mfraction: Plurimath::Math::Function::Frac,
30
- menclose: Plurimath::Math::Function::Menclose,
31
- mlongdiv: Plurimath::Math::Function::Longdiv,
32
- mphantom: Plurimath::Math::Function::Phantom,
33
- msubsup: Plurimath::Math::Function::PowerBase,
34
- msgroup: Plurimath::Math::Function::Msgroup,
35
- mpadded: Plurimath::Math::Function::Mpadded,
36
- mfenced: Plurimath::Math::Function::Fenced,
37
- mstack: Plurimath::Math::Function::Stackrel,
38
- munder: Plurimath::Math::Function::Underset,
39
- msline: Plurimath::Math::Function::Msline,
40
- merror: Plurimath::Math::Function::Merror,
41
- mtable: Plurimath::Math::Function::Table,
42
- mstyle: Plurimath::Math::Formula::Mstyle,
43
- mglyph: Plurimath::Math::Function::Mglyph,
44
- mover: Plurimath::Math::Function::Overset,
45
- msqrt: Plurimath::Math::Function::Sqrt,
46
- mroot: Plurimath::Math::Function::Root,
47
- mtext: Plurimath::Math::Function::Text,
48
- mfrac: Plurimath::Math::Function::Frac,
49
- msrow: Plurimath::Math::Formula,
50
- msup: Plurimath::Math::Function::Power,
51
- msub: Plurimath::Math::Function::Base,
52
- none: Plurimath::Math::Function::None,
53
- mrow: Plurimath::Math::Formula::Mrow,
54
- math: Plurimath::Math::Formula,
55
- mtd: Plurimath::Math::Function::Td,
56
- mtr: Plurimath::Math::Function::Tr,
57
- mi: Plurimath::Math::Symbols::Symbol,
58
- mo: Plurimath::Math::Symbols::Symbol,
59
- ms: Plurimath::Math::Function::Ms,
60
- mn: Plurimath::Math::Number,
61
- }
62
- require "mml" unless ::Mml.respond_to?(:config)
63
- end
64
58
  end
65
59
  end
66
60
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Plurimath
4
- VERSION = "0.8.21"
4
+ VERSION = "0.8.23"
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.21
4
+ version: 0.8.23
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-26 00:00:00.000000000 Z
11
+ date: 2025-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ox