mathtype_to_mathml 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/.travis.yml +3 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +45 -0
- data/Rakefile +7 -0
- data/lib/mathtype_to_mathml.rb +28 -0
- data/lib/mathtype_to_mathml/char_replacer.rb +311 -0
- data/lib/mathtype_to_mathml/mover.rb +151 -0
- data/lib/mathtype_to_mathml/version.rb +3 -0
- data/lib/transform.xsl +104 -0
- data/lib/xsl/arrow.xsl +319 -0
- data/lib/xsl/brace.xsl +55 -0
- data/lib/xsl/char.xsl +35 -0
- data/lib/xsl/embellishment.xsl +389 -0
- data/lib/xsl/matrix.xsl +116 -0
- data/lib/xsl/pile.xsl +54 -0
- data/lib/xsl/subsup.xsl +55 -0
- data/lib/xsl/sum.xsl +57 -0
- data/lib/xsl/union_intersection.xsl +104 -0
- data/mathtype_to_mathml.gemspec +28 -0
- data/spec/fixtures/expected/arrows.xml +389 -0
- data/spec/fixtures/expected/embellishments.xml +178 -0
- data/spec/fixtures/expected/equation1.xml +52 -0
- data/spec/fixtures/expected/equation10.xml +19 -0
- data/spec/fixtures/expected/equation11.xml +17 -0
- data/spec/fixtures/expected/equation12.xml +34 -0
- data/spec/fixtures/expected/equation13.xml +113 -0
- data/spec/fixtures/expected/equation2.xml +33 -0
- data/spec/fixtures/expected/equation3.xml +324 -0
- data/spec/fixtures/expected/equation4.xml +14 -0
- data/spec/fixtures/expected/equation5.xml +23 -0
- data/spec/fixtures/expected/equation6.xml +13 -0
- data/spec/fixtures/expected/equation7.xml +19 -0
- data/spec/fixtures/expected/equation8.xml +17 -0
- data/spec/fixtures/expected/equation9.xml +15 -0
- data/spec/fixtures/input/arrows.bin +0 -0
- data/spec/fixtures/input/embellishments.bin +0 -0
- data/spec/fixtures/input/equation1.bin +0 -0
- data/spec/fixtures/input/equation10.bin +0 -0
- data/spec/fixtures/input/equation11.bin +0 -0
- data/spec/fixtures/input/equation12.bin +0 -0
- data/spec/fixtures/input/equation13.bin +0 -0
- data/spec/fixtures/input/equation2.bin +0 -0
- data/spec/fixtures/input/equation3.bin +0 -0
- data/spec/fixtures/input/equation4.bin +0 -0
- data/spec/fixtures/input/equation5.bin +0 -0
- data/spec/fixtures/input/equation6.bin +0 -0
- data/spec/fixtures/input/equation7.bin +0 -0
- data/spec/fixtures/input/equation8.bin +0 -0
- data/spec/fixtures/input/equation9.bin +0 -0
- data/spec/html_output.rb +28 -0
- data/spec/mathtype_to_mathml_spec.rb +19 -0
- data/spec/spec_helper.rb +2 -0
- metadata +220 -0
@@ -0,0 +1,324 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<math display="block">
|
3
|
+
<mrow>
|
4
|
+
<mstyle displaystyle="true">
|
5
|
+
<munderover>
|
6
|
+
<mo>∑</mo>
|
7
|
+
<mrow>
|
8
|
+
<mi>b</mi>
|
9
|
+
<mo>=</mo>
|
10
|
+
<mn>4</mn>
|
11
|
+
</mrow>
|
12
|
+
<mrow>
|
13
|
+
<mi>i</mi>
|
14
|
+
<mo>=</mo>
|
15
|
+
<mn>3</mn>
|
16
|
+
</mrow>
|
17
|
+
</munderover>
|
18
|
+
<mrow>
|
19
|
+
<mi>t</mi>
|
20
|
+
<mstyle displaystyle="true">
|
21
|
+
<munderover>
|
22
|
+
<mo>∩</mo>
|
23
|
+
<mrow>
|
24
|
+
<mi>i</mi>
|
25
|
+
<mo>=</mo>
|
26
|
+
<mn>1</mn>
|
27
|
+
</mrow>
|
28
|
+
<mrow>
|
29
|
+
<mi>n</mi>
|
30
|
+
</mrow>
|
31
|
+
</munderover>
|
32
|
+
<mrow>
|
33
|
+
<msub>
|
34
|
+
<mrow>
|
35
|
+
<mi>X</mi>
|
36
|
+
</mrow>
|
37
|
+
<mrow>
|
38
|
+
<mi>i</mi>
|
39
|
+
</mrow>
|
40
|
+
</msub>
|
41
|
+
</mrow>
|
42
|
+
</mstyle>
|
43
|
+
<mrow>
|
44
|
+
<mo>{</mo>
|
45
|
+
<mrow>
|
46
|
+
<mrow>
|
47
|
+
<mo>[</mo>
|
48
|
+
<mrow>
|
49
|
+
<mrow>
|
50
|
+
<mo>(</mo>
|
51
|
+
<mrow>
|
52
|
+
<mo>±</mo>
|
53
|
+
<mo>≠</mo>
|
54
|
+
<mo>≤</mo>
|
55
|
+
<mo>∂</mo>
|
56
|
+
<mo>→</mo>
|
57
|
+
<mo>→</mo>
|
58
|
+
<mi>θ</mi>
|
59
|
+
<mi>π</mi>
|
60
|
+
<mrow>
|
61
|
+
<mo>〈</mo>
|
62
|
+
<mrow>
|
63
|
+
<mi>d</mi>
|
64
|
+
</mrow>
|
65
|
+
<mo>|</mo>
|
66
|
+
<mrow>
|
67
|
+
<mi>b</mi>
|
68
|
+
</mrow>
|
69
|
+
<mo>〉</mo>
|
70
|
+
</mrow>
|
71
|
+
</mrow>
|
72
|
+
<mo>)</mo>
|
73
|
+
</mrow>
|
74
|
+
</mrow>
|
75
|
+
<mo>]</mo>
|
76
|
+
</mrow>
|
77
|
+
</mrow>
|
78
|
+
<mo>}</mo>
|
79
|
+
</mrow>
|
80
|
+
</mrow>
|
81
|
+
</mstyle>
|
82
|
+
<mrow>
|
83
|
+
<mo>(</mo>
|
84
|
+
<mrow>
|
85
|
+
<mtable columnalign="left">
|
86
|
+
<mtr columnalign="left">
|
87
|
+
<mtd columnalign="left">
|
88
|
+
<msub>
|
89
|
+
<mrow>
|
90
|
+
<mi>a</mi>
|
91
|
+
</mrow>
|
92
|
+
<mrow>
|
93
|
+
<mn>1</mn>
|
94
|
+
<mn>1</mn>
|
95
|
+
</mrow>
|
96
|
+
</msub>
|
97
|
+
</mtd>
|
98
|
+
<mtd columnalign="left">
|
99
|
+
<mo>…</mo>
|
100
|
+
</mtd>
|
101
|
+
<mtd columnalign="left">
|
102
|
+
<msub>
|
103
|
+
<mrow>
|
104
|
+
<mi>a</mi>
|
105
|
+
</mrow>
|
106
|
+
<mrow>
|
107
|
+
<mn>1</mn>
|
108
|
+
<mi>n</mi>
|
109
|
+
</mrow>
|
110
|
+
</msub>
|
111
|
+
</mtd>
|
112
|
+
</mtr>
|
113
|
+
<mtr columnalign="left">
|
114
|
+
<mtd columnalign="left">
|
115
|
+
<mo>⋮</mo>
|
116
|
+
</mtd>
|
117
|
+
<mtd columnalign="left">
|
118
|
+
<mo>⋱</mo>
|
119
|
+
</mtd>
|
120
|
+
<mtd columnalign="left">
|
121
|
+
<mo>⋮</mo>
|
122
|
+
</mtd>
|
123
|
+
</mtr>
|
124
|
+
<mtr columnalign="left">
|
125
|
+
<mtd columnalign="left">
|
126
|
+
<msub>
|
127
|
+
<mrow>
|
128
|
+
<mi>a</mi>
|
129
|
+
</mrow>
|
130
|
+
<mrow>
|
131
|
+
<mi>m</mi>
|
132
|
+
<mn>1</mn>
|
133
|
+
</mrow>
|
134
|
+
</msub>
|
135
|
+
</mtd>
|
136
|
+
<mtd columnalign="left">
|
137
|
+
<mo>⋯</mo>
|
138
|
+
</mtd>
|
139
|
+
<mtd columnalign="left">
|
140
|
+
<msub>
|
141
|
+
<mrow>
|
142
|
+
<mi>a</mi>
|
143
|
+
</mrow>
|
144
|
+
<mrow>
|
145
|
+
<mi>m</mi>
|
146
|
+
<mi>n</mi>
|
147
|
+
</mrow>
|
148
|
+
</msub>
|
149
|
+
</mtd>
|
150
|
+
</mtr>
|
151
|
+
</mtable>
|
152
|
+
</mrow>
|
153
|
+
<mo>)</mo>
|
154
|
+
</mrow>
|
155
|
+
<mrow>
|
156
|
+
<mo>(</mo>
|
157
|
+
<mrow>
|
158
|
+
<mtable columnalign="left">
|
159
|
+
<mtr columnalign="left">
|
160
|
+
<mtd columnalign="left">
|
161
|
+
<msub>
|
162
|
+
<mrow>
|
163
|
+
<mi>a</mi>
|
164
|
+
</mrow>
|
165
|
+
<mrow>
|
166
|
+
<mn>1</mn>
|
167
|
+
<mn>1</mn>
|
168
|
+
</mrow>
|
169
|
+
</msub>
|
170
|
+
</mtd>
|
171
|
+
<mtd columnalign="left">
|
172
|
+
<msub>
|
173
|
+
<mrow>
|
174
|
+
<mi>a</mi>
|
175
|
+
</mrow>
|
176
|
+
<mrow>
|
177
|
+
<mn>1</mn>
|
178
|
+
<mn>2</mn>
|
179
|
+
</mrow>
|
180
|
+
</msub>
|
181
|
+
</mtd>
|
182
|
+
<mtd columnalign="left">
|
183
|
+
<msub>
|
184
|
+
<mrow>
|
185
|
+
<mi>a</mi>
|
186
|
+
</mrow>
|
187
|
+
<mrow>
|
188
|
+
<mn>1</mn>
|
189
|
+
<mn>3</mn>
|
190
|
+
</mrow>
|
191
|
+
</msub>
|
192
|
+
</mtd>
|
193
|
+
</mtr>
|
194
|
+
<mtr columnalign="left">
|
195
|
+
<mtd columnalign="left">
|
196
|
+
<msub>
|
197
|
+
<mrow>
|
198
|
+
<mi>a</mi>
|
199
|
+
</mrow>
|
200
|
+
<mrow>
|
201
|
+
<mn>2</mn>
|
202
|
+
<mn>1</mn>
|
203
|
+
</mrow>
|
204
|
+
</msub>
|
205
|
+
</mtd>
|
206
|
+
<mtd columnalign="left">
|
207
|
+
<msub>
|
208
|
+
<mrow>
|
209
|
+
<mi>a</mi>
|
210
|
+
</mrow>
|
211
|
+
<mrow>
|
212
|
+
<mn>2</mn>
|
213
|
+
<mn>2</mn>
|
214
|
+
</mrow>
|
215
|
+
</msub>
|
216
|
+
</mtd>
|
217
|
+
<mtd columnalign="left">
|
218
|
+
<msub>
|
219
|
+
<mrow>
|
220
|
+
<mi>a</mi>
|
221
|
+
</mrow>
|
222
|
+
<mrow>
|
223
|
+
<mn>2</mn>
|
224
|
+
<mn>3</mn>
|
225
|
+
</mrow>
|
226
|
+
</msub>
|
227
|
+
</mtd>
|
228
|
+
</mtr>
|
229
|
+
<mtr columnalign="left">
|
230
|
+
<mtd columnalign="left">
|
231
|
+
<msub>
|
232
|
+
<mrow>
|
233
|
+
<mi>a</mi>
|
234
|
+
</mrow>
|
235
|
+
<mrow>
|
236
|
+
<mn>3</mn>
|
237
|
+
<mn>1</mn>
|
238
|
+
</mrow>
|
239
|
+
</msub>
|
240
|
+
</mtd>
|
241
|
+
<mtd columnalign="left">
|
242
|
+
<msub>
|
243
|
+
<mrow>
|
244
|
+
<mi>a</mi>
|
245
|
+
</mrow>
|
246
|
+
<mrow>
|
247
|
+
<mn>3</mn>
|
248
|
+
<mn>2</mn>
|
249
|
+
</mrow>
|
250
|
+
</msub>
|
251
|
+
</mtd>
|
252
|
+
<mtd columnalign="left">
|
253
|
+
<msub>
|
254
|
+
<mrow>
|
255
|
+
<mi>a</mi>
|
256
|
+
</mrow>
|
257
|
+
<mrow>
|
258
|
+
<mn>3</mn>
|
259
|
+
<mn>3</mn>
|
260
|
+
</mrow>
|
261
|
+
</msub>
|
262
|
+
</mtd>
|
263
|
+
</mtr>
|
264
|
+
</mtable>
|
265
|
+
</mrow>
|
266
|
+
<mo>)</mo>
|
267
|
+
</mrow>
|
268
|
+
<mrow>
|
269
|
+
<mo>(</mo>
|
270
|
+
<mrow>
|
271
|
+
<mtable columnalign="left">
|
272
|
+
<mtr columnalign="left">
|
273
|
+
<mtd columnalign="left">
|
274
|
+
<msub>
|
275
|
+
<mrow>
|
276
|
+
<mi>a</mi>
|
277
|
+
</mrow>
|
278
|
+
<mrow>
|
279
|
+
<mn>1</mn>
|
280
|
+
</mrow>
|
281
|
+
</msub>
|
282
|
+
</mtd>
|
283
|
+
<mtd columnalign="left">
|
284
|
+
<mn>1</mn>
|
285
|
+
</mtd>
|
286
|
+
<mtd columnalign="left">
|
287
|
+
<mn>0</mn>
|
288
|
+
</mtd>
|
289
|
+
</mtr>
|
290
|
+
<mtr columnalign="left">
|
291
|
+
<mtd columnalign="left">
|
292
|
+
<mn>4</mn>
|
293
|
+
</mtd>
|
294
|
+
<mtd columnalign="left">
|
295
|
+
<mo>⋱</mo>
|
296
|
+
</mtd>
|
297
|
+
<mtd columnalign="left">
|
298
|
+
<mn>2</mn>
|
299
|
+
</mtd>
|
300
|
+
</mtr>
|
301
|
+
<mtr columnalign="left">
|
302
|
+
<mtd columnalign="left">
|
303
|
+
<mn>0</mn>
|
304
|
+
</mtd>
|
305
|
+
<mtd columnalign="left">
|
306
|
+
<mn>3</mn>
|
307
|
+
</mtd>
|
308
|
+
<mtd columnalign="left">
|
309
|
+
<msub>
|
310
|
+
<mrow>
|
311
|
+
<mi>a</mi>
|
312
|
+
</mrow>
|
313
|
+
<mrow>
|
314
|
+
<mi>n</mi>
|
315
|
+
</mrow>
|
316
|
+
</msub>
|
317
|
+
</mtd>
|
318
|
+
</mtr>
|
319
|
+
</mtable>
|
320
|
+
</mrow>
|
321
|
+
<mo>)</mo>
|
322
|
+
</mrow>
|
323
|
+
</mrow>
|
324
|
+
</math>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<math display="block">
|
3
|
+
<mrow>
|
4
|
+
<mi>a</mi>
|
5
|
+
<munderover accentunder="true">
|
6
|
+
<mstyle scriptlevel="-1">
|
7
|
+
<mo>⇀</mo>
|
8
|
+
</mstyle>
|
9
|
+
<munder>
|
10
|
+
<mstyle scriptlevel="+1">
|
11
|
+
<mo>↽</mo>
|
12
|
+
</mstyle>
|
13
|
+
<mrow>
|
14
|
+
<mi>b</mi>
|
15
|
+
</mrow>
|
16
|
+
</munder>
|
17
|
+
<mrow>
|
18
|
+
<mi>a</mi>
|
19
|
+
</mrow>
|
20
|
+
</munderover>
|
21
|
+
<mi>c</mi>
|
22
|
+
</mrow>
|
23
|
+
</math>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<math display="block">
|
3
|
+
<mrow>
|
4
|
+
<mstyle displaystyle="true">
|
5
|
+
<msubsup>
|
6
|
+
<mo>∪</mo>
|
7
|
+
<mrow>
|
8
|
+
<mi>a</mi>
|
9
|
+
</mrow>
|
10
|
+
<mrow>
|
11
|
+
<mi>c</mi>
|
12
|
+
</mrow>
|
13
|
+
</msubsup>
|
14
|
+
<mrow>
|
15
|
+
<mi>b</mi>
|
16
|
+
</mrow>
|
17
|
+
</mstyle>
|
18
|
+
</mrow>
|
19
|
+
</math>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<math display="block">
|
3
|
+
<mrow>
|
4
|
+
<mstyle displaystyle="true">
|
5
|
+
<munderover>
|
6
|
+
<mo>∪</mo>
|
7
|
+
<mrow>
|
8
|
+
<mi>a</mi>
|
9
|
+
</mrow>
|
10
|
+
<mrow/>
|
11
|
+
</munderover>
|
12
|
+
<mrow>
|
13
|
+
<mi>b</mi>
|
14
|
+
</mrow>
|
15
|
+
</mstyle>
|
16
|
+
</mrow>
|
17
|
+
</math>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|