mathtype_to_mathml 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +3 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +45 -0
  9. data/Rakefile +7 -0
  10. data/lib/mathtype_to_mathml.rb +28 -0
  11. data/lib/mathtype_to_mathml/char_replacer.rb +311 -0
  12. data/lib/mathtype_to_mathml/mover.rb +151 -0
  13. data/lib/mathtype_to_mathml/version.rb +3 -0
  14. data/lib/transform.xsl +104 -0
  15. data/lib/xsl/arrow.xsl +319 -0
  16. data/lib/xsl/brace.xsl +55 -0
  17. data/lib/xsl/char.xsl +35 -0
  18. data/lib/xsl/embellishment.xsl +389 -0
  19. data/lib/xsl/matrix.xsl +116 -0
  20. data/lib/xsl/pile.xsl +54 -0
  21. data/lib/xsl/subsup.xsl +55 -0
  22. data/lib/xsl/sum.xsl +57 -0
  23. data/lib/xsl/union_intersection.xsl +104 -0
  24. data/mathtype_to_mathml.gemspec +28 -0
  25. data/spec/fixtures/expected/arrows.xml +389 -0
  26. data/spec/fixtures/expected/embellishments.xml +178 -0
  27. data/spec/fixtures/expected/equation1.xml +52 -0
  28. data/spec/fixtures/expected/equation10.xml +19 -0
  29. data/spec/fixtures/expected/equation11.xml +17 -0
  30. data/spec/fixtures/expected/equation12.xml +34 -0
  31. data/spec/fixtures/expected/equation13.xml +113 -0
  32. data/spec/fixtures/expected/equation2.xml +33 -0
  33. data/spec/fixtures/expected/equation3.xml +324 -0
  34. data/spec/fixtures/expected/equation4.xml +14 -0
  35. data/spec/fixtures/expected/equation5.xml +23 -0
  36. data/spec/fixtures/expected/equation6.xml +13 -0
  37. data/spec/fixtures/expected/equation7.xml +19 -0
  38. data/spec/fixtures/expected/equation8.xml +17 -0
  39. data/spec/fixtures/expected/equation9.xml +15 -0
  40. data/spec/fixtures/input/arrows.bin +0 -0
  41. data/spec/fixtures/input/embellishments.bin +0 -0
  42. data/spec/fixtures/input/equation1.bin +0 -0
  43. data/spec/fixtures/input/equation10.bin +0 -0
  44. data/spec/fixtures/input/equation11.bin +0 -0
  45. data/spec/fixtures/input/equation12.bin +0 -0
  46. data/spec/fixtures/input/equation13.bin +0 -0
  47. data/spec/fixtures/input/equation2.bin +0 -0
  48. data/spec/fixtures/input/equation3.bin +0 -0
  49. data/spec/fixtures/input/equation4.bin +0 -0
  50. data/spec/fixtures/input/equation5.bin +0 -0
  51. data/spec/fixtures/input/equation6.bin +0 -0
  52. data/spec/fixtures/input/equation7.bin +0 -0
  53. data/spec/fixtures/input/equation8.bin +0 -0
  54. data/spec/fixtures/input/equation9.bin +0 -0
  55. data/spec/html_output.rb +28 -0
  56. data/spec/mathtype_to_mathml_spec.rb +19 -0
  57. data/spec/spec_helper.rb +2 -0
  58. metadata +220 -0
data/lib/xsl/brace.xsl ADDED
@@ -0,0 +1,55 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
4
+ exclude-result-prefixes="xs"
5
+ version="1.0">
6
+
7
+ <!-- Braces -->
8
+
9
+ <xsl:template match="tmpl[selector='tmBRACK' ]">
10
+ <mrow><mo>[</mo>
11
+ <xsl:apply-templates select="slot[1]"/> <mo>]</mo>
12
+ </mrow>
13
+ </xsl:template>
14
+
15
+ <xsl:template match="tmpl[selector='tmBRACE' ]">
16
+ <mrow><mo>{</mo>
17
+ <xsl:apply-templates select="slot[1]"/> <mo>}</mo>
18
+ </mrow>
19
+ </xsl:template>
20
+
21
+ <xsl:template match="tmpl[selector='tmANGLE' ]">
22
+ <mrow><mo>&#x2329;</mo>
23
+ <xsl:apply-templates select="slot[1]"/> <mo>&#x232A;</mo>
24
+ </mrow>
25
+ </xsl:template>
26
+
27
+ <!-- Dirac -->
28
+
29
+ <xsl:template match="tmpl[selector='tmDIRAC' and variation='tvDI_RIGHT']">
30
+ <mrow>
31
+ <mo>|</mo>
32
+ <xsl:apply-templates select="slot[2]"/>
33
+ <mo>&#x232A;</mo>
34
+ </mrow>
35
+ </xsl:template>
36
+
37
+
38
+ <xsl:template match="tmpl[selector='tmDIRAC' and variation='tvDI_LEFT']">
39
+ <mrow>
40
+ <mo>&#x2329;</mo>
41
+ <xsl:apply-templates select="slot[1]"/>
42
+ <mo>|</mo>
43
+ </mrow>
44
+ </xsl:template>
45
+
46
+ <xsl:template match="tmpl[selector='tmDIRAC' and variation='tvDI_LEFT' and variation='tvDI_RIGHT']">
47
+ <mrow>
48
+ <mo>&#x2329;</mo>
49
+ <xsl:apply-templates select="slot[1]"/>
50
+ <mo>|</mo>
51
+ <xsl:apply-templates select="slot[2]"/>
52
+ <mo>&#x232A;</mo>
53
+ </mrow>
54
+ </xsl:template>
55
+ </xsl:stylesheet>
data/lib/xsl/char.xsl ADDED
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
4
+ exclude-result-prefixes="xs"
5
+ version="1.0">
6
+
7
+ <xsl:template match="mi | mo | mn | mtext">
8
+ <xsl:copy-of select="."/>
9
+ </xsl:template>
10
+
11
+ <xsl:template match="char[mt_code_value='0x2026']">
12
+ <mo>&#x2026;</mo>
13
+ </xsl:template>
14
+
15
+ <xsl:template match="char[mt_code_value='0x22EE' ]">
16
+ <mo>&#x22EE;</mo>
17
+ </xsl:template>
18
+
19
+ <xsl:template match="char[mt_code_value='0x22F1' ]">
20
+ <mo>&#x22F1;</mo>
21
+ </xsl:template>
22
+
23
+ <xsl:template match="char[mt_code_value='0x22EF' ]">
24
+ <mo>&#x22EF;</mo>
25
+ </xsl:template>
26
+
27
+ <xsl:template match="char[mt_code_value='0x03C0' ]">
28
+ <mi>π</mi>
29
+ </xsl:template>
30
+
31
+ <xsl:template match="char[mt_code_value='0x03B8' ]">
32
+ <mi>θ</mi>
33
+ </xsl:template>
34
+
35
+ </xsl:stylesheet>
@@ -0,0 +1,389 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
4
+ exclude-result-prefixes="xs"
5
+ version="1.0">
6
+
7
+
8
+ <!--
9
+ edot = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x02D9;</(ns)mo>$-$n</(ns)mover>$n";
10
+ edot/2 = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x00A8;</(ns)mo>$-$n</(ns)mover>$n";
11
+ edot/3 = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x20DB;</(ns)mo>$-$n</(ns)mover>$n";
12
+ edot/4 = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x20DC;</(ns)mo>$-$n</(ns)mover>$n";
13
+
14
+ 2 => "emb1DOT", # over single dot
15
+ 3 => "emb2DOT", # over double dot
16
+ 4 => "emb3DOT", # over triple dot
17
+ 24 => "emb4DOT", # over quad dot
18
+ -->
19
+ <!-- Dots -->
20
+
21
+ <xsl:template match="embell[embell='emb1DOT']">
22
+ <mover accent="true">
23
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
24
+ <mo>&#x2D9;</mo>
25
+ </mover>
26
+ </xsl:template>
27
+
28
+
29
+ <xsl:template match="embell[embell='emb2DOT']">
30
+ <mover accent="true">
31
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
32
+ <mo>&#xA8;</mo>
33
+ </mover>
34
+ </xsl:template>
35
+
36
+ <xsl:template match="embell[embell='emb3DOT']">
37
+ <mover accent="true">
38
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
39
+ <mo>&#x20DB;</mo>
40
+ </mover>
41
+ </xsl:template>
42
+
43
+ <xsl:template match="embell[embell='emb4DOT']">
44
+ <mover accent="true">
45
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
46
+ <mo>&#x20DC;</mo>
47
+ </mover>
48
+ </xsl:template>
49
+
50
+ <!--
51
+ edot/u = "<(ns)munder>$+$n#$n<(ns)mo>&$#x02D9;</(ns)mo>$-$n</(ns)munder>$n";
52
+ edot/u/2 = "<(ns)munder>$+$n#$n<(ns)mo>&$#x00A8;</(ns)mo>$-$n</(ns)munder>$n";
53
+ edot/u/3 = "<(ns)munder>$+$n#$n<(ns)mo>&$#x20DB;</(ns)mo>$-$n</(ns)munder>$n";
54
+ edot/u/4 = "<(ns)munder>$+$n#$n<(ns)mo>&$#x20DC;</(ns)mo>$-$n</(ns)munder>$n";
55
+
56
+ 25 => "embU_1DOT", # under single dot
57
+ 26 => "embU_2DOT", # under double dot
58
+ 27 => "embU_3DOT", # under triple dot
59
+ 28 => "embU_4DOT", # under quad dot
60
+ -->
61
+ <!-- Under-dots -->
62
+
63
+ <xsl:template match="embell[embell='embU_1DOT']">
64
+ <munder>
65
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
66
+ <mo>&#x2D9;</mo>
67
+ </munder>
68
+ </xsl:template>
69
+
70
+
71
+ <xsl:template match="embell[embell='embU_2DOT']">
72
+ <munder>
73
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
74
+ <mo>&#xA8;</mo>
75
+ </munder>
76
+ </xsl:template>
77
+
78
+
79
+ <xsl:template match="embell[embell='embU_3DOT']">
80
+ <munder>
81
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
82
+ <mo>&#x20DB;</mo>
83
+ </munder>
84
+ </xsl:template>
85
+
86
+
87
+ <xsl:template match="embell[embell='embU_4DOT']">
88
+ <munder>
89
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
90
+ <mo>&#x20DC;</mo>
91
+ </munder>
92
+ </xsl:template>
93
+
94
+ <!--
95
+ eprime = "<(ns)msup>$+$n#$n<(ns)mo>&$#x2032;</(ns)mo>$-$n</(ns)msup>$n";
96
+ eprime/2 = "<(ns)msup>$+$n#$n<(ns)mo>&$#x2033;</(ns)mo>$-$n</(ns)msup>$n";
97
+ eprime/3 = "<(ns)msup>$+$n#$n<(ns)mo>&$#x2034;</(ns)mo>$-$n</(ns)msup>$n";
98
+ eprime/b = "<(ns)mmultiscripts>$+$n#$n<(ns)mprescripts/>$n<(ns)none/>$n<(ns)mo>&$#x2035;</(ns)mo>$-$n</(ns)mmultiscripts>$n";
99
+
100
+ 5 => "emb1PRIME", # single prime
101
+ 6 => "emb2PRIME", # double prime
102
+ 7 => "embBPRIME", # backwards prime (left of character)
103
+ 18 => "emb3PRIME", # triple prime
104
+ -->
105
+ <!-- Primes -->
106
+
107
+ <xsl:template match="embell[embell='emb1PRIME']">
108
+ <msup>
109
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
110
+ <mo>&#x2032;</mo>
111
+ </msup>
112
+ </xsl:template>
113
+
114
+
115
+ <xsl:template match="embell[embell='emb2PRIME']">
116
+ <msup>
117
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
118
+ <mo>&#x2033;</mo>
119
+ </msup>
120
+ </xsl:template>
121
+
122
+
123
+ <xsl:template match="embell[embell='emb3PRIME']">
124
+ <msup>
125
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
126
+ <mo>&#x2034;</mo>
127
+ </msup>
128
+ </xsl:template>
129
+
130
+
131
+ <xsl:template match="embell[embell='embBPRIME']">
132
+ <mmultiscripts>
133
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
134
+ <mprescripts/><none/>
135
+ <mo>&#x2035;</mo>
136
+ </mmultiscripts>
137
+ </xsl:template>
138
+
139
+ <!--
140
+ etilde = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x02DC;</(ns)mo>$-$n</(ns)mover>$n";
141
+ etilde/u = "<(ns)munder accentunder='true'>$+$n#$n<(ns)mo>&$#x02DC;</(ns)mo>$-$n</(ns)munder>$n";
142
+
143
+ 8 => "embTILDE", # tilde
144
+ 30 => "embU_TILDE", # under tilde (~)
145
+ -->
146
+ <!-- Tilde -->
147
+
148
+ <xsl:template match="embell[embell='embTILDE']">
149
+ <mover accent="true">
150
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
151
+ <mo>&#x2DC;</mo>
152
+ </mover>
153
+ </xsl:template>
154
+
155
+ <xsl:template match="embell[embell='embU_TILDE']">
156
+ <munder accentunder="true">
157
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
158
+ <mo>&#x2DC;</mo>
159
+ </munder>
160
+ </xsl:template>
161
+
162
+ <!--
163
+ ehat = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x005E;</(ns)mo>$-$n</(ns)mover>$n";
164
+ 9 => "embHAT", # hat (circumflex)
165
+ -->
166
+ <!-- Hat -->
167
+
168
+ <xsl:template match="embell[embell='embHAT']">
169
+ <mover accent="true">
170
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
171
+ <mo>^</mo>
172
+ </mover>
173
+ </xsl:template>
174
+ <!--
175
+ evec = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x2192;</(ns)mo>$-$n</(ns)mover>$n";
176
+ evec/l = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x2190;</(ns)mo>$-$n</(ns)mover>$n";
177
+ evec/lr = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x2194;</(ns)mo>$-$n</(ns)mover>$n";
178
+ evec/h = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x21C0;</(ns)mo>$-$n</(ns)mover>$n";
179
+ evec/h/l = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x21BC;</(ns)mo>$-$n</(ns)mover>$n";
180
+ evec/u = "<(ns)munder>$+$n#$n<(ns)mo>&$#x2192;</(ns)mo>$-$n</(ns)munder>$n";
181
+ evec/u/l = "<(ns)munder>$+$n#$n<(ns)mo>&$#x2190;</(ns)mo>$-$n</(ns)munder>$n";
182
+ evec/u/lr = "<(ns)munder>$+$n#$n<(ns)mo>&$#x2194;</(ns)mo>$-$n</(ns)munder>$n";
183
+ evec/u/h = "<(ns)munder>$+$n#$n<(ns)mo>&$#x21C1;</(ns)mo>$-$n</(ns)munder>$n";
184
+ evec/u/h/l = "<(ns)munder>$+$n#$n<(ns)mo>&$#x21BD;</(ns)mo>$-$n</(ns)munder>$n";
185
+
186
+ 11 => "embRARROW", # over right arrow
187
+ 12 => "embLARROW", # over left arrow
188
+ 13 => "embBARROW", # over both arrow (left and right)
189
+ 14 => "embR1ARROW", # over right single-barbed arrow
190
+ 15 => "embL1ARROW", # over left single-barbed arrow
191
+ 33 => "embU_RARROW", # under right arrow
192
+ 34 => "embU_LARROW", # under left arrow
193
+ 35 => "embU_BARROW", # under both arrow (left and right)
194
+ 36 => "embU_R1ARROW", # under right arrow (1 barb)
195
+ 37 => "embU_L1ARROW", # under left arrow (1 barb)
196
+
197
+ -->
198
+ <!-- Arrows -->
199
+
200
+ <xsl:template match="embell[embell='embRARROW']">
201
+ <mover accent="true">
202
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
203
+ <mo>&#x2192;</mo>
204
+ </mover>
205
+ </xsl:template>
206
+
207
+ <xsl:template match="embell[embell='embLARROW']">
208
+ <mover accent="true">
209
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
210
+ <mo>&#x2190;</mo>
211
+ </mover>
212
+ </xsl:template>
213
+
214
+ <xsl:template match="embell[embell='embBARROW']">
215
+ <mover accent="true">
216
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
217
+ <mo>&#x2194;</mo>
218
+ </mover>
219
+ </xsl:template>
220
+
221
+ <xsl:template match="embell[embell='embR1ARROW']">
222
+ <mover accent="true">
223
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
224
+ <mo>&#x21C0;</mo>
225
+ </mover>
226
+ </xsl:template>
227
+
228
+
229
+ <xsl:template match="embell[embell='embL1ARROW']">
230
+ <mover accent="true">
231
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
232
+ <mo>&#x21BC;</mo>
233
+ </mover>
234
+ </xsl:template>
235
+
236
+
237
+ <xsl:template match="embell[embell='embU_RARROW']">
238
+ <munder>
239
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
240
+ <mo>&#x2192;</mo>
241
+ </munder>
242
+ </xsl:template>
243
+
244
+
245
+ <xsl:template match="embell[embell='embU_LARROW']">
246
+ <munder>
247
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
248
+ <mo>&#x2190;</mo>
249
+ </munder>
250
+ </xsl:template>
251
+
252
+
253
+ <xsl:template match="embell[embell='embU_BARROW']">
254
+ <munder>
255
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
256
+ <mo>&#x2194;</mo>
257
+ </munder>
258
+ </xsl:template>
259
+
260
+
261
+ <xsl:template match="embell[embell='embU_R1ARROW']">
262
+ <munder>
263
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
264
+ <mo>&#x21C1;</mo>
265
+ </munder>
266
+ </xsl:template>
267
+
268
+
269
+ <xsl:template match="embell[embell='embU_L1ARROW']">
270
+ <munder>
271
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
272
+ <mo>&#x21BD;</mo>
273
+ </munder>
274
+ </xsl:template>
275
+
276
+ <!--
277
+ eobar = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x00AF;</(ns)mo>$-$n</(ns)mover>$n";
278
+ eubar = "<(ns)munder accentunder='true'>$+$n#$n<(ns)mo>_</(ns)mo>$-$n</(ns)munder>$n";
279
+
280
+ 17 => "embOBAR", # over-bar
281
+ 29 => "embU_BAR", # under bar
282
+ -->
283
+ <!-- Bars -->
284
+
285
+ <xsl:template match="embell[embell='embOBAR']">
286
+ <mover accent="true">
287
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
288
+ <mo>&#xAF;</mo>
289
+ </mover>
290
+ </xsl:template>
291
+
292
+
293
+ <xsl:template match="embell[embell='embU_BAR']">
294
+ <munder accentunder="true">
295
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
296
+ <mo>_</mo>
297
+ </munder>
298
+ </xsl:template>
299
+
300
+ <!--
301
+ earc = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x2322;</(ns)mo>$-$n</(ns)mover>$n";
302
+ earc/u = "<(ns)munder accentunder='true'>$+$n#$n<(ns)mo>&$#x2322;</(ns)mo>$-$n</(ns)munder>$n";
303
+ earc/s = "<(ns)mover accent='true'>$+$n#$n<(ns)mo>&$#x2323;</(ns)mo>$-$n</(ns)mover>$n";
304
+ earc/u/s = "<(ns)munder accentunder='true'>$+$n#$n<(ns)mo>&$#x2323;</(ns)mo>$-$n</(ns)munder>$n";
305
+ 19 => "embFROWN", # over-arc, concave downward
306
+ 20 => "embSMILE", # over-arc, concave upward
307
+ 31 => "embU_FROWN", # under arc (ends point down)
308
+ 32 => "embU_SMILE", # under arc (ends point up)
309
+ -->
310
+ <!-- Arcs -->
311
+
312
+ <xsl:template match="embell[embell='embFROWN']">
313
+ <mover accent="true">
314
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
315
+ <mo>&#x2322;</mo>
316
+ </mover>
317
+ </xsl:template>
318
+
319
+ <xsl:template match="embell[embell='embSMILE']">
320
+ <mover accent="true">
321
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
322
+ <mo>&#x2323;</mo>
323
+ </mover>
324
+ </xsl:template>
325
+
326
+ <xsl:template match="embell[embell='embU_FROWN']">
327
+ <munder accentunder="true">
328
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
329
+ <mo>&#x2322;</mo>
330
+ </munder>
331
+ </xsl:template>
332
+
333
+ <xsl:template match="embell[embell='embU_SMILE']">
334
+ <munder accentunder="true">
335
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
336
+ <mo>&#x2323;</mo>
337
+ </munder>
338
+ </xsl:template>
339
+
340
+ <!--
341
+ enot = "<(ns)menclose notation='updiagonalstrike'>$+$n#$-$n</(ns)menclose>$n";
342
+ estrike = "<(ns)menclose notation='updiagonalstrike downdiagonalstrike'>$+$n#$-$n</(ns)menclose>$n";
343
+ estrike/m = "<(ns)menclose notation='horizontalstrike'>$+$n#$-$n</(ns)menclose>$n";
344
+ estrike/up = "<(ns)menclose notation='updiagonalstrike'>$+$n#$-$n</(ns)menclose>$n";
345
+ estrike/dn = "<(ns)menclose notation='downdiagonalstrike'>$+$n#$-$n</(ns)menclose>$n";
346
+
347
+ 10 => "embNOT", # diagonal slash through character
348
+ 21 => "embX_BARS", # double diagonal bars
349
+ 16 => "embMBAR", # mid-height horizontal bar
350
+ 22 => "embUP_BAR", # bottom-left to top-right diagonal bar
351
+ 23 => "embDOWN_BAR", # top-left to bottom-right diagonal bar
352
+ -->
353
+ <!-- Strikes -->
354
+
355
+ <xsl:template match="embell[embell='embNOT']">
356
+ <menclose notation="updiagonalstrike">
357
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
358
+ </menclose>
359
+ </xsl:template>
360
+
361
+
362
+ <xsl:template match="embell[embell='embX_BARS']">
363
+ <menclose notation="updiagonalstrike downdiagonalstrike">
364
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
365
+ </menclose>
366
+ </xsl:template>
367
+
368
+
369
+ <xsl:template match="embell[embell='embMBAR']">
370
+ <menclose notation="horizontalstrike">
371
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
372
+ </menclose>
373
+ </xsl:template>
374
+
375
+
376
+ <xsl:template match="embell[embell='embUP_BAR']">
377
+ <menclose notation="updiagonalstrike">
378
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
379
+ </menclose>
380
+ </xsl:template>
381
+
382
+
383
+ <xsl:template match="embell[embell='embDOWN_BAR']">
384
+ <menclose notation="downdiagonalstrike">
385
+ <xsl:apply-templates select="(char | mn | mo | mtext | mi)[1]"/>
386
+ </menclose>
387
+ </xsl:template>
388
+
389
+ </xsl:stylesheet>