forked from w3c/mathml-polyfills
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1592 lines (1498 loc) · 46.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<title>Elementary MathML elements</title>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="elemMath.css">
<script type="module">
import { _MathTransforms } from '../common/math-transforms.js'
import './elemMath.js'
import '../menclose/menclose.js'
window.addEventListener("DOMContentLoaded", () => {
_MathTransforms.transform(document.body)
})
</script>
<style>
ol li {
margin-top: 2ex;
}
th, td {
padding-left: 5px;
padding-right: 5px;
text-align: center;
}
.not-implemented {
background-color: indianred;
}
.not-right {
background-color: yellow;
}
table.longdiv-table {
border-collapse: collapse;
border: 1px solid lightblue;
}
table.longdiv-table > tbody> tr > td {
vertical-align: top;
padding: 1ex 1em 1ex 1em;
border: 1px solid lightblue;
}
/* numbering headings */
body { counter-reset: H1; } /* Create the counter for H1 */
h1:before {
content: counter(H1) ". "; /* Print the H1 number */
counter-increment: H1; /* Add 1 to next H1 */
}
h1 { counter-reset: H2; }
h2:before {
content: counter(H1) "." counter(H2) " ";
counter-increment: H2;
}
h2 { counter-reset: H3; }
h3:before {
content: counter(H1) "." counter(H2) "." counter(H3) " ";
counter-increment:H3;
}
h3 { counter-reset: H4; }
h4:before {
content: counter(H1) "." counter(H2) "." counter(H3) "." counter(H4) " ";
counter-increment:H4;
}
</style>
<!-- these probably belong elsewhere as they really belong to the .js file -->
<style>
table.elem-math {
border-collapse: collapse;
border-spacing: 0px;
}
</style>
</head>
<body>
<h1>Elementary math</h1>
<p>This page contains some tests for the <a href=https://w3c.github.io/mathml/#elementary-math>MathML elementary math elements</a>.
These are rendered via the 'elemMath.js' polyfill.
</p>
<h2>mstack examples from MathML spec (some general examples)</h2>
<ol>
<li>Simple addition with operator on the left
<table><tr><th>Image</th><th>MathML</th></tr><tr>
<td><img src="https://www.w3.org/Math/draft-spec/image/em-plus-shift.png" alt="2d addition problem"></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>424</mn>
<msrow> <mo>+</mo> <none/> <mn>33</mn> </msrow>
<msline/>
</mstack>
</math>
</td></tr></table>
</li>
<li>Simple addition with operator on the right
<table><tr><th>Image</th><th>MathML</th></tr><tr>
<td><img src="https://www.w3.org/Math/draft-spec/image/em-plus-right.png" alt="2d addition problem with plus on right"></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>123</mn>
<msrow> <mn>456</mn> <mo>+</mo> </msrow>
<msline/>
<mn>579</mn>
</mstack>
</math>
</td></tr></table>
</li>
<li>Two examples showing carries and crossouts
<table><tr><th>Image</th><th>MathML</th></tr><tr>
<td><img src=https://www.w3.org/Math/draft-spec/image/em-sub-borrow-above.png alt="2d subtraction problem with borrows above"></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries crossout='updiagonalstrike'>
<mn>2</mn> <mn>12</mn> <mscarry crossout='none'> <none/> </mscarry>
</mscarries>
<mn>2,327</mn>
<msrow> <mo>-</mo> <mn> 1,156</mn> </msrow>
<msline/>
<mn>1,171</mn>
</mstack>
</math>
</td></tr><tr>
<td><img src="https://www.w3.org/Math/draft-spec/image/em-sub-borrow-aboveleft.png" alt="2d subtraction problem with borrows to northwest"></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='nw'>
<none/>
<mscarry crossout='updiagonalstrike' location='n'> <mn>2</mn> </mscarry>
<mn>1</mn>
<none/>
</mscarries>
<mn>2,327</mn>
<msrow> <mo>-</mo> <mn> 1,156</mn> </msrow>
<msline/>
<mn>1,171</mn>
</mstack>
</math>
</td></tr></table>
</li>
<li>Carries and crossouts, but with multiple digits in carry and <em>underlined</em>
<table><tr><th>Image</th><th>MathML</th></tr><tr>
<td><img src="https://www.w3.org/Math/draft-spec/image/em-sub-borrow-swedish.png" alt="2d subtraction problem with underlined borrow"></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries>
<mscarry crossout='updiagonalstrike'><none/></mscarry>
<menclose notation='bottom'> <mn>10</mn> </menclose>
</mscarries>
<mn>52</mn>
<msrow> <mo>-</mo> <mn> 7</mn> </msrow>
<msline/>
<mn>45</mn>
</mstack>
</math>
</td></tr></table>
</li>
<li>Simple multiplication (uses msgroup)
<table><tr><th>Image</th><th>MathML</th></tr><tr>
<td><img src="https://www.w3.org/Math/draft-spec/image/em-mult-simple.png" alt="2d multiplication"></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msgroup>
<mn>123</mn>
<msrow><mo>×<!--MULTIPLICATION SIGN--></mo><mn>321</mn></msrow>
</msgroup>
<msline/>
<msgroup shift="1">
<mn>123</mn>
<mn>246</mn>
<mn>369</mn>
</msgroup>
<msline/>
</mstack>
</math>
</td></tr></table>
</li>
<li>This example has multiple rows of carries.
It also (somewhat artificially) includes commas (",") as digit separators.
The encoding includes these separators in the spacing attribute value.
<table><tr><th>Image</th><th>MathML</th></tr><tr>
<td><img src="https://www.w3.org/Math/draft-spec/image/em-mult-carries.png" alt="2d multiplication problem with carries"></td>
<td><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries><mn>1</mn><mn>1</mn><none/></mscarries>
<mscarries><mn>1</mn><mn>1</mn><none/></mscarries>
<mn>1,234</mn>
<msrow><mo>×<!--MULTIPLICATION SIGN--></mo><mn>4,321</mn></msrow>
<msline/>
<mscarries position='2'>
<mn>1</mn>
<none/>
<mn>1</mn>
<mn>1</mn>
<mn>1</mn>
<none/>
<mn>1</mn>
</mscarries>
<msgroup shift="1">
<mn>1,234</mn>
<mn>24,68</mn>
<mn>370,2</mn>
<msrow position="1"> <mn>4,936</mn> </msrow>
</msgroup>
<msline/>
<mn>5,332,114</mn>
</mstack>
</math>
</td></tr></table>
</li>
<li>Repeating decimals (line over 3):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign="right">
<msline length="1"/>
<mn> 0.3333 </mn>
</mstack>
</math>
</li>
<li>Repeating decimals (line over fractional part):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign="right">
<msline length="6"/>
<mn> 0.142857 </mn>
</mstack>
</math>
</li>
<li>Repeating decimals (line under fractional part):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign="right">
<mn> 0.142857 </mn>
<msline length="6"/>
</mstack>
</math>
</li>
<li>Repeating decimals (dots over start and end of fractional part):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign="right">
<msrow> <mo>.</mo> <none/><none/><none/><none/> <mo>.</mo> </msrow>
<mn> 0.142857 </mn>
</mstack>
</math>
</li>
</ol>
<h2>mstack</h2>
<h3>Test with different number of args</h3>
<ol>
<li>mstack with no elements (should be empty, no console warnings):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
</mstack>
</math>
</li>
<li>mstack with a single number (should just be a number):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>123</mn>
</mstack>
</math>
</li>
<li>2 arguments (simple stack of numbers):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>123</mn>
<mn>456</mn>
</mstack>
</math>
</li>
</ol>
<h3>Test with different attr args/values</h3>
<h4>align</h4>
<p class="not-implemented">Not implemented</p>
<h4>stackalign (alignment of stack of elements</h4>
<ol>
<li>left
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign='left'>
<mn>2123.4</mn>
<msrow> <mn>456.018</mn> <mo>+</mo> </msrow>
<msline/>
<mn>2579.418</mn>
</mstack>
</math>
</li>
<li>center
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign='center'>
<mn>2123.4</mn>
<msrow> <mn>456.018</mn> <mo>+</mo> </msrow>
<msline/>
<mn>2579.418</mn>
</mstack>
</math>
</li>
<li>right
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign='right'>
<mn>2123.4</mn>
<msrow> <mn>456.018</mn> <mo>+</mo> </msrow>
<msline/>
<mn>2579.418</mn>
</mstack>
</math>
</li>
<li>decimal
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack stackalign='decimalpoint'>
<mn>2123.4</mn>
<msrow> <mn>456.018</mn> <mo>+</mo> </msrow>
<msline/>
<mn>2579.418</mn>
</mstack>
</math>
</li>
<li>decimal (default value)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>2123.4</mn>
<msrow> <mn>456.018</mn> <mo>+</mo> </msrow>
<msline/>
<mn>2579.418</mn>
</mstack>
</math>
</li>
<li>decimal (default value, using inherited value set by mstyle)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstyle decimalpoint=','>
<mstack>
<mn>2123,</mn>
<msrow> <mn>456,018</mn> <mo>+</mo> </msrow>
<msline/>
<mn>2579,418</mn>
</mstack>
</mstyle>
</math>
</li>
</ol>
<h4>charalign (alignment of character in a column)</h4>
<ol>
<li>left
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charalign='left'>
<mn>12</mn>
<msrow> <mi>wide</mi> <mn>1</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
<li>center
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charalign='center'>
<mn>12</mn>
<msrow> <mi>wide</mi> <mn>1</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
<li>right
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charalign='right'>
<mn>12</mn>
<msrow> <mi>wide</mi> <mn>1</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
<li>default (right)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>12</mn>
<msrow> <mi>wide</mi> <mn>1</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
</ol>
<h4>charspacing</h4>
<ol>
<li>loose
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charspacing='loose'>
<mn>432</mn>
<msrow> <mo>+</mo><mn>33</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
<li>medium
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charspacing='medium'>
<mn>432</mn>
<msrow> <mo>+</mo> <mn>33</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
<li>tight
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charspacing='tight'>
<mn>432</mn>
<msrow> <mo>+</mo> <mn>33</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
<li>value (1em -- really wide)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charspacing='1em'>
<mn>432</mn>
<msrow> <mo>+</mo> <mn>33</mn> </msrow>
<msline/>
</mstack>
</math>
</li>
<li>tight with a none value
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charspacing='tight'>
<mn>4321</mn>
<msrow> <mo>+</mo> <none/><mn>33</mn> </msrow>
<msline/>
</mstack>
</math>
</ol>
<h2>msgroup tests</h2>
<h3>Test with different number of args</h3>
<ol>
<li>msgroup with no elements (should be empty, no console warnings):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msgroup>
</msgroup>
</mstack>
</math>
</li>
<li>msgroup with a single number (position=2, shift=1 -- visually not much but two empty columns on right):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msgroup position="2" shift="1">
<mn>123</mn>
</msgroup>
</mstack>
</math>
</li>
<li>msgroup with 2 arguments (position=-1, shift=2 -- visually '1's should align):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msgroup position="-1" shift="2">
<mn>123</mn>
<mn>321</mn>
</msgroup>
</mstack>
</math>
</li>
<li>Nested msgroups (position=-1, shift=2, with position=-1, shift=1 nested inside (rows 4-6)-- visually all digits should align):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>123</mn>
<msgroup position="-1" shift="-1">
<mn>234</mn>
<mn>345</mn>
<msgroup position="-1" shift="1">
<mn>567</mn>
<mn>456</mn>
<mn>345</mn>
</msgroup>
</msgroup>
<mn>0123</mn>
</mstack>
</math>
</li>
</ol>
<h3>Test with different attr args/values</h3>
<h4>position</h4>
<ol>
<li>two msgroups (position=1, position=-1) -- the '3's should align:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msgroup position='1'>
<mn>123</mn>
</msgroup>
<msgroup position='-1'>
<mn>345</mn>
</msgroup>
</mstack>
</math>
</li>
<li>two msgroups (1st two lines position=1, last two lines position=-1) -- the '3's should align.
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msgroup position='1'>
<mn>123</mn>
<mn>123</mn>
</msgroup>
<msgroup position='-1'>
<mn>345</mn>
<mn>345</mn>
</msgroup>
</mstack>
</math>
</li>
</ol>
<h4>shift</h4>
<ol>
<li>2 msgroups (shift=1, shift=-1) -- the digits should align.
The first group should shift to the left; the second group should shift to the right:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msgroup shift='1'>
<mn>345</mn>
<mn>234</mn>
<mn>123</mn>
</msgroup>
<msgroup shift='-1'>
<mn>345</mn>
<mn>456</mn>
<mn>567</mn>
</msgroup>
</mstack>
</math>
</li>
<li>2 msgroups (position='-2' shift='-2' and position ='-6' shift='2') with 123 above and below the groups --
the digits should align.
The first group should shift to the right by two digits each line; the second group should similarly shift to the left:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>123</mn>
<msgroup position='-2' shift='-2'>
<mn>345</mn>
<mn>567</mn>
<mn>789</mn>
</msgroup>
<msgroup position ='-6' shift='2'>
<mn>789</mn>
<mn>567</mn>
<mn>345</mn>
</msgroup>
<mn>123</mn>
</mstack>
</math>
</li>
</ol>
<h2>msrow tests</h2>
<h3>Test with different number of args</h3>
<ol>
<li>
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msrow>
</msrow>
</mstack>
</math>
</li>
<li>msrow with a single number -- visually not much:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msrow>
<mn>123</mn>
</msrow>
</mstack>
</math>
</li>
<li>msrow with 3 arguments -- the two decimal numbers should align:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msrow>
<mn>123.45</mn>
<mo>|</mo>
<mn>456</mn>
</msrow>
<mn>123.45</mn>
</mstack>
</math>
</li>
</ol>
<h3>Test with different attr args/values</h3>
<h4>position</h4>
<ol>
<li>mrow with no elements (position=2) -- should be empty, no console warnings:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msrow position='2'>
</msrow>
</mstack>
</math>
</li>
<li>msrow with a single number (position='-2') -- visually not much (should be two blank cells on left):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msrow position='-2'>
<mn>123</mn>
</msrow>
</mstack>
</math>
</li>
<li>msrows (position=1, position=-1) -- the '3's should align:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<msrow position='1'>
<mn>123</mn>
</msrow>
<msrow position='-1'>
<mn>345</mn>
</msrow>
</mstack>
</math>
</li>
</ol>
<h2>mscarries tests</h2>
<h3>Test with different number of args</h3>
<ol>
<li>mscarries with no elements (position=2) -- should see just '123', no padding, no console warnings:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries position='2'>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>mscarries with no elements and no following line (position=2) -- should not see anything, no console warnings:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries position='2'>
</mscarries>
</mstack>
</math>
</li>
<li>mscarries with one child and no following line (position=2) -- should see a small 9, no console warnings:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries position='2'>
<mn>9</mn>
</mscarries>
</mstack>
</math>
</li>
<li>mscarries with two children, should see 8 over 2, 9 over the 3:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>mscarries with two children (position=2), should see 1 over empty space, 9 over the 2:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries>
<mn>1</mn>
<mn>2</mn>
</mscarries>
<mn>9</mn>
</mstack>
</math>
</li>
<li>two rows of mscarries over each other, should see carry '1' over carry '2' over '9':
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries>
<mn>1</mn>
</mscarries>
<mscarries>
<mn>2</mn>
</mscarries>
<mn>789</mn>
</mstack>
</math>
</li>
<li>three rows of mscarries over each other, should see carry '1' over carry '2' over carry '3' over '9':
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries>
<mn>1</mn>
</mscarries>
<mscarries>
<mn>2</mn>
</mscarries>
<mscarries>
<mn>3</mn>
</mscarries>
<mn>789</mn>
</mstack>
</math>
</li>
<li>two rows of numbers with a carry between them
(3's should align, with middle one small, not crash together or crash into line):
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mn>123</mn>
<msline/>
<mscarries>
<mn>3</mn>
</mscarries>
<mn>543</mn>
</mstack>
</math>
</li>
</ol>
<h3>Test with different attr args/values</h3>
<h4>position</h4>
<ol>
<li>mscarries with single child (position=-1), should see 9 one column to the right of 3:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries position='-1'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>mscarries with single child (position=1), should see 9 over 2:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries position='1'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>mscarries with single child and no position give should see 9 over 1:
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
</ol>
<h4>location</h4>
<ol>
<li>'w': 8 and 9 should be before 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='w'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>'nw': 8 and 9 should be pre-superscripts before 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='nw'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>'n': 8 and 9 should be above 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='n'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>'ne': 8 and 9 should be superscripts to 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='ne'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>'e': 8 and 9 should be after 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='e'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>'se': 8 and 9 should be subscripts to 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='se'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>'s': 8 and 9 should be below 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='s'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>'sw': 8 and 9 should be presubscripts before 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='sw'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li> default ('n'): 8 and 9 should be above 2 and 3 respectivly
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
</ol>
<h4>crossout</h4>
test individually and in combinations
<ol>
<li>No cross out ('none') (carry 'n': 9 should be above 3)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='n' crossout='none'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li> Crossout is updiagonalstrike (carry 'ne': 9 should be superscript to 3)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='ne' crossout='updiagonalstrike'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li> Crossout is downdiagonalstrike (carry 'nw': 9 should be superscript to 3)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='nw' crossout='downdiagonalstrike'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li>Cross out is verticalstrike (carry 'n': 9 should be above 3)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='n' crossout='verticalstrike'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li> Crossout is horizontalstrike (carry 'ne': 9 should be superscript to 3)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='ne' crossout='horizontalstrike'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li> Crossout is both downdiagonalstrike and updiagonalstrike (carry 'nw': 9 should be superscript to 3)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='nw' crossout='downdiagonalstrike updiagonalstrike'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li class> Crossout is all four (carry 'n, position=1': 9 should be above the 2)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries position='1' location='n' crossout='verticalstrike horizontalstrike downdiagonalstrike updiagonalstrike'>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li> Crossout is both downdiagonalstrike (twice) and updiagonalstrike (carry 'nw': 9 should be superscript to 3) -- lots of extra spaces in attr value
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack>
<mscarries location='nw' crossout=' downdiagonalstrike updiagonalstrike downdiagonalstrike '>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
</ol>
<h4>scriptsizemultiplier</h4>
<ol>
<li> .4 -- should be smaller than normal (compare to second line of carries)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charspacing='loose'>
<mscarries scriptsizemultiplier='.4'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>12345</mn>
<mscarries>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>123</mn>
</mstack>
</math>
</li>
<li class='not-right'> 1.5 -- should be bigger than normal (compare to second line of carries) and overflow into each other
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mstack charspacing='tight'>
<mscarries scriptsizemultiplier='1.5'>
<mn>8</mn>
<mn>9</mn>
</mscarries>
<mn>12345</mn>
<mscarries>
<mn>8</mn>