W3C home > Mailing lists > Public > www-math@w3.org > January 2009

Re: menclose: several values in the "notation" attribute

From: Frédéric WANG <fred.wang@free.fr>
Date: Tue, 20 Jan 2009 08:43:37 +0100
Message-ID: <497580A9.5030604@free.fr>
To: Karl Tomlinson <w3@karlt.net>
CC: www-math@w3.org, Neil Soiffer <Neils@dessci.com>

    I agree with Karl about the ambiguity of "content". I believe it's 
because there are two kinds of notations:
- for "strike notations", it is clear that "content" means children of 
<menclose/> but
- for "enclosing notations" it can also means the other notations (if we 
don't specify that notations overlap).

    I think before the second part that describes more precisely each 
notation, you should add a general mechanism to render the notations of 
menclose. For instance:
    1) the children of <menclose/> have a bounding box rect1.
    2) the <menclose/> element has a bounding box rect2 whose size is 
computed according to the size of rect1 and the notations used.
    3) all the notation are inscribed in rect2 (and hence possibly overlap).
    Then 2) and 3) can be explained more:
- a "strike notation" has not effect over the size of rect2
- an "enclosing notation" encloses rect1. rect2 is given by the size of 
rect1 + the size of the components used to draw the notation (radical 
symbols, padding...)
- "updiagonalstrike" extends from the lower left corner to the upper 
right corner of rect2
- etc

    By the way, I'm not sure the following suggestion is relevant for 
"circle" notation:
"In practice, paddings on each side of 0.4em in the horizontal direction 
and .5ex in the vertical direction seem to work well"

    We noticed that in some cases (for instance a <menclose 
notation="circle"/> arround a <mtable/>) it's better to use 
sizeof(rect2) = sqrt(2)*sizeof(rect1).

F. Wang
> On Fri, 14 Nov 2008 21:01:15 -0800, Neil Soiffer wrote:
>> The spec currently says
>> "Any number of values can be given for notation separated by whitespace; all
>> of those given and understood by a MathML renderer should be rendered. For
>> example, notation="circle horizontalstrike" should result in circle around
>> the contents of menclose with a horizontal line through the contents. "
>> That seems pretty clear to me that all of the values should be rendered.  It
>> is maybe less clear that they should overlap, but the paragraphs that give
>> default spacing from the content, so that is pretty strongly implied just as
>> it is in the text above.  Is it really necessary to add something that say
>> they should overlap?
> What is perhaps not clear is whether or not "contents" or
> "content" includes the notations.  Most of
> http://www.w3.org/TR/2008/WD-MathML3-20081117/chapter3.html#presm.menclose
> seems to imply that "contents" are its arguments (child elements),
> but not the notations.  This is most strongly suggested here:
>   menclose accepts any number of arguments; if this number is not 1,
>   its contents are treated as a single "inferred mrow" containing
>   its arguments, ...
> The one thing that seems contradictory to this interpretation of
> "content" is the example in this statement:
>   The values "updiagonalstrike", "downdiagonalstrike",
>   "verticalstrike" and "horizontalstrike" should result in the
>   indicated strikeout lines being superimposed over the content of
>   the menclose, e.g. a strikeout that extends from the lower left
>   corner to the upper right corner of the menclose element for
>   "updiagonalstrike", etc.
> Assuming the "menclose element" includes the notations, a
> strikeout from "the lower left corner to the upper right corner of
> the menclose element" would strikeout other notations as well as
> child elements.
> However, an interpretation that includes the notations in the
> contents also could not be consistent, because it would not be
> possible to have both "roundedbox" and "circle" enclose other each
> other, nor could they enclose a updiagonalstrike, while that
> updiagonalstrike strikes out the roundedbox or circle.
> As most of the section seems to use "content" and "contents" to
> refer only to child elements, not notations, I expect that it's
> best not to infer too much from the "updiagonalstrike" example?
> If so, I would suggest changing the wording to avoid using the
> expression "menclose element".  Perhaps
>   e.g. a strikeout that extends from the lower left corner to the
>   upper right corner of a rectangle enclosing the child elements
>   for "updiagonalstrike", etc.
Received on Tuesday, 20 January 2009 07:46:20 UTC

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