Re: mathcolor/mathbackground on <math/> and <semantics/> elements?

The specification for mathbackground says, "Specifies the background color
to be used to fill in the bounding box of the element and its children. The
default, "transparent", lets the background color, if any, used in the
current rendering context to show through."

In your example, specifying "red" on the mfrac means that the fraction and
all its children should be red.  It would be wrong for mathbackground to
behave differently on a 'math' element (ie, not set the background color for
its children). It seems you are implying that a different interpretation
(eg, not setting the background color of the children) seems reasonable when
the attribute is on the math element.

I'm puzzled why this functionality isn't clear, but apparently it isn't.

Neil Soiffer
Senior Scientist
Design Science, Inc.
www.dessci.com
~ Makers of MathType, MathFlow, MathPlayer, MathDaisy, WebEQ, Equation
Editor ~




On Wed, Apr 21, 2010 at 3:36 PM, Karl Tomlinson <w3@karlt.net> wrote:

> Neil Soiffer writes:
>
> > If it didn't behave like mstyle, what would be the point of being able to
> > set attributes on it?  I suppose if it wasn't clear to you, then it might
> > not be clear to others so it should be explicitly stated (even though
> IMHO,
> > it has to work that way).
>
> Perhaps it has to work that way but that may be counter-intuitive
> to some.  These attributes behave differently according to the
> elements on which they are specified.
>
> Consider for example:
>
>  <math mathbackground="green">
>    <mfrac mathbackground="red">
>      <mn>1</mn>
>      <mn>2</mn>
>    </mfrac>
>  </math>
>
> Some might have only specified mathbackground on <math> because
> they wanted a green background for the math block.
>
> They might expect behavior similar to CSS background where the 1
> and 2 would have transparent backgrounds and the red of the
> mfrac would show through.
>
> IIUC and the math should behave like mstyle, then 1 and 2 should
> have green backgrounds (on top of the red mfrac).
>
> Reverting the default for mathbackground to transparent would
> require an <mstyle mathbackground="transparent"> within the <math>.
>
>

Received on Wednesday, 21 April 2010 23:58:06 UTC