plurimath 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +8 -11
  3. data/.gitignore +1 -0
  4. data/AsciiMath-Supported-Data.adoc +280 -0
  5. data/Gemfile +1 -0
  6. data/Latex-Supported-Data.adoc +1872 -0
  7. data/MathML-Supported-Data.adoc +270 -0
  8. data/README.adoc +94 -0
  9. data/lib/plurimath/asciimath/constants.rb +215 -222
  10. data/lib/plurimath/asciimath/parse.rb +45 -11
  11. data/lib/plurimath/asciimath/parser.rb +4 -3
  12. data/lib/plurimath/asciimath/transform.rb +222 -131
  13. data/lib/plurimath/asciimath.rb +1 -1
  14. data/lib/plurimath/html/constants.rb +50 -0
  15. data/lib/plurimath/html/parse.rb +149 -0
  16. data/lib/plurimath/html/parser.rb +26 -0
  17. data/lib/plurimath/html/transform.rb +363 -0
  18. data/lib/plurimath/html.rb +1 -1
  19. data/lib/plurimath/latex/constants.rb +1885 -1858
  20. data/lib/plurimath/latex/parse.rb +127 -34
  21. data/lib/plurimath/latex/parser.rb +5 -4
  22. data/lib/plurimath/latex/transform.rb +324 -164
  23. data/lib/plurimath/math/formula.rb +9 -1
  24. data/lib/plurimath/math/function/bar.rb +1 -1
  25. data/lib/plurimath/math/function/base.rb +7 -1
  26. data/lib/plurimath/math/function/binary_function.rb +10 -5
  27. data/lib/plurimath/math/function/color.rb +4 -4
  28. data/lib/plurimath/math/function/fenced.rb +7 -2
  29. data/lib/plurimath/math/function/font_style/bold.rb +18 -0
  30. data/lib/plurimath/math/function/font_style/double_struck.rb +18 -0
  31. data/lib/plurimath/math/function/font_style/fraktur.rb +18 -0
  32. data/lib/plurimath/math/function/font_style/monospace.rb +18 -0
  33. data/lib/plurimath/math/function/font_style/sans-serif.rb +18 -0
  34. data/lib/plurimath/math/function/font_style/script.rb +18 -0
  35. data/lib/plurimath/math/function/font_style.rb +2 -22
  36. data/lib/plurimath/math/function/frac.rb +4 -4
  37. data/lib/plurimath/math/function/inf.rb +0 -1
  38. data/lib/plurimath/math/function/left.rb +3 -6
  39. data/lib/plurimath/math/function/limits.rb +0 -1
  40. data/lib/plurimath/math/function/log.rb +6 -0
  41. data/lib/plurimath/math/function/mod.rb +6 -0
  42. data/lib/plurimath/math/function/multiscript.rb +11 -0
  43. data/lib/plurimath/math/function/norm.rb +2 -1
  44. data/lib/plurimath/math/function/over.rb +29 -0
  45. data/lib/plurimath/math/function/overset.rb +2 -2
  46. data/lib/plurimath/math/function/power.rb +7 -1
  47. data/lib/plurimath/math/function/power_base.rb +14 -7
  48. data/lib/plurimath/math/function/prod.rb +6 -0
  49. data/lib/plurimath/math/function/right.rb +24 -0
  50. data/lib/plurimath/math/function/root.rb +5 -4
  51. data/lib/plurimath/math/function/sqrt.rb +1 -1
  52. data/lib/plurimath/math/function/substack.rb +0 -1
  53. data/lib/plurimath/math/function/sum.rb +6 -0
  54. data/lib/plurimath/math/function/table/align.rb +24 -0
  55. data/lib/plurimath/math/function/table/array.rb +25 -0
  56. data/lib/plurimath/math/function/table/bmatrix.rb +26 -0
  57. data/lib/plurimath/math/function/table/matrix.rb +24 -0
  58. data/lib/plurimath/math/function/table/multline.rb +24 -0
  59. data/lib/plurimath/math/function/table/pmatrix.rb +24 -0
  60. data/lib/plurimath/math/function/table/split.rb +24 -0
  61. data/lib/plurimath/math/function/table/vmatrix.rb +25 -0
  62. data/lib/plurimath/math/function/table.rb +17 -5
  63. data/lib/plurimath/math/function/td.rb +6 -1
  64. data/lib/plurimath/math/function/ternary_function.rb +16 -6
  65. data/lib/plurimath/math/function/text.rb +19 -7
  66. data/lib/plurimath/math/function/tr.rb +6 -1
  67. data/lib/plurimath/math/function/unary_function.rb +5 -0
  68. data/lib/plurimath/math/function/vec.rb +4 -0
  69. data/lib/plurimath/math/function.rb +13 -2
  70. data/lib/plurimath/math/number.rb +8 -0
  71. data/lib/plurimath/math/symbol.rb +12 -3
  72. data/lib/plurimath/math.rb +9 -4
  73. data/lib/plurimath/mathml/constants.rb +2 -34
  74. data/lib/plurimath/mathml/parse.rb +7 -2
  75. data/lib/plurimath/mathml/parser.rb +2 -1
  76. data/lib/plurimath/mathml/transform.rb +73 -68
  77. data/lib/plurimath/mathml.rb +1 -1
  78. data/lib/plurimath/omml/constants.rb +154 -0
  79. data/lib/plurimath/omml/parser.rb +22 -0
  80. data/lib/plurimath/omml/transform.rb +216 -0
  81. data/lib/plurimath/omml.rb +1 -1
  82. data/lib/plurimath/unitsml.rb +4 -0
  83. data/lib/plurimath/utility.rb +73 -0
  84. data/lib/plurimath/version.rb +1 -1
  85. data/plurimath.gemspec +1 -0
  86. metadata +49 -7
  87. data/README.md +0 -40
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b38da6a872ab566412690e3f08859d3ba4935409fad521a74f36a5fb972eaf90
4
- data.tar.gz: e4f009d832c64605123611924b34ee3f794ebf57fc2296e8cb3f4d0fd522b76f
3
+ metadata.gz: ce5b6d227ef93e05904c1e2cb12395c91db94b5bb130cebd353dd44032c601e7
4
+ data.tar.gz: 8ce1de0731d04885e3e5222dfda74c690901bda29422009403707495003ed36a
5
5
  SHA512:
6
- metadata.gz: 28c3682a4a1c8132213cdfddbca0c463d822811fe396b77d5062bea96148ba880970ae2d5c4e255eea4666c7b34a8b9b0854ef27896dfb7443b56088d26fc793
7
- data.tar.gz: e4e135b39e22960e2a3d7841bcc15ec82a3aad9c3f3876d648d24b608b2baae450b42a30c799813e57506e01216ba4038bca7d7cd0fac2b32d15fec3e899827b
6
+ metadata.gz: 538cbf63e0728928ec36bd387c231268eb2d62364879867c840d93a4ae74dddaf58e74770fde752d01093df4748414e79d85326a29f84e2c911d0ec61f33e343
7
+ data.tar.gz: fb10a0d5123b5d182a1ba4549d8ba4919c742eedb3c57a6d3fbf62d985783f7a94f6cfd81aa993e838cd8a2f4e551b80211b5a96110ed1e792859f2ad0a2f915
@@ -2,35 +2,32 @@ name: test
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches: [ main ]
6
6
  tags:
7
7
  - '*'
8
8
  pull_request:
9
- paths-ignore:
10
- - .github/workflows/macos.yml
11
- - .github/workflows/windows.yml
12
9
 
13
10
  jobs:
14
- test-linux:
11
+ test:
15
12
  name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
16
13
  runs-on: ${{ matrix.os }}
17
14
  continue-on-error: ${{ matrix.experimental }}
18
15
  strategy:
19
16
  fail-fast: false
20
17
  matrix:
21
- ruby: [ '2.6', '2.7', '3.0' ]
18
+ ruby: [ '2.6', '2.7', '3.0', '3.1' ]
22
19
  os: [ 'macos-latest', 'ubuntu-latest', 'windows-latest']
23
20
  experimental: [false]
21
+
24
22
  steps:
25
- - uses: actions/checkout@master
23
+ - uses: actions/checkout@v3
24
+
26
25
  - name: Use Ruby
27
26
  uses: ruby/setup-ruby@v1
28
27
  with:
29
28
  ruby-version: ${{ matrix.ruby }}
30
- - name: Update gems
31
- run: |
32
- gem install bundler
33
- bundle install --jobs 4 --retry 3
29
+ bundler-cache: true
30
+
34
31
  - name: Run specs
35
32
  run: |
36
33
  bundle exec rake
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+ /coverage/
@@ -0,0 +1,280 @@
1
+ Parenthesis
2
+ --
3
+ |===
4
+ | Open | Close
5
+
6
+ | (: | :)
7
+ | {: | :}
8
+ | ( | )
9
+ | { | }
10
+ | [ | ]
11
+ | \| | \|
12
+ |===
13
+ Classes
14
+ --
15
+ |===
16
+ | Functions | Fonts
17
+
18
+ | stackrel | mathfrak
19
+ | underset | mathcal
20
+ | overset | mathbb
21
+ | cancel | mathsf
22
+ | obrace | mathtt
23
+ | ubrace | mathbf
24
+ | arctan | bbb
25
+ | arcsin | bb
26
+ | arccos | fr
27
+ | color | cc
28
+ | floor | sf
29
+ | tilde | tt
30
+ | oint |
31
+ | root |
32
+ | frac |
33
+ | prod |
34
+ | text |
35
+ | norm |
36
+ | sqrt |
37
+ | cosh |
38
+ | tanh |
39
+ | sinh |
40
+ | sech |
41
+ | csch |
42
+ | coth |
43
+ | ddot |
44
+ | ceil |
45
+ | log |
46
+ | mod |
47
+ | sum |
48
+ | int |
49
+ | vec |
50
+ | hat |
51
+ | dot |
52
+ | bar |
53
+ | abs |
54
+ | min |
55
+ | max |
56
+ | dim |
57
+ | det |
58
+ | csc |
59
+ | cot |
60
+ | lub |
61
+ | lcm |
62
+ | glb |
63
+ | gcd |
64
+ | exp |
65
+ | cos |
66
+ | tan |
67
+ | sin |
68
+ | sec |
69
+ | ln |
70
+ | ul |
71
+ | g |
72
+ | f |
73
+ --
74
+ === Symbols
75
+
76
+ ** twoheadrightarrowtail
77
+ ** twoheadrightarrow
78
+ ** rightarrowtail
79
+ ** Leftrightarrow
80
+ ** leftrightarrow
81
+ ** Rightarrow
82
+ ** rightarrow
83
+ ** varepsilon
84
+ ** Leftarrow
85
+ ** leftarrow
86
+ ** downarrow
87
+ ** therefore
88
+ ** backslash
89
+ ** setminus
90
+ ** triangle
91
+ ** bigwedge
92
+ ** rceiling
93
+ ** lceiling
94
+ ** supseteq
95
+ ** subseteq
96
+ ** vartheta
97
+ ** emptyset
98
+ ** diamond
99
+ ** uparrow
100
+ ** implies
101
+ ** partial
102
+ ** because
103
+ ** upsilon
104
+ ** epsilon
105
+ ** bigcap
106
+ ** bigvee
107
+ ** propto
108
+ ** approx
109
+ ** exists
110
+ ** forall
111
+ ** otimes
112
+ ** ltimes
113
+ ** bowtie
114
+ ** rtimes
115
+ ** models
116
+ ** mapsto
117
+ ** bigcup
118
+ ** succeq
119
+ ** preceq
120
+ ** rfloor
121
+ ** lfloor
122
+ ** square
123
+ ** supset
124
+ ** subset
125
+ ** lambda
126
+ ** Lambda
127
+ ** varphi
128
+ ** >\->>
129
+ ** kappa
130
+ ** Delta
131
+ ** delta
132
+ ** gamma
133
+ ** Gamma
134
+ ** Theta
135
+ ** theta
136
+ ** alpha
137
+ ** aleph
138
+ ** infty
139
+ ** equiv
140
+ ** frown
141
+ ** notin
142
+ ** angle
143
+ ** cdots
144
+ ** vdash
145
+ ** wedge
146
+ ** oplus
147
+ ** nabla
148
+ ** ddots
149
+ ** vdots
150
+ ** Sigma
151
+ ** Omega
152
+ ** omega
153
+ ** sigma
154
+ ** times
155
+ ** ldots
156
+ ** \<\=>
157
+ ** -\<=
158
+ ** \^^^
159
+ ** |\->
160
+ ** >\->
161
+ ** \->>
162
+ ** \_|_
163
+ ** \***
164
+ ** |><|
165
+ ** quad
166
+ ** star
167
+ ** odot
168
+ ** cdot
169
+ ** rarr
170
+ ** darr
171
+ ** prop
172
+ ** lArr
173
+ ** rArr
174
+ ** uarr
175
+ ** hArr
176
+ ** harr
177
+ ** larr
178
+ ** grad
179
+ ** circ
180
+ ** sube
181
+ ** supe
182
+ ** succ
183
+ ** prec
184
+ ** cong
185
+ ** beta
186
+ ** zeta
187
+ ** iota
188
+ ** !in
189
+ ** sup
190
+ ** sub
191
+ ** top
192
+ ** vvv
193
+ ** vee
194
+ ** nnn
195
+ ** cap
196
+ ** ast
197
+ ** bot
198
+ ** del
199
+ ** uuu
200
+ ** cup
201
+ ** iff
202
+ ** eta
203
+ ** Phi
204
+ ** Psi
205
+ ** psi
206
+ ** chi
207
+ ** phi
208
+ ** rho
209
+ ** tau
210
+ ** div
211
+ ** neg
212
+ ** not
213
+ ** /_\
214
+ ** \->
215
+ ** >-=
216
+ ** ><|
217
+ ** |==
218
+ ** |--
219
+ ** __|
220
+ ** |__
221
+ ** |><
222
+ ** \=>
223
+ ** \<=
224
+ ** nn
225
+ ** vv
226
+ ** TT
227
+ ** EE
228
+ ** ox
229
+ ** to
230
+ ** AA
231
+ ** uu
232
+ ** ne
233
+ ** ZZ
234
+ ** RR
235
+ ** QQ
236
+ ** NN
237
+ ** CC
238
+ ** oo
239
+ ** ge
240
+ ** le
241
+ ** in
242
+ ** nu
243
+ ** mu
244
+ ** pi
245
+ ** Pi
246
+ ** xi
247
+ ** Xi
248
+ ** xx
249
+ ** pm
250
+ ** gt
251
+ ** lt
252
+ ** :'
253
+ ** ^^
254
+ ** o+
255
+ ** o.
256
+ ** **
257
+ ** ~~
258
+ ** O/
259
+ ** >>
260
+ ** <<
261
+ ** ~|
262
+ ** !=
263
+ ** >-
264
+ ** -<
265
+ ** ~=
266
+ ** -=
267
+ ** :.
268
+ ** >=
269
+ ** |~
270
+ ** /_
271
+ ** +-
272
+ ** -:
273
+ ** @
274
+ ** *
275
+ ** <
276
+ ** >
277
+ ** -
278
+ ** =
279
+ ** +
280
+ ** /
data/Gemfile CHANGED
@@ -5,3 +5,4 @@ gemspec
5
5
 
6
6
  gem "rake", "~> 12.0"
7
7
  gem "rspec", "~> 3.0"
8
+ gem 'simplecov', require: false, group: :test