W3C home > Mailing lists > Public > www-math@w3.org > April 2002

RE: MathML-Presentation specs criticized.

From: Jimmy Cerra <jimbofc@yahoo.com>
Date: Mon, 15 Apr 2002 21:46:35 -0400
To: <www-math@w3.org>
Message-ID: <000001c1e4e8$8b6a0010$0100a8c0@locutus>
> but how would you distinguish thehundreds
> of different notations that use a fraction-like layout. There is no
> clear place in the mfrac scheme where you could put invisible
operators.

Hey, I never thought of that.  I'll do some thinking (oh no!):  Here are
a few examples that have been historically though of as fraction-like
(that I know of):

1) Fractions (of course),
2) Derivatives and partial derivatives,
3) Legendre symbols (from spec),
4) Binomial coefficients (from spec),
5) Jacobians,
6) Long addition and subtraction,
7) I'd like to know of more if you know of any...

However, some of these can be represented better with the mover or
munder elements, such as derivatives (and partials).  As my calculus
teacher told me, the "fraction scheme" for a derivative does not mean it
is literally fraction.  In fact, it is more like a subscript or
underscript.  Behold:

<mrow>
	<mo descript="Derivative">Derivative of</mo>
	<mover>
		<mi>y</mi>
		<mi>x</mi>
	</msunder>
</mrow>

and the CSS stylesheet for a visual renderer:
mi {font-style: italic;}
mo[descript="Derivative"] {display: none;}
mo[descript="Derivative"] + mover > * :before {
	font-style: normal;
	content: "d";
}
mo[descript="Derivative"] + mover > * {
	border-top:    1px solid;
	border-bottom: 0px solid;
}
mo[descript="Derivative"] + mover > * + * {
	border-top:    1px solid;
	border-bottom: 0px solid;
}

Why does the "mfrac scheme" not apply?  Well, using that element implies
"equal" status of the top and bottom, while the mover element implies a
base (first element) and a modifier (exponent, index, or differentiating
variable).

This brings me to a correction in the original post: when I used
'type="invisible"' in my examples, I should have said that the attribute
should be part of a scheme determined by the author (and not the
language, although a default scheme for identifying function could be
made).  Using a 'descript' attribute makes more sense (at least to me).





> No, the primary purpose of presentation markup is to specify the
layout
> this layout specification does not become irrelevant just because the
> meaning of that layout varies in different contexts.

I'm not an expert (although I pretend to be :) but I think that if the
meaning of the layout changes, then the entire equation's meaning
changes from culture to culture.  This corrupts the data stored in MMLP.

To be a universal mathematics data format, there must be a single way to
encode the meaning of the equation while also allowing for multiple
layouts.  Paradoxically, the layout is part of the content, so the
presentation language should allow multiple layouts of the same code.

(Here's a good (I hope) example.  Visual rendering agents might style an
mfrac element as two rows separated by a bar.  However, a blind person's
audio rendering agent might style the mfrac element by saying the
(insert natural language here) translation of the numerator + "over" +
the denominator.  The blind person would be confused if it was rendered
as the numerator + "1 pixel solid bar" + denominator.)

Why have a presentation language at all (ignoring the content section
for now - that's another can of worms)?  Well, the presentation language
would show how each different expression relates to the whole (see the
difference between mfrac and mover above).  In other words, MMLP
describes how each element is linked to the whole in an abstract layout.
That abstract layout is then translated into a specific layout as
specified by the style sheets.  One UA will output a layout for a
computer to solve; another will output a layout for a high school
student to see; a third will output a layout for a blind person to feel
using Braille; and so on....

That is how I see MMLP, at least.  Does this make sense, or am I wrong
again?  (BTW, it's better to be wrong since I'll learn more that way. :)


---
Jimmy Cerra
P.S. I changed my mind & I'm posting this onto the mailing list.  Sorry
for flooding all the messages - I feel like a spammer.  I'm very sorry.
:-{



-----Original Message-----
From: David Carlisle [mailto:davidc@nag.co.uk]
Sent: Monday, April 15, 2002 6:49 PM
To: jimbofc@yahoo.com
Cc: www-math@w3.org
Subject: Re: MathML-Presentation specs criticized.



> (5) For instance, the mathvariant, mathsize, mathcolor and
> mathbackground attributes can be set by equivalents in CSS.  I think
the
> spec mentions this, but I can't find it.

This is not true unless CSS were extended to support mathematics (which
is a possibility) The whole point of the style/content separation
in CSS is that the style is essentially cosmetic and can be changed
according to the preferences of the reader. The reason for having
separate mathvariant attribute to control the math font is that this
does not work for mathematics. A textual heading may be switched from
bold to sans serif to italic, at the discretion of the house style for
the document, but you can't do that if it contains mathematics. It is
important that the expression encodes these math alphabets in a way that
is immune to external font changes from stylesheets. (An external
stylesheet can still change fonts but only using this information from
the markup in the document, ie choice of fraktur font, roman font etc,
but it can't be allowed to make arbitrary characters bold, as can a
normal stylesheet for text.


c) However, as context changes from document to
   document and culture to culture, MMLP can become irreverent despite
   extension mechanisms built into MathML.

No, the primary purpose of presentation markup is to specify the layout
this layout specification does not become irrelevant just because the
meaning of that layout varies in different contexts.

> It is ambiguous whether or not the number 2 is a index or an exponent.
> A more descriptive way of describing the situation is:

MathML already has the content elements to make this distinction,
I don't see how having invisible operators in the presentation markup
makes this distinction any clearer (and in general I don't see how it
would work at all, you insert an invisible ^ to distinguish one out of
the many uses of superscript, but how would you distinguish thehundreds
of different notations that use a fraction-like layout. There is no
clear place in the mfrac scheme where you could put invisible operators.
MathML as currently defined lets you separate the semantics and the
layout, using mfrac for the layout (or msup or whatever other notation
is desirable) but specifying the semantics using <apply> from the
content markup which is, in the main just an expression of the
tree structure of the mathematical expression <apply><power/>....


David


_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
Received on Monday, 15 April 2002 21:46:28 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 20 February 2010 06:12:51 GMT