This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Currently Amaya can only display one kind of notation in a menclose element. Moreover some notations have an approximative rendering. http://www.w3.org/TR/MathML2/chapter3.html#presm.menclose
Below is approximately the algorithm that will be used in Firefox. Do you think it can be expressed using the P language? 1) Parsing of "notation" attribute. See bug 7166. box is the same as top + left + bottom + right 2) Computation of the bounding box We want to enclose a content of bounding box of size w x h. To do this, we need to determine the paddings t, l, r and b such that all notations can be drawn inside the menclose bounding box of size (l + w + r) x (t + h + b). Hence we analyse the padding needed for each notation and take the maximum. 2.1) set t, l, r, b to zero 2.2) roundedbox, top, left, bottom: l is at least v0 2.3) roundedbox, top, right, bottom: r is at least v0 2.4) roundedbox, top, left, right: t is at least v0 2.5) roundedbox, bottom, left, right: b is at least v0 2.6) circle: l & r is at least w * v1 ; t & b is at least h * v1 2.7) longdiv: t is a least v2 and l is a least v3 2.8) radical: t is a least v2 and l is a least v4 v0 = an arbitrary padding, for instance 3 * thickness of drawing v1 = (sqrt(2) - 1)/2 v2 = the thickness of the top bar + an arbitrary space v3 = width of the right parenthesis character v4 = width of the radical character 2.9) circle: center the ellipse: l = r = max(l, r) and t = b = max(t, b) 3) Drawing the notation 3.1) longdiv and radical: draw the characters (parenthesis & radical) on the left of the content and a top bar above the content. 3.2) other notations: draw them using the bounding box of menclose. "circle" is actually an ellipse. For 3.1) Amaya does not use characters but graphics.
Actually 2.2, 2.3, 2.4, 2.5 also apply to circle