# Re: Questions about Elementary Math

From: William F Hammond <hammond@csc.albany.edu>
Date: Thu, 26 Jun 2014 20:39:18 -0400
To: Bruce Miller <bruce.miller@nist.gov>
Cc: <www-math@w3.org>
Message-ID: <i74mz7fao9.fsf@hilbert.math.albany.edu>
Bruce Miller <bruce.miller@nist.gov> writes:

> ...  but my impression is that element position
> being significant has always been a common approach in SGML, XML...
> Much like positional versus keyword arguments to functions &
> procedures in programming, each have their place.

Positional arguments, as with, for example, \frac{}{} and \href{}{}
are usually very convenient for authors.

And, yes, one *can* work with the positional arguments in mathml.

>> Anyway, with hindsight it seems clear to me that named
>> children for mfrac, msub, ..., mstack would have been better
>> because it would have made a bit less work for rendering engines
>> and processors.
>
> Or at least CSS....
> That's the only context where I've noticed complaints about
> positional elements.  Given that MathML & CSS were being
> invented in roughly the same time frame --- and probably
> with little idea initially that CSS might be used to
> render MathML --- it's not surprising that some
> of each's core design decisions weren't synchronized.
> One could as easily imagine CSS making it easy to deal
> with positional elements, as imagine MathML not using them.

Take, for example, msubsup.  With CSS you can "sub" the
second child and "sup" the third child.  But then the sup
will be to the right of the sub.  Do you want that or do you
want them vertically aligned as with LaTeX?  For vertical
alignment you might wing it with CSS "position", but
that won't be at all robust.  You begin to get sanity by
placing the second and third args in their own container,
which can be made a flexible column.  You're not home free
without a CSS way to incorporate the height of the base
(first child).  Fortunately, however, if the scripts really
are scripts, i.e., inert scripts, the base is probably of
normal height -- one normally applies inert scripts only to symbols,
not to expressions.  If the scripts are exponents or operators,
then in my view vertical alignment is not desirable, and you
don't need the height of the base.  Of course, to have any
idea whether the scripts are really scripts you need more
content-level information.  For that css-styling the xml
guise of a LaTeX profile is better than css-styling mathml.

>> elements using child position -- certainly mfrac, msub,
>> msup, and msubsup, probably also mmultiscripts, maybe others
>> I haven't thought about carefully -- to provide alternate
>> content models using named children that are essentially
>> mrows with use restricted to the respective parents.
>
> Personally, I find those elements to be quite natural,
> except for the markers used in mmultiscripts.
> But, whatever the merits, it's too late now.

Too late except that (1) at least for CSS the good browsers
don't seem to care much about what foreign markup is used as
long as foreign segments are well-formed xml and (2) the
kind of elaboration I have in mind can be generated or
removed with straightforward processing.  So, for clipping
presentation mathml into a non-browser, just have the
non-browser treat unknown elements as inconsequential with
transparent content.

-- Bill

Received on Friday, 27 June 2014 00:39:46 UTC

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