W3C home > Mailing lists > Public > www-math@w3.org > March 2014

Percentage width for mtable

From: Davide P. Cervone <dpvc@union.edu>
Date: Wed, 19 Mar 2014 15:40:55 -0400
Message-Id: <ED19B54F-5B2F-4F68-8252-908200E57911@union.edu>
To: www-math@w3.org
Folks:

Here is another confusion I'm struggling with.  According to the table at

	http://www.w3.org/TR/MathML3/chapter3.html#presm.mtable.attrs

"When the value is a percentage value, the value is relative to the horizontal space a MathML renderer has available for the math element."

So, if I read this correctly, the width is based on the container for the <math> element containing the <mtable>.  That means that for something like

    <math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
      <mtable>
        <mtr>
          <mtd>
            <mpadded mathbackground="red" width="25em" height="1em" />
          </mtd>
        </mtr>
        <mtr>
          <mtd> 
            <mtable frame="solid" width="50%">
              <mtr>
                <mtd>
                  <mi>x</mi>
                </mtd>
                <mtd>
                  <mi>y</mi>
                </mtd>
              </mtr>
            </mtable> 
          </mtd>
        </mtr>
      </mtable>
    </math>

the inner table (with width="50%") should be half the size of the container for the `<math>` element, not half the size of the column in which the inner table sits.  Is that the intended result?  It seems more natural for the 50% to refer to the width of the column (presumably 25em), so that the inner table would be 12.5em.  If we take the statement from the spec literally, then the inner table will change size if the browser window is resized, while the rest of the table remains the same.

Am I misunderstanding the spec?

Davide
Received on Wednesday, 19 March 2014 19:41:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 19 March 2014 19:41:23 UTC