plurimath 0.3.4 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/lib/plurimath/asciimath/constants.rb +5 -3
  3. data/lib/plurimath/asciimath/parse.rb +41 -28
  4. data/lib/plurimath/asciimath/transform.rb +111 -0
  5. data/lib/plurimath/latex/constants.rb +2 -2
  6. data/lib/plurimath/latex/parse.rb +3 -0
  7. data/lib/plurimath/latex/transform.rb +37 -0
  8. data/lib/plurimath/math/core.rb +43 -0
  9. data/lib/plurimath/math/formula.rb +33 -25
  10. data/lib/plurimath/math/function/abs.rb +19 -0
  11. data/lib/plurimath/math/function/arccos.rb +3 -0
  12. data/lib/plurimath/math/function/arcsin.rb +3 -0
  13. data/lib/plurimath/math/function/arctan.rb +3 -0
  14. data/lib/plurimath/math/function/bar.rb +2 -1
  15. data/lib/plurimath/math/function/base.rb +5 -7
  16. data/lib/plurimath/math/function/binary_function.rb +11 -61
  17. data/lib/plurimath/math/function/cos.rb +3 -0
  18. data/lib/plurimath/math/function/cosh.rb +3 -0
  19. data/lib/plurimath/math/function/cot.rb +3 -0
  20. data/lib/plurimath/math/function/coth.rb +3 -0
  21. data/lib/plurimath/math/function/csc.rb +3 -0
  22. data/lib/plurimath/math/function/csch.rb +3 -0
  23. data/lib/plurimath/math/function/ddot.rb +13 -0
  24. data/lib/plurimath/math/function/deg.rb +3 -0
  25. data/lib/plurimath/math/function/det.rb +3 -0
  26. data/lib/plurimath/math/function/dim.rb +3 -0
  27. data/lib/plurimath/math/function/exp.rb +3 -0
  28. data/lib/plurimath/math/function/fenced.rb +9 -31
  29. data/lib/plurimath/math/function/font_style.rb +7 -1
  30. data/lib/plurimath/math/function/frac.rb +5 -7
  31. data/lib/plurimath/math/function/gcd.rb +3 -0
  32. data/lib/plurimath/math/function/glb.rb +3 -0
  33. data/lib/plurimath/math/function/hat.rb +4 -0
  34. data/lib/plurimath/math/function/int.rb +36 -6
  35. data/lib/plurimath/math/function/left.rb +10 -3
  36. data/lib/plurimath/math/function/lg.rb +3 -0
  37. data/lib/plurimath/math/function/lim.rb +5 -14
  38. data/lib/plurimath/math/function/limits.rb +8 -0
  39. data/lib/plurimath/math/function/ln.rb +3 -0
  40. data/lib/plurimath/math/function/log.rb +40 -22
  41. data/lib/plurimath/math/function/lub.rb +3 -0
  42. data/lib/plurimath/math/function/max.rb +3 -0
  43. data/lib/plurimath/math/function/mbox.rb +1 -3
  44. data/lib/plurimath/math/function/menclose.rb +2 -1
  45. data/lib/plurimath/math/function/min.rb +3 -0
  46. data/lib/plurimath/math/function/msgroup.rb +1 -4
  47. data/lib/plurimath/math/function/multiscript.rb +4 -9
  48. data/lib/plurimath/math/function/obrace.rb +8 -0
  49. data/lib/plurimath/math/function/overset.rb +3 -16
  50. data/lib/plurimath/math/function/power.rb +5 -8
  51. data/lib/plurimath/math/function/power_base.rb +9 -39
  52. data/lib/plurimath/math/function/prod.rb +34 -4
  53. data/lib/plurimath/math/function/right.rb +10 -3
  54. data/lib/plurimath/math/function/root.rb +6 -4
  55. data/lib/plurimath/math/function/rule.rb +1 -1
  56. data/lib/plurimath/math/function/sec.rb +3 -0
  57. data/lib/plurimath/math/function/sech.rb +3 -0
  58. data/lib/plurimath/math/function/sin.rb +3 -0
  59. data/lib/plurimath/math/function/sinh.rb +3 -0
  60. data/lib/plurimath/math/function/sqrt.rb +4 -3
  61. data/lib/plurimath/math/function/sum.rb +31 -27
  62. data/lib/plurimath/math/function/table.rb +54 -8
  63. data/lib/plurimath/math/function/tan.rb +3 -0
  64. data/lib/plurimath/math/function/tanh.rb +3 -0
  65. data/lib/plurimath/math/function/td.rb +4 -1
  66. data/lib/plurimath/math/function/ternary_function.rb +34 -17
  67. data/lib/plurimath/math/function/text.rb +11 -0
  68. data/lib/plurimath/math/function/tr.rb +1 -0
  69. data/lib/plurimath/math/function/ubrace.rb +8 -0
  70. data/lib/plurimath/math/function/ul.rb +2 -1
  71. data/lib/plurimath/math/function/unary_function.rb +10 -9
  72. data/lib/plurimath/math/function/underover.rb +10 -27
  73. data/lib/plurimath/math/function/underset.rb +3 -16
  74. data/lib/plurimath/math/number.rb +17 -3
  75. data/lib/plurimath/math/symbol.rb +20 -2
  76. data/lib/plurimath/math.rb +1 -1
  77. data/lib/plurimath/mathml/constants.rb +0 -2
  78. data/lib/plurimath/mathml/parser.rb +9 -1
  79. data/lib/plurimath/mathml/transform.rb +21 -1
  80. data/lib/plurimath/omml/parser.rb +8 -1
  81. data/lib/plurimath/omml/transform.rb +27 -13
  82. data/lib/plurimath/utility.rb +20 -8
  83. data/lib/plurimath/version.rb +1 -1
  84. metadata +3 -3
  85. data/lib/plurimath/math/base.rb +0 -15
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.6
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-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
@@ -76,7 +76,7 @@ files:
76
76
  - lib/plurimath/latex/parser.rb
77
77
  - lib/plurimath/latex/transform.rb
78
78
  - lib/plurimath/math.rb
79
- - lib/plurimath/math/base.rb
79
+ - lib/plurimath/math/core.rb
80
80
  - lib/plurimath/math/formula.rb
81
81
  - lib/plurimath/math/function.rb
82
82
  - lib/plurimath/math/function/abs.rb
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Plurimath
4
- module Math
5
- class Base
6
- def initialize(field)
7
- field.is_a?(Parslet::Slice) ? field.to_s : field
8
- end
9
-
10
- def class_name
11
- self.class.name.split("::").last.downcase
12
- end
13
- end
14
- end
15
- end