Re: display="block" question

David Carlisle wrote:
> If you are using presentation mathml I think it's OK to use an
> <mtext>.</mtext> even though structually the mathematics is part of the
> sentence so  one might argue that the xml structure ought to reflect
> that and have the . outside the <math>.
> It's possible to do that as well of course, something like
> <div class="displaymath"><math> ...</math><span>.</span></div>
> with the math here being "inline" but set in displaystyle (as far as
> mathml is concerned) but positioned centrally using css, and similarly
> the punctuation being placed within the display block but after the
> mathematics. This keeps the math element clear of document-level
> sentence punctuation, which might be especially useful if you are using
> content mathml.

Funny how you forget such annoying details; I thought I was using
the 2nd method, but am actually using both --- let me explain.

To get a decent layout with equation numbers and (often) conditions
or constraints, which I wanted pushed to the left & right margins, resp.
I needed something like:
<div class="equation">
  <span class="refnum">1.1</span>
  <math display="block"> ...</math>
  <span class="constraint"><math>...</...
and have the CSS float refnum & constraint to the left & right.
Floating those is better than other positioning options, since
it copes better when the pieces add up to more than the screen width.

But having done that, I couldn't manage putting the punctuation outside
the math and still having it positioned correctly, although I wouldn't
swear it's impossible.  OTOH, it was also the case that I could
still use display="block", rather than an extra mstyle.

>From that experience, I'd not worry too much about what's "Right",
but what Works! :>

> David

Received on Friday, 26 January 2007 22:12:35 UTC