plurimath 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +8 -11
- data/.gitignore +1 -0
- data/AsciiMath-Supported-Data.adoc +280 -0
- data/Gemfile +1 -0
- data/Latex-Supported-Data.adoc +1872 -0
- data/MathML-Supported-Data.adoc +270 -0
- data/README.adoc +94 -0
- data/lib/plurimath/asciimath/constants.rb +215 -222
- data/lib/plurimath/asciimath/parse.rb +45 -11
- data/lib/plurimath/asciimath/parser.rb +4 -3
- data/lib/plurimath/asciimath/transform.rb +222 -131
- data/lib/plurimath/asciimath.rb +1 -1
- data/lib/plurimath/html/constants.rb +50 -0
- data/lib/plurimath/html/parse.rb +149 -0
- data/lib/plurimath/html/parser.rb +26 -0
- data/lib/plurimath/html/transform.rb +363 -0
- data/lib/plurimath/html.rb +1 -1
- data/lib/plurimath/latex/constants.rb +1885 -1858
- data/lib/plurimath/latex/parse.rb +127 -34
- data/lib/plurimath/latex/parser.rb +5 -4
- data/lib/plurimath/latex/transform.rb +324 -164
- data/lib/plurimath/math/formula.rb +9 -1
- data/lib/plurimath/math/function/bar.rb +1 -1
- data/lib/plurimath/math/function/base.rb +7 -1
- data/lib/plurimath/math/function/binary_function.rb +10 -5
- data/lib/plurimath/math/function/color.rb +4 -4
- data/lib/plurimath/math/function/fenced.rb +7 -2
- data/lib/plurimath/math/function/font_style/bold.rb +18 -0
- data/lib/plurimath/math/function/font_style/double_struck.rb +18 -0
- data/lib/plurimath/math/function/font_style/fraktur.rb +18 -0
- data/lib/plurimath/math/function/font_style/monospace.rb +18 -0
- data/lib/plurimath/math/function/font_style/sans-serif.rb +18 -0
- data/lib/plurimath/math/function/font_style/script.rb +18 -0
- data/lib/plurimath/math/function/font_style.rb +2 -22
- data/lib/plurimath/math/function/frac.rb +4 -4
- data/lib/plurimath/math/function/inf.rb +0 -1
- data/lib/plurimath/math/function/left.rb +3 -6
- data/lib/plurimath/math/function/limits.rb +0 -1
- data/lib/plurimath/math/function/log.rb +6 -0
- data/lib/plurimath/math/function/mod.rb +6 -0
- data/lib/plurimath/math/function/multiscript.rb +11 -0
- data/lib/plurimath/math/function/norm.rb +2 -1
- data/lib/plurimath/math/function/over.rb +29 -0
- data/lib/plurimath/math/function/overset.rb +2 -2
- data/lib/plurimath/math/function/power.rb +7 -1
- data/lib/plurimath/math/function/power_base.rb +14 -7
- data/lib/plurimath/math/function/prod.rb +6 -0
- data/lib/plurimath/math/function/right.rb +24 -0
- data/lib/plurimath/math/function/root.rb +5 -4
- data/lib/plurimath/math/function/sqrt.rb +1 -1
- data/lib/plurimath/math/function/substack.rb +0 -1
- data/lib/plurimath/math/function/sum.rb +6 -0
- data/lib/plurimath/math/function/table/align.rb +24 -0
- data/lib/plurimath/math/function/table/array.rb +25 -0
- data/lib/plurimath/math/function/table/bmatrix.rb +26 -0
- data/lib/plurimath/math/function/table/matrix.rb +24 -0
- data/lib/plurimath/math/function/table/multline.rb +24 -0
- data/lib/plurimath/math/function/table/pmatrix.rb +24 -0
- data/lib/plurimath/math/function/table/split.rb +24 -0
- data/lib/plurimath/math/function/table/vmatrix.rb +25 -0
- data/lib/plurimath/math/function/table.rb +17 -5
- data/lib/plurimath/math/function/td.rb +6 -1
- data/lib/plurimath/math/function/ternary_function.rb +16 -6
- data/lib/plurimath/math/function/text.rb +19 -7
- data/lib/plurimath/math/function/tr.rb +6 -1
- data/lib/plurimath/math/function/unary_function.rb +5 -0
- data/lib/plurimath/math/function/vec.rb +4 -0
- data/lib/plurimath/math/function.rb +13 -2
- data/lib/plurimath/math/number.rb +8 -0
- data/lib/plurimath/math/symbol.rb +12 -3
- data/lib/plurimath/math.rb +9 -4
- data/lib/plurimath/mathml/constants.rb +2 -34
- data/lib/plurimath/mathml/parse.rb +7 -2
- data/lib/plurimath/mathml/parser.rb +2 -1
- data/lib/plurimath/mathml/transform.rb +73 -68
- data/lib/plurimath/mathml.rb +1 -1
- data/lib/plurimath/omml/constants.rb +154 -0
- data/lib/plurimath/omml/parser.rb +22 -0
- data/lib/plurimath/omml/transform.rb +216 -0
- data/lib/plurimath/omml.rb +1 -1
- data/lib/plurimath/unitsml.rb +4 -0
- data/lib/plurimath/utility.rb +73 -0
- data/lib/plurimath/version.rb +1 -1
- data/plurimath.gemspec +1 -0
- metadata +49 -7
- data/README.md +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce5b6d227ef93e05904c1e2cb12395c91db94b5bb130cebd353dd44032c601e7
|
4
|
+
data.tar.gz: 8ce1de0731d04885e3e5222dfda74c690901bda29422009403707495003ed36a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 538cbf63e0728928ec36bd387c231268eb2d62364879867c840d93a4ae74dddaf58e74770fde752d01093df4748414e79d85326a29f84e2c911d0ec61f33e343
|
7
|
+
data.tar.gz: fb10a0d5123b5d182a1ba4549d8ba4919c742eedb3c57a6d3fbf62d985783f7a94f6cfd81aa993e838cd8a2f4e551b80211b5a96110ed1e792859f2ad0a2f915
|
data/.github/workflows/test.yml
CHANGED
@@ -2,35 +2,32 @@ name: test
|
|
2
2
|
|
3
3
|
on:
|
4
4
|
push:
|
5
|
-
branches: [
|
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
|
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@
|
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
|
-
|
31
|
-
|
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
@@ -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