linebreaking mathml

Hi all;
  I suppose that when MathML was originally developed,
the authors imagined that the browser would be responsible
for line breaking.  After all, it _does_ seem like the
right place; who else knows the font sizes, window width
and such?
  Alas, apparently linebreaking is a bit too demanding
for real time; rendering MathML is slow enough as it is.
Mozillae will linebreak only at the topmost level, under
very limiting circumstances.  I haven't (re)checked exactly
what MathPlayer does.

So, I set out to pre-linebreak my mathml to at least a
not-unreasonable width, and started looking for the
right markup bits (we're talking presentation MathML here).

The first strategy I found is to insert
  <m:mspace linebreak="newline"/>
Or even better, linebreak="indentingnewline", although
the spec doesn't (yet ! :> ) indicate what it
should indent _to_  (a fixed amount, to the begin
of the containing row, something else ? ).
Unfortunately, Mozilla doesn't implement that.

OK, second strategy: split a row into rows of an
mtable. Which almost works, but the align attribute
of mtable seems to miss a useful value for this
case.  Namely, I would like to align the table so
that the 1st row's baseline aligns with the
baseline of material on the left (like align="baseline1" ).
However, I would like the following material to
align with the last row (like align="baseline<n>" ).
Like this:
   a + (b + c + d
         + e + f + g) + h

Lacking that, I've got to assure that the broken mrow
is the last on it's line (move the "+ h" to the next line),
and/or be very careful (& somewhat contrived) when nesting mrows.

Would such an alignment value be useful?
(and would it ever be implemented? )

Or have I overlooked a better linebreaking strategy?

-- 
bruce.miller@nist.gov
http://math.nist.gov/~BMiller/

Received on Tuesday, 5 June 2007 05:50:25 UTC