plurimath 0.10.0 → 0.10.2

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.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec-opal +1 -1
  3. data/.rubocop.yml +9 -5
  4. data/.rubocop_todo.yml +0 -0
  5. data/Gemfile +7 -5
  6. data/README.adoc +57 -1
  7. data/Rakefile +11 -0
  8. data/lib/plurimath/asciimath/parse.rb +0 -1
  9. data/lib/plurimath/asciimath/parser.rb +0 -3
  10. data/lib/plurimath/asciimath.rb +5 -0
  11. data/lib/plurimath/cli.rb +28 -1
  12. data/lib/plurimath/errors.rb +0 -4
  13. data/lib/plurimath/formatter/numbers.rb +12 -0
  14. data/lib/plurimath/formatter/numeric_formatter.rb +4 -1
  15. data/lib/plurimath/formatter/standard.rb +0 -1
  16. data/lib/plurimath/formatter.rb +6 -9
  17. data/lib/plurimath/html/parse.rb +0 -1
  18. data/lib/plurimath/html/parser.rb +0 -3
  19. data/lib/plurimath/html.rb +5 -0
  20. data/lib/plurimath/latex/parse.rb +0 -1
  21. data/lib/plurimath/latex/parser.rb +2 -5
  22. data/lib/plurimath/latex.rb +5 -0
  23. data/lib/plurimath/math/core.rb +6 -2
  24. data/lib/plurimath/math/formula/mrow.rb +2 -41
  25. data/lib/plurimath/math/formula/mstyle.rb +6 -0
  26. data/lib/plurimath/math/formula.rb +59 -301
  27. data/lib/plurimath/math/function/abs.rb +0 -1
  28. data/lib/plurimath/math/function/arccos.rb +0 -1
  29. data/lib/plurimath/math/function/arcsin.rb +0 -1
  30. data/lib/plurimath/math/function/arctan.rb +0 -1
  31. data/lib/plurimath/math/function/arg.rb +0 -1
  32. data/lib/plurimath/math/function/bar.rb +0 -1
  33. data/lib/plurimath/math/function/base.rb +0 -3
  34. data/lib/plurimath/math/function/binary_function.rb +5 -3
  35. data/lib/plurimath/math/function/cancel.rb +0 -1
  36. data/lib/plurimath/math/function/ceil.rb +0 -1
  37. data/lib/plurimath/math/function/color.rb +0 -1
  38. data/lib/plurimath/math/function/cos.rb +0 -1
  39. data/lib/plurimath/math/function/cosh.rb +0 -1
  40. data/lib/plurimath/math/function/cot.rb +0 -1
  41. data/lib/plurimath/math/function/coth.rb +0 -1
  42. data/lib/plurimath/math/function/csc.rb +0 -1
  43. data/lib/plurimath/math/function/csch.rb +0 -1
  44. data/lib/plurimath/math/function/ddot.rb +0 -1
  45. data/lib/plurimath/math/function/deg.rb +0 -1
  46. data/lib/plurimath/math/function/det.rb +0 -1
  47. data/lib/plurimath/math/function/dim.rb +0 -1
  48. data/lib/plurimath/math/function/dot.rb +0 -1
  49. data/lib/plurimath/math/function/exp.rb +0 -1
  50. data/lib/plurimath/math/function/fenced.rb +1 -197
  51. data/lib/plurimath/math/function/floor.rb +0 -1
  52. data/lib/plurimath/math/function/font_style/bold-fraktur.rb +0 -1
  53. data/lib/plurimath/math/function/font_style/bold-italic.rb +0 -1
  54. data/lib/plurimath/math/function/font_style/bold-sans-serif.rb +0 -1
  55. data/lib/plurimath/math/function/font_style/bold-script.rb +0 -1
  56. data/lib/plurimath/math/function/font_style/bold.rb +0 -1
  57. data/lib/plurimath/math/function/font_style/double_struck.rb +0 -1
  58. data/lib/plurimath/math/function/font_style/fraktur.rb +0 -1
  59. data/lib/plurimath/math/function/font_style/italic.rb +0 -1
  60. data/lib/plurimath/math/function/font_style/monospace.rb +0 -1
  61. data/lib/plurimath/math/function/font_style/normal.rb +0 -1
  62. data/lib/plurimath/math/function/font_style/sans-serif-bold-italic.rb +0 -1
  63. data/lib/plurimath/math/function/font_style/sans-serif-italic.rb +0 -1
  64. data/lib/plurimath/math/function/font_style/sans-serif.rb +0 -1
  65. data/lib/plurimath/math/function/font_style/script.rb +0 -1
  66. data/lib/plurimath/math/function/font_style.rb +29 -2
  67. data/lib/plurimath/math/function/frac.rb +0 -3
  68. data/lib/plurimath/math/function/gcd.rb +0 -1
  69. data/lib/plurimath/math/function/glb.rb +0 -1
  70. data/lib/plurimath/math/function/hat.rb +0 -1
  71. data/lib/plurimath/math/function/hom.rb +0 -1
  72. data/lib/plurimath/math/function/inf.rb +1 -2
  73. data/lib/plurimath/math/function/int.rb +2 -3
  74. data/lib/plurimath/math/function/intent.rb +0 -1
  75. data/lib/plurimath/math/function/ker.rb +0 -1
  76. data/lib/plurimath/math/function/lcm.rb +0 -1
  77. data/lib/plurimath/math/function/left.rb +0 -1
  78. data/lib/plurimath/math/function/lg.rb +0 -1
  79. data/lib/plurimath/math/function/lim.rb +1 -2
  80. data/lib/plurimath/math/function/liminf.rb +0 -1
  81. data/lib/plurimath/math/function/limits.rb +0 -1
  82. data/lib/plurimath/math/function/limsup.rb +0 -1
  83. data/lib/plurimath/math/function/linebreak.rb +0 -1
  84. data/lib/plurimath/math/function/ln.rb +0 -1
  85. data/lib/plurimath/math/function/log.rb +1 -2
  86. data/lib/plurimath/math/function/longdiv.rb +0 -3
  87. data/lib/plurimath/math/function/lub.rb +0 -1
  88. data/lib/plurimath/math/function/max.rb +0 -1
  89. data/lib/plurimath/math/function/mbox.rb +0 -1
  90. data/lib/plurimath/math/function/menclose.rb +0 -3
  91. data/lib/plurimath/math/function/merror.rb +0 -3
  92. data/lib/plurimath/math/function/mglyph.rb +0 -3
  93. data/lib/plurimath/math/function/min.rb +0 -1
  94. data/lib/plurimath/math/function/mlabeledtr.rb +0 -20
  95. data/lib/plurimath/math/function/mod.rb +0 -1
  96. data/lib/plurimath/math/function/mpadded.rb +0 -3
  97. data/lib/plurimath/math/function/ms.rb +1 -77
  98. data/lib/plurimath/math/function/msgroup.rb +0 -27
  99. data/lib/plurimath/math/function/msline.rb +0 -3
  100. data/lib/plurimath/math/function/multiscript.rb +0 -14
  101. data/lib/plurimath/math/function/nary.rb +4 -0
  102. data/lib/plurimath/math/function/none.rb +1 -4
  103. data/lib/plurimath/math/function/norm.rb +0 -1
  104. data/lib/plurimath/math/function/obrace.rb +0 -1
  105. data/lib/plurimath/math/function/oint.rb +2 -3
  106. data/lib/plurimath/math/function/over.rb +0 -3
  107. data/lib/plurimath/math/function/overset.rb +3 -3
  108. data/lib/plurimath/math/function/phantom.rb +0 -3
  109. data/lib/plurimath/math/function/power.rb +0 -3
  110. data/lib/plurimath/math/function/power_base.rb +0 -3
  111. data/lib/plurimath/math/function/prod.rb +2 -3
  112. data/lib/plurimath/math/function/right.rb +0 -1
  113. data/lib/plurimath/math/function/root.rb +0 -3
  114. data/lib/plurimath/math/function/rule.rb +0 -1
  115. data/lib/plurimath/math/function/scarries.rb +0 -3
  116. data/lib/plurimath/math/function/scarry.rb +22 -0
  117. data/lib/plurimath/math/function/sec.rb +0 -1
  118. data/lib/plurimath/math/function/sech.rb +0 -1
  119. data/lib/plurimath/math/function/semantics.rb +0 -15
  120. data/lib/plurimath/math/function/sin.rb +0 -1
  121. data/lib/plurimath/math/function/sinh.rb +0 -1
  122. data/lib/plurimath/math/function/sqrt.rb +0 -3
  123. data/lib/plurimath/math/function/stackrel.rb +0 -3
  124. data/lib/plurimath/math/function/substack.rb +0 -1
  125. data/lib/plurimath/math/function/sum.rb +2 -3
  126. data/lib/plurimath/math/function/sup.rb +0 -1
  127. data/lib/plurimath/math/function/table/align.rb +0 -1
  128. data/lib/plurimath/math/function/table/array.rb +0 -1
  129. data/lib/plurimath/math/function/table/bmatrix.rb +0 -1
  130. data/lib/plurimath/math/function/table/cases.rb +0 -1
  131. data/lib/plurimath/math/function/table/eqarray.rb +0 -1
  132. data/lib/plurimath/math/function/table/matrix.rb +0 -1
  133. data/lib/plurimath/math/function/table/multline.rb +0 -1
  134. data/lib/plurimath/math/function/table/pmatrix.rb +0 -1
  135. data/lib/plurimath/math/function/table/split.rb +0 -1
  136. data/lib/plurimath/math/function/table/vmatrix.rb +0 -1
  137. data/lib/plurimath/math/function/table.rb +10 -23
  138. data/lib/plurimath/math/function/tan.rb +0 -1
  139. data/lib/plurimath/math/function/tanh.rb +0 -1
  140. data/lib/plurimath/math/function/td.rb +0 -4
  141. data/lib/plurimath/math/function/ternary_function.rb +6 -2
  142. data/lib/plurimath/math/function/text.rb +1 -6
  143. data/lib/plurimath/math/function/tilde.rb +4 -1
  144. data/lib/plurimath/math/function/tr.rb +0 -13
  145. data/lib/plurimath/math/function/ubrace.rb +0 -1
  146. data/lib/plurimath/math/function/ul.rb +4 -1
  147. data/lib/plurimath/math/function/underover.rb +0 -3
  148. data/lib/plurimath/math/function/underset.rb +22 -45
  149. data/lib/plurimath/math/function/unitsml.rb +2 -1
  150. data/lib/plurimath/math/function/vec.rb +4 -1
  151. data/lib/plurimath/math/function.rb +107 -10
  152. data/lib/plurimath/math/number.rb +9 -7
  153. data/lib/plurimath/math/symbols/comma.rb +1 -1
  154. data/lib/plurimath/math/symbols/plus.rb +1 -1
  155. data/lib/plurimath/math/symbols/symbol.rb +17 -4
  156. data/lib/plurimath/math.rb +8 -26
  157. data/lib/plurimath/mathml/constants.rb +1 -0
  158. data/lib/plurimath/mathml/formula_transformation.rb +442 -0
  159. data/lib/plurimath/mathml/parser.rb +11 -50
  160. data/lib/plurimath/mathml/translator.rb +584 -0
  161. data/lib/plurimath/mathml/utility/formula_transformation.rb +2 -341
  162. data/lib/plurimath/mathml.rb +5 -0
  163. data/lib/plurimath/number_formatter.rb +2 -1
  164. data/lib/plurimath/omml/parser.rb +10 -7
  165. data/lib/plurimath/omml/transform.rb +17 -5
  166. data/lib/plurimath/omml.rb +3 -0
  167. data/lib/plurimath/setup/opal.rb.erb +3 -4
  168. data/lib/plurimath/unicode_math/parse.rb +0 -5
  169. data/lib/plurimath/unicode_math/parser.rb +1 -6
  170. data/lib/plurimath/unicode_math/parsing_rules/absence_rules.rb +0 -1
  171. data/lib/plurimath/unicode_math/parsing_rules/common_rules.rb +0 -1
  172. data/lib/plurimath/unicode_math/parsing_rules/constants_rules.rb +0 -1
  173. data/lib/plurimath/unicode_math/parsing_rules/masked.rb +0 -1
  174. data/lib/plurimath/unicode_math/parsing_rules/sub_sup.rb +0 -1
  175. data/lib/plurimath/unicode_math/parsing_rules.rb +14 -0
  176. data/lib/plurimath/unicode_math.rb +6 -0
  177. data/lib/plurimath/utility.rb +1 -1
  178. data/lib/plurimath/version.rb +1 -1
  179. data/lib/plurimath/xml_engine/oga.rb +6 -6
  180. data/lib/plurimath/xml_engine/ox_engine.rb +2 -2
  181. data/lib/plurimath/xml_engine.rb +2 -0
  182. data/lib/plurimath.rb +43 -18
  183. data/plurimath.gemspec +5 -4
  184. metadata +33 -15
  185. data/lib/plurimath/mathml/utility/empty_defined_methods.rb +0 -483
  186. data/lib/plurimath/mathml/utility.rb +0 -369
@@ -1,483 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Plurimath
4
- class Mathml
5
- module Utility
6
- module EmptyDefinedMethods
7
- def mi_value; end
8
-
9
- def mo_value; end
10
-
11
- def mn_value; end
12
-
13
- def ms_value; end
14
-
15
- def mtd_value; end
16
-
17
- def mtr_value; end
18
-
19
- def msub_value; end
20
-
21
- def none_value; end
22
-
23
- def msup_value; end
24
-
25
- def mrow_value; end
26
-
27
- def mroot_value; end
28
-
29
- def mover_value; end
30
-
31
- def mtext_value; end
32
-
33
- def mfrac_value; end
34
-
35
- def msrow_value; end
36
-
37
- def msqrt_value; end
38
-
39
- def mstack_value; end
40
-
41
- def mspace_value; end
42
-
43
- def mtable_value; end
44
-
45
- def msline_value; end
46
-
47
- def mstyle_value; end
48
-
49
- def munder_value; end
50
-
51
- def merror_value; end
52
-
53
- def msubsup_value; end
54
-
55
- def msgroup_value; end
56
-
57
- def mfenced_value; end
58
-
59
- def mpadded_value; end
60
-
61
- def mphantom_value; end
62
-
63
- def mlongdiv_value; end
64
-
65
- def menclose_value; end
66
-
67
- def mscarries_value; end
68
-
69
- def semantics_value; end
70
-
71
- def mlabeledtr_value; end
72
-
73
- def munderover_value; end
74
-
75
- def malignmark_value; end
76
-
77
- def maligngroup_value; end
78
-
79
- def mmultiscripts_value; end
80
-
81
- def id; end
82
-
83
- def dir; end
84
-
85
- def color; end
86
-
87
- def mathsize; end
88
-
89
- def fontsize; end
90
-
91
- def mathcolor; end
92
-
93
- def fontstyle; end
94
-
95
- def fontweight; end
96
-
97
- def malignmark; end
98
-
99
- def fontfamily; end
100
-
101
- def background; end
102
-
103
- def mathvariant; end
104
-
105
- def scriptlevel; end
106
-
107
- def decimalpoint; end
108
-
109
- def displaystyle; end
110
-
111
- def scriptminsize; end
112
-
113
- def mathbackground; end
114
-
115
- def mathbackgroundcolor; end
116
-
117
- def infixlinebreakstyle; end
118
-
119
- def scriptsizemultiplier; end
120
-
121
- def accent; end
122
-
123
- def annotation; end
124
-
125
- def accentunder; end
126
-
127
- def align; end
128
-
129
- def alignmentscope; end
130
-
131
- def bevelled; end
132
-
133
- def charalign; end
134
-
135
- def charspacing; end
136
-
137
- def close; end
138
-
139
- def columnalign; end
140
-
141
- def columnlines; end
142
-
143
- def columnspacing; end
144
-
145
- def columnspan; end
146
-
147
- def columnwidth; end
148
-
149
- def crossout; end
150
-
151
- def denomalign; end
152
-
153
- def depth; end
154
-
155
- def edge; end
156
-
157
- def equalcolumns; end
158
-
159
- def equalrows; end
160
-
161
- def fence; end
162
-
163
- def form; end
164
-
165
- def frame; end
166
-
167
- def framespacing; end
168
-
169
- def groupalign; end
170
-
171
- def height; end
172
-
173
- def indentalign; end
174
-
175
- def indentalignfirst; end
176
-
177
- def indentalignlast; end
178
-
179
- def indentshift; end
180
-
181
- def indentshiftfirst; end
182
-
183
- def indentshiftlast; end
184
-
185
- def indenttarget; end
186
-
187
- def largeop; end
188
-
189
- def intent; end
190
-
191
- def leftoverhang; end
192
-
193
- def length; end
194
-
195
- def linebreak; end
196
-
197
- def linebreakmultchar; end
198
-
199
- def linebreakstyle; end
200
-
201
- def lineleading; end
202
-
203
- def linethickness; end
204
-
205
- def location; end
206
-
207
- def longdivstyle; end
208
-
209
- def lquote; end
210
-
211
- def lspace; end
212
-
213
- def maxsize; end
214
-
215
- def minlabelspacing; end
216
-
217
- def minsize; end
218
-
219
- def movablelimits; end
220
-
221
- def mslinethickness; end
222
-
223
- def notation; end
224
-
225
- def numalign; end
226
-
227
- def open; end
228
-
229
- def position; end
230
-
231
- def rightoverhang; end
232
-
233
- def rowalign; end
234
-
235
- def rowlines; end
236
-
237
- def rowspacing; end
238
-
239
- def rowspan; end
240
-
241
- def rquote; end
242
-
243
- def rspace; end
244
-
245
- def selection; end
246
-
247
- def separator; end
248
-
249
- def separators; end
250
-
251
- def shift; end
252
-
253
- def side; end
254
-
255
- def stackalign; end
256
-
257
- def stretchy; end
258
-
259
- def subscriptshift; end
260
-
261
- def superscriptshift; end
262
-
263
- def symmetric; end
264
-
265
- def valign; end
266
-
267
- def width; end
268
-
269
- def veryverythinmathspace; end
270
-
271
- def verythinmathspace; end
272
-
273
- def thinmathspace; end
274
-
275
- def mediummathspace; end
276
-
277
- def thickmathspace; end
278
-
279
- def verythickmathspace; end
280
-
281
- def veryverythickmathspace; end
282
-
283
- def mscarry_value; end
284
-
285
- def mfraction_value; end
286
-
287
- def mprescripts_value; end
288
-
289
- def mglyph_value; end
290
-
291
- def __root; end
292
-
293
- def __parent; end
294
-
295
- def __root=(_); end
296
-
297
- def __parent=(_); end
298
-
299
- def malignmark=(_); end
300
-
301
- def mathcolor=(_); end
302
-
303
- def mathbackground=(_); end
304
-
305
- def mathsize=(_); end
306
-
307
- def dir=(_); end
308
-
309
- def fontfamily=(_); end
310
-
311
- def fontweight=(_); end
312
-
313
- def fontstyle=(_); end
314
-
315
- def fontsize=(_); end
316
-
317
- def color=(_); end
318
-
319
- def mathbackgroundcolor=(_); end
320
-
321
- def background=(_); end
322
-
323
- def scriptlevel=(_); end
324
-
325
- def displaystyle=(_); end
326
-
327
- def scriptsizemultiplier=(_); end
328
-
329
- def scriptminsize=(_); end
330
-
331
- def infixlinebreakstyle=(_); end
332
-
333
- def decimalpoint=(_); end
334
-
335
- def align=(_); end
336
-
337
- def alignmentscope=(_); end
338
-
339
- def charalign=(_); end
340
-
341
- def charspacing=(_); end
342
-
343
- def close=(_); end
344
-
345
- def columnalign=(_); end
346
-
347
- def columnlines=(_); end
348
-
349
- def columnspacing=(_); end
350
-
351
- def columnspan=(_); end
352
-
353
- def columnwidth=(_); end
354
-
355
- def crossout=(_); end
356
-
357
- def denomalign=(_); end
358
-
359
- def depth=(_); end
360
-
361
- def edge=(_); end
362
-
363
- def equalcolumns=(_); end
364
-
365
- def equalrows=(_); end
366
-
367
- def fence=(_); end
368
-
369
- def form=(_); end
370
-
371
- def frame=(_); end
372
-
373
- def framespacing=(_); end
374
-
375
- def groupalign=(_); end
376
-
377
- def height=(_); end
378
-
379
- def indentalign=(_); end
380
-
381
- def indentalignfirst=(_); end
382
-
383
- def indentalignlast=(_); end
384
-
385
- def indentshift=(_); end
386
-
387
- def indentshiftfirst=(_); end
388
-
389
- def indentshiftlast=(_); end
390
-
391
- def indenttarget=(_); end
392
-
393
- def intent=(_); end
394
-
395
- def largeop=(_); end
396
-
397
- def leftoverhang=(_); end
398
-
399
- def length=(_); end
400
-
401
- def linebreakmultchar=(_); end
402
-
403
- def lineleading=(_); end
404
-
405
- def location=(_); end
406
-
407
- def longdivstyle=(_); end
408
-
409
- def lquote=(_); end
410
-
411
- def lspace=(_); end
412
-
413
- def maxsize=(_); end
414
-
415
- def minlabelspacing=(_); end
416
-
417
- def minsize=(_); end
418
-
419
- def movablelimits=(_); end
420
-
421
- def mslinethickness=(_); end
422
-
423
- def numalign=(_); end
424
-
425
- def open=(_); end
426
-
427
- def position=(_); end
428
-
429
- def rightoverhang=(_); end
430
-
431
- def rowalign=(_); end
432
-
433
- def rowlines=(_); end
434
-
435
- def rowspacing=(_); end
436
-
437
- def rowspan=(_); end
438
-
439
- def rquote=(_); end
440
-
441
- def selection=(_); end
442
-
443
- def separator=(_); end
444
-
445
- def separators=(_); end
446
-
447
- def shift=(_); end
448
-
449
- def side=(_); end
450
-
451
- def stackalign=(_); end
452
-
453
- def stretchy=(_); end
454
-
455
- def subscriptshift=(_); end
456
-
457
- def superscriptshift=(_); end
458
-
459
- def symmetric=(_); end
460
-
461
- def valign=(_); end
462
-
463
- def width=(_); end
464
-
465
- def veryverythinmathspace=(_); end
466
-
467
- def verythinmathspace=(_); end
468
-
469
- def thinmathspace=(_); end
470
-
471
- def mediummathspace=(_); end
472
-
473
- def thickmathspace=(_); end
474
-
475
- def verythickmathspace=(_); end
476
-
477
- def veryverythickmathspace=(_); end
478
-
479
- def mprescripts_value=(_); end
480
- end
481
- end
482
- end
483
- end