menclose

This page contains some tests for the menclose element. These are rendered via the 'menclose.js' polyfill.

Examples from MathML spec (some general examples)

Native menclose (middle column) vs polyfill (right column), same MathML in each row.

  1. box and circle
    Image Native menclose (no polyfill on this subtree) After _MathTransforms.transform
    circled x plus y x + y
    x + y
  2. actuarial notation
    Image Native menclose (no polyfill on this subtree) After _MathTransforms.transform
    actuarial notation a n i
    a n i
  3. phasorangle
    Image Native menclose (no polyfill on this subtree) After _MathTransforms.transform
    phasor angle of negative pi over 2 C π 2
    C π 2

menclose attribute sweep (in isolation)

Each row shows the same MathML twice: the middle column is outside any polyfill run (native menclose); the right column is wrapped in menclose-test-polyfill-root and processed with _MathTransforms.transform so you can compare native rendering with the polyfill.

Notation values in isolation
Description Native menclose (no polyfill on this subtree) After _MathTransforms.transform
menclose default (should be long division): x + y
x + y
menclose longdiv: 128
128
menclose actuarial: x + y 2
x + y 2
menclose phasorangle: π / 8
π / 8
menclose radical: x + y 2
x + y 2
menclose box: x + y 2
x + y 2
menclose roundedbox: x + y 2
x + y 2
menclose circle: x + y 2
x + y 2
menclose left: x + y 2
x + y 2
menclose right: x + y 2
x + y 2
menclose top: x + y 2
x + y 2
menclose bottom: x + y 2
x + y 2
menclose updiagonalstrike: x + y 2
x + y 2
menclose downdiagonalstrike: x + y 2
x + y 2
menclose verticalstrike: x + y 2
x + y 2
menclose horizontalstrike: x + y 2
x + y 2
menclose northeastarrow: x + y 2
x + y 2
menclose uparrow: x + y 2
x + y 2
menclose rightarrow: x + y 2
x + y 2
menclose downarrow: x + y 2
x + y 2
menclose leftarrow: x + y 2
x + y 2
menclose northwestarrow: x + y 2
x + y 2
menclose southwestarrow: x + y 2
x + y 2
menclose southeastarrow: x + y 2
x + y 2
menclose leftrightarrow: x + y 2
x + y 2
menclose updownarrow: x + y 2
x + y 2
menclose northwestsoutheastarrow: x + y 2
x + y 2
menclose northeastsouthwestarrow: x + y 2
x + y 2
menclose madruwb: x + y 3
x + y 3
menclose box and unknown notation values (foo and bar): x + y 3
x + y 3
menclose with ony unknown notation values (foo and bar) -- should use default long div: x + y 3
x + y 3

menclose attributes in combination

Native menclose (middle) vs polyfill (right), same markup in each row.

Combined notation attributes
Description Native menclose (no polyfill on this subtree) After _MathTransforms.transform
menclose left and right with arrow to touch: x + y 2 + x + y
x + y 2 + x + y
menclose top and bottom with arrow to touch: x + y 2 + x + y
x + y 2 + x + y
menclose top and right with arrows to touch: x + y 2 + x + y
x + y 2 + x + y
menclose bottom and left with arrows to touch: x + y 2 + x + y
x + y 2 + x + y
menclose horizontal/vertical/diagonal double and box: x + y 2
x + y 2
menclose horizontal/vertical/diagonal double and box (order changed from above): x + y 2
x + y 2
menclose diagonal arrows and box: x + y 2 + x + y
x + y 2 + x + y
menclose diagonal arrows and box: x + y 2 + x + y
x + y 2 + x + y
menclose diagonal arrows and box: x + y 2 + x + y
x + y 2 + x + y
menclose horizontal/vertical arrows and box: x + y 2 + x + y
x + y 2 + x + y
menclose horizontal/vertical arrows and box: x + y 2 + x + y
x + y 2 + x + y
menclose horizontal/vertical/diagonal double arrows and box: x + y 2
x + y 2
menclose horizontal/vertical/diagonal strikes and right, top: x + y 2
x + y 2
menclose horizontal/vertical/diagonal strikes and left, bottom: x + y 2
x + y 2
menclose circle with horizontal/vertical strikes: x + y 2 + x + y
x + y 2 + x + y
menclose roundedbox with horizontal/vertical strikes: x + y 2 + x + y
x + y 2 + x + y

menclose rtl dir tests

dir is set on the math element unless otherwise noted. Native menclose (middle) vs polyfill (right), same markup in each row.

RTL dir tests
Description Native menclose (no polyfill on this subtree) After _MathTransforms.transform
menclose phasorangle (should reverse): π / 8
π / 8
menclose phasorangle (dir set on 'mrow', should reverse): π / 8
π / 8
menclose radical (should reverse, relies on underlying implementation of msqrt): π / 8
π / 8
menclose left (should stay on left): π / 8
π / 8
menclose longdiv (should stay on left): π / 8
π / 8
menclose rightarrow (should still point to right): π / 8
π / 8