plurimath 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +13 -0
- data/.github/workflows/release.yml +22 -0
- data/.hound.yml +5 -0
- data/.rubocop.yml +8 -0
- data/AsciiMath-Supported-Data.adoc +1994 -274
- data/Gemfile +2 -0
- data/Latex-Supported-Data.adoc +1875 -1868
- data/MathML-Supported-Data.adoc +280 -263
- data/README.adoc +22 -20
- data/lib/plurimath/asciimath/constants.rb +187 -141
- data/lib/plurimath/asciimath/parse.rb +104 -39
- data/lib/plurimath/asciimath/parser.rb +3 -1
- data/lib/plurimath/asciimath/transform.rb +1074 -238
- data/lib/plurimath/html/parse.rb +1 -1
- data/lib/plurimath/latex/constants.rb +3229 -1432
- data/lib/plurimath/latex/parse.rb +108 -85
- data/lib/plurimath/latex/parser.rb +11 -4
- data/lib/plurimath/latex/transform.rb +354 -99
- data/lib/plurimath/math/base.rb +15 -0
- data/lib/plurimath/math/formula.rb +90 -13
- data/lib/plurimath/math/function/bar.rb +35 -1
- data/lib/plurimath/math/function/base.rb +25 -4
- data/lib/plurimath/math/function/binary_function.rb +101 -19
- data/lib/plurimath/math/function/cancel.rb +8 -0
- data/lib/plurimath/math/function/ceil.rb +3 -0
- data/lib/plurimath/math/function/color.rb +15 -5
- data/lib/plurimath/math/function/f.rb +8 -0
- data/lib/plurimath/math/function/fenced.rb +95 -8
- data/lib/plurimath/math/function/floor.rb +15 -0
- data/lib/plurimath/math/function/font_style/bold.rb +19 -0
- data/lib/plurimath/math/function/font_style/double_struck.rb +19 -0
- data/lib/plurimath/math/function/font_style/fraktur.rb +19 -0
- data/lib/plurimath/math/function/font_style/italic.rb +37 -0
- data/lib/plurimath/math/function/font_style/monospace.rb +19 -0
- data/lib/plurimath/math/function/font_style/normal.rb +37 -0
- data/lib/plurimath/math/function/font_style/sans-serif.rb +19 -0
- data/lib/plurimath/math/function/font_style/script.rb +19 -0
- data/lib/plurimath/math/function/font_style.rb +18 -5
- data/lib/plurimath/math/function/frac.rb +33 -3
- data/lib/plurimath/math/function/g.rb +7 -0
- data/lib/plurimath/math/function/hat.rb +12 -0
- data/lib/plurimath/math/function/inf.rb +21 -0
- data/lib/plurimath/math/function/int.rb +23 -2
- data/lib/plurimath/math/function/left.rb +25 -1
- data/lib/plurimath/math/function/lim.rb +40 -2
- data/lib/plurimath/math/function/limits.rb +9 -0
- data/lib/plurimath/math/function/log.rb +55 -4
- data/lib/plurimath/math/function/longdiv.rb +12 -0
- data/lib/plurimath/math/function/mbox.rb +31 -0
- data/lib/plurimath/math/function/menclose.rb +46 -0
- data/lib/plurimath/math/function/merror.rb +12 -0
- data/lib/plurimath/math/function/mod.rb +19 -4
- data/lib/plurimath/math/function/msgroup.rb +37 -0
- data/lib/plurimath/math/function/msline.rb +12 -0
- data/lib/plurimath/math/function/multiscript.rb +19 -0
- data/lib/plurimath/math/function/norm.rb +17 -1
- data/lib/plurimath/math/function/obrace.rb +17 -0
- data/lib/plurimath/math/function/oint.rb +2 -2
- data/lib/plurimath/math/function/over.rb +12 -5
- data/lib/plurimath/math/function/overset.rb +34 -5
- data/lib/plurimath/math/function/phantom.rb +28 -0
- data/lib/plurimath/math/function/power.rb +27 -9
- data/lib/plurimath/math/function/power_base.rb +109 -11
- data/lib/plurimath/math/function/prod.rb +25 -4
- data/lib/plurimath/math/function/right.rb +22 -2
- data/lib/plurimath/math/function/root.rb +23 -1
- data/lib/plurimath/math/function/rule.rb +33 -0
- data/lib/plurimath/math/function/scarries.rb +12 -0
- data/lib/plurimath/math/function/scarry.rb +12 -0
- data/lib/plurimath/math/function/sqrt.rb +23 -1
- data/lib/plurimath/math/function/stackrel.rb +27 -0
- data/lib/plurimath/math/function/substack.rb +7 -0
- data/lib/plurimath/math/function/sum.rb +50 -2
- data/lib/plurimath/math/function/sup.rb +3 -0
- data/lib/plurimath/math/function/table/align.rb +5 -5
- data/lib/plurimath/math/function/table/array.rb +25 -6
- data/lib/plurimath/math/function/table/bmatrix.rb +18 -7
- data/lib/plurimath/math/function/table/matrix.rb +13 -5
- data/lib/plurimath/math/function/table/multline.rb +5 -5
- data/lib/plurimath/math/function/table/pmatrix.rb +5 -5
- data/lib/plurimath/math/function/table/split.rb +5 -5
- data/lib/plurimath/math/function/table/vmatrix.rb +5 -6
- data/lib/plurimath/math/function/table.rb +185 -27
- data/lib/plurimath/math/function/td.rb +22 -9
- data/lib/plurimath/math/function/ternary_function.rb +74 -9
- data/lib/plurimath/math/function/text.rb +36 -11
- data/lib/plurimath/math/function/tr.rb +23 -4
- data/lib/plurimath/math/function/ubrace.rb +17 -0
- data/lib/plurimath/math/function/ul.rb +29 -0
- data/lib/plurimath/math/function/unary_function.rb +81 -8
- data/lib/plurimath/math/function/underline.rb +12 -0
- data/lib/plurimath/math/function/underover.rb +107 -0
- data/lib/plurimath/math/function/underset.rb +39 -0
- data/lib/plurimath/math/function/vec.rb +7 -1
- data/lib/plurimath/math/number.rb +5 -5
- data/lib/plurimath/math/symbol.rb +51 -12
- data/lib/plurimath/math/unicode.rb +11 -0
- data/lib/plurimath/math.rb +7 -3
- data/lib/plurimath/mathml/constants.rb +224 -147
- data/lib/plurimath/mathml/parser.rb +24 -8
- data/lib/plurimath/mathml/transform.rb +249 -153
- data/lib/plurimath/omml/parser.rb +24 -4
- data/lib/plurimath/omml/transform.rb +219 -157
- data/lib/plurimath/utility.rb +342 -20
- data/lib/plurimath/version.rb +1 -1
- metadata +21 -6
- data/.github/workflows/test.yml +0 -33
- data/lib/plurimath/mathml/parse.rb +0 -68
- data/lib/plurimath/omml/constants.rb +0 -154
@@ -1,154 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Plurimath
|
4
|
-
class Omml
|
5
|
-
class Constants
|
6
|
-
TAGS = %w[
|
7
|
-
lastRenderedPageBreak
|
8
|
-
oMathParaPr
|
9
|
-
borderBoxPr
|
10
|
-
wrapIndent
|
11
|
-
strikeTLBR
|
12
|
-
strikeBLTR
|
13
|
-
groupChrPr
|
14
|
-
wrapRight
|
15
|
-
smallFrac
|
16
|
-
oMathPara
|
17
|
-
hideRight
|
18
|
-
brkBinSub
|
19
|
-
borderBox
|
20
|
-
sSubSupPr
|
21
|
-
zeroDesc
|
22
|
-
mathFont
|
23
|
-
limUppPr
|
24
|
-
limLowPr
|
25
|
-
hideLeft
|
26
|
-
groupChr
|
27
|
-
zeroWid
|
28
|
-
zeroAsc
|
29
|
-
strikeV
|
30
|
-
strikeH
|
31
|
-
rSpRule
|
32
|
-
rMargin
|
33
|
-
plcHide
|
34
|
-
phantPr
|
35
|
-
objDist
|
36
|
-
noBreak
|
37
|
-
naryLim
|
38
|
-
maxDist
|
39
|
-
lMargin
|
40
|
-
intraSp
|
41
|
-
interSp
|
42
|
-
hideTop
|
43
|
-
hideBot
|
44
|
-
eqArrPr
|
45
|
-
dispDef
|
46
|
-
degHide
|
47
|
-
cGpRule
|
48
|
-
supHide
|
49
|
-
subHide
|
50
|
-
vertJc
|
51
|
-
transp
|
52
|
-
sSupPr
|
53
|
-
sSubPr
|
54
|
-
sepChr
|
55
|
-
postSp
|
56
|
-
naryPr
|
57
|
-
mathPr
|
58
|
-
limUpp
|
59
|
-
limLow
|
60
|
-
rFonts
|
61
|
-
limLoc
|
62
|
-
intLim
|
63
|
-
funcPr
|
64
|
-
endChr
|
65
|
-
ctrlPr
|
66
|
-
brkBin
|
67
|
-
begChr
|
68
|
-
baseJc
|
69
|
-
alnScr
|
70
|
-
sPrePr
|
71
|
-
radPr
|
72
|
-
preSp
|
73
|
-
phant
|
74
|
-
opEmu
|
75
|
-
oMath
|
76
|
-
fName
|
77
|
-
eqArr
|
78
|
-
defJc
|
79
|
-
count
|
80
|
-
boxPr
|
81
|
-
barPr
|
82
|
-
argSz
|
83
|
-
argPr
|
84
|
-
accPr
|
85
|
-
type
|
86
|
-
show
|
87
|
-
mcPr
|
88
|
-
mcJc
|
89
|
-
grow
|
90
|
-
diff
|
91
|
-
sty
|
92
|
-
shp
|
93
|
-
scr
|
94
|
-
rSp
|
95
|
-
rPr
|
96
|
-
sup
|
97
|
-
sub
|
98
|
-
pos
|
99
|
-
num
|
100
|
-
nor
|
101
|
-
mPr
|
102
|
-
mcs
|
103
|
-
lit
|
104
|
-
lim
|
105
|
-
fPr
|
106
|
-
dPr
|
107
|
-
den
|
108
|
-
deg
|
109
|
-
cSp
|
110
|
-
chr
|
111
|
-
cGp
|
112
|
-
brk
|
113
|
-
box
|
114
|
-
bar
|
115
|
-
aln
|
116
|
-
mr
|
117
|
-
mc
|
118
|
-
jc
|
119
|
-
t
|
120
|
-
r
|
121
|
-
i
|
122
|
-
m
|
123
|
-
e
|
124
|
-
].freeze
|
125
|
-
SUB_SUP_TAG = %w[
|
126
|
-
sSubSup
|
127
|
-
func
|
128
|
-
sPre
|
129
|
-
sSup
|
130
|
-
sSub
|
131
|
-
nary
|
132
|
-
acc
|
133
|
-
rad
|
134
|
-
f
|
135
|
-
d
|
136
|
-
].freeze
|
137
|
-
UNARY_FUNCTIONS = %w[
|
138
|
-
arcsin
|
139
|
-
arctan
|
140
|
-
arccos
|
141
|
-
coth
|
142
|
-
tanh
|
143
|
-
sinh
|
144
|
-
cosh
|
145
|
-
tan
|
146
|
-
cos
|
147
|
-
cot
|
148
|
-
csc
|
149
|
-
sin
|
150
|
-
sec
|
151
|
-
].freeze
|
152
|
-
end
|
153
|
-
end
|
154
|
-
end
|