From: Frédéric WANG <fred.wang@free.fr>

Date: Thu, 22 Jan 2009 21:50:18 +0100

Message-ID: <4978DC0A.6040005@free.fr>

To: Karl Tomlinson <w3@karlt.net>

CC: Neil Soiffer <Neils@dessci.com>, www-math@w3.org

Received on Thursday, 22 January 2009 20:53:05 UTC

Date: Thu, 22 Jan 2009 21:50:18 +0100

Message-ID: <4978DC0A.6040005@free.fr>

To: Karl Tomlinson <w3@karlt.net>

CC: Neil Soiffer <Neils@dessci.com>, www-math@w3.org

=> Interpretation of "as if the others were not present" The algorithm proposed was: 1) Compute the least possible size for each notation 2) Compute the maximum of these lower bounds 3) Draw all the notations with this maximum size So you're right, 2) seems a bit contradictory because the maximum size depends on each lower bounds. But I think the statement in the draft should only be understood as: - the order of notations in the attribute doesn't matter (it was the starting point of this thread) - the lower bound in 1) of each notation is computed independently As I said, steps 2 & 3 are in my opinion necessary to respect rule of non-nested notation (for a less esoteric example than circle+radical, see below). => Risk of a recursive algorithm Because each lower bound is computed independently, a recursive algorithm is not possible in step 1) (and you agree with it). It is neither the case in 2) (you simply take the maximum of a finite set of values) nor in 3) (you draw each notation inscribed in a given rectangle whose size never changes). So I guess your remark is biased by the way Firefox works. Given a rectangle (or even simply one dimension), Firefox is able to stretch the characters so that its size will become close to this rectangle but can not guarantee that the character will exactly fit the rectangle. This means that for a combination such that "radical actuarial", 3) is not possible because we always need to readjust the size of the symbols: Firefox will stretch the radical symbol, then stretch the parenthesis symbol to cover the height of the radical symbol, then needs to readjust the size of the radical symbol and so forth. Of course, in the current version of the patch I cheat and use an order of priority on the notations to determine which size to take. However, it should ideally be possible to draw all the notations so that they are perfectly inscribed in a given bounding box. => Treatment of notations The theoretical mechanism treats all the notations in the same way but as I said above, the specific treatment I made for radical & actuarial is due to the limitation of the stretch operation in Firefox. At the contrary, I think not considering the final size of the menclose to draw the notation will result in an asymmetry between notations (again, see the last paragraph). => Considering shapes other than rectangles when choosing a size for notations If you are able to handle other shapes than rectangle for bounding area, then it is not too difficult to modify step 1) so that the computation of the lower bound takes into account the shape of the enclosed content. I guess your remark refers to our discussion about two nested <menclose="circle"/>: in this case, if you know that the enclosed content is an ellipse then you will simply compute a better lower bound than the one given by the size_of_bounding_box*sqrt(2) but the rest of the algorithm need not be change. => About drawing the notation according to the size of children So let's consider the example <menclose notation="updiagonalstrike circle box"/> (see screenshot). First the lower bounds are computed independently. For example, the formulae I use are: - the strike simply takes the size of the content - the rectangle takes the size of the content + a padding - the ellipse takes the size of the content * sqrt(2) But because if we don't take the maximum of the lower bounds before drawing the notations, the result will be similar to (1), that we would actually expect for the case of 3 nested <menclose/> elements. So there is an obvious asymmetry between notations which is a consequence of the choice way lower bounds are computed. Other implementers may use other formulae and for instance find that the box is greater than ellipse. Now if we apply the algorithm of the "maximum lower bounds", the strike, ellipse and box are all inscribed in a same bounding box (2). This is the result that I think everybody expect and which is close to the box+circle example that Neil added in the draft. All the notations are now considered equivalently and there is no nested notation in an arbitrary order... Frédéric Wang

(image/png attachment: circle_box_strike.png)

*
This archive was generated by hypermail 2.3.1
: Tuesday, 6 January 2015 21:27:41 UTC
*