MathML transform tests

The following tables contain MathML that is not part of core. The page loads transforms that will transform the full MathML into MathML core. The transforms will not run until you click the button below. This allows you to see the effects of the transform.

Examples:

General MathML Elements and Attributes

Description Math example
mfenced 0 1
under/over scripts with an mo that should be displayed as an accent x + x ^ + x D f ( x )
munder alignment left/left/right
first example is with stretchy operator
r + a , l + a + b , r + a + b
mover alignment left/left/right
first example is with stretchy operator
r + a , l + a + b , r + a + b
munderover alignment left/left/right
first example is with stretchy operator
r + a , l + a + b left , r + a + b right
bevelled fraction f ( x + 1 x - 1 ) + 1
numerator alignment left/center/right and nested with right/left 1 x - 1 + 22 x - 2 + 333 x - y - 3 + 4 x + y x - y - 3
denominator alignment left/center/right and nested with left/right a + b + c 3 + x + y + 1234 3 + a + b + c 3 + 4 x + y 3
mfrac with named linethickness (none, thin, medium, thick, 8px) 1 2 + 1 3 + 1 4 + 1 5 + 1 6
fraction with named mathsize for numerator (none, small, medium, big, 20px) 1 2 + 1 3 + 1 4 + 1 5 + 1 6
mglyph -- example with lone mglyph in 'mi' and second with other chars.
The second uses 'em's (which must convert to px) and also valign set to push the top down to the baseline.
f ( , xz )
ms -- default quotes and curly quotes; internal quotes should be escaped f ( normal "s , open/close quotes )

mpadded Attribute Pseudo Values

Description Math example
mpadded -- pseudo units (width, depth, height) are not part of core
Yellow is space child, blue is mpadded dimensions. 'lspace'/'voffset' are set so that a yellow square should be centered inside a blue square, with the blue square having twice the side length of the yellow square.

Before transform

After transform

1 , 2 , 3 , 4 5

menclose

Description Math example
Box with 'strikes' in all directions x + y 2
Box with double-ended arrows in all directions x + y 2
Circle and rounded box with horizontal/vertical strikes x + y + z

Linebreaks in Display MathML

Custom element -- should break to the width of a line


a1+a2+a3+a4+a5+a6+a7+a8+a9+a10 +a11+a12+a13+a14+a15+a16+a17+a18+a19+a20 +a21+a22+a23+a24+a25+a26+a27+a28+a29+a30 +a31+a32+a33+a34+a35+a36+a37+a38+a39+a40
Linebreaks: Forced linebreak before second '=' and another before "+4x+1".
Indents: 2nd line on "=" 3rd line on "+" after "="
maxwidth = 30em -- shouldn't affect linebreaks (tests non-px value)
f ( x ) = ( x + 1 ) 4 = x 4 + 4 x 3 + 6 x 2 + 4 x + 1
Linebreaks: automatic. maxwidth = 190px
Indents: automatic
f ( x ) = ( x + 1 ) 4 = x 4 + 4 x 3 + 6 x 2 + 4 x + 1
Automatic linebreak (200px break width)
Should be four lines: linebreak between the parens and also on '+'s
Indentation: automatic
There are no mrows in this test, so testing recreating structure also.
( x 4 - 4 x 3 y + 6 x 2 y 2 - 4 x y 3 + y 4 ) ( x 4 + 4 x 3 y + 6 x 2 y 2 + 4 x y 3 + y 4 )
A manual linebreak at second equals;
Automatic linebreak (should be with '•' added) and if it breaks there, "target" aligned with '('
Attributes tested: linebreakstyle, linebreakmultchar, linebreak, indentalign, indenttarget
( x 2 - y 2 ) 4 = ( x - y ) 4 ( x + y ) 4 = ( x 4 - 4 x 3 y + 6 x 2 y 2 - 4 x y 3 + y 4 ) ( x 4 + 4 x 3 y + 6 x 2 y 2 + 4 x y 3 + y 4 )
LineBreak: forced linebreak in numerator of fraction
Indent: auto
x 7 + 7 x 6 + 21 x 5 + 35 x 4 + 35 x 3 + 21 x 2 + 7 x + 1 y + 1
Automatic linebreaking with width changing with table width
Should break before '+'s
Indentation: automatic
a1+a2+a3+a4+a5+a6+a7+a8+a9+a10 +a11+a12+a13+a14+a15+a16+a17+a18+a19+a20 +a21+a22+a23+a24+a25+a26+a27+a28+a29+a30 +a31+a32+a33+a34+a35+a36+a37+a38+a39+a40
This is inline math and should not linebreak due to the linebreaking transforms because there is no reflow observer on which to hang some code.

Some text in a paragraph that contains math: a1+a2+a3+a4+a5+a6+a7+a8+a9+a10 This text ends the paragraph.

MathML Table elements and Attributes

mlabeledtr -- label should be on right of line (2.1) E = m c 2
mlabeledtr -- label should be on left of rows 1 and 3 Famous Formulas (3.1) e i π + 1 = 0 a 2 + b 2 = c 2 (2.3) E = m c 2

Elementary Math

Elementary math: 2D subtraction problem with borrows and carries 2 1 2,327 - 1,156 1,171
Elementary math: Repeating decimals (line over fractional part) 0.142857
Elementary math: Long Division 3 435.3 1306 12 10 9 16 15 1.0 9 1