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

Re: Mathematical selection

From: Richard Kaye <R.W.Kaye@bham.ac.uk>
Date: Thu, 30 Mar 2006 14:04:18 +0100
To: Public MathML mailing list <www-math@w3.org>
Message-Id: <200603301404.18896.R.W.Kaye@bham.ac.uk>

On Thursday 30 March 2006 12:35, Paul Libbrecht wrote:
> W Naylor wrote:
> > I though to try out the ORCCA tex -> MathML translator on your
> > example:I input the document:
> > \documentclass[11pt]{article}
> > \begin{document} $$3*a+b$$ \end{document}
> > and get out the MathML:
> > <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"
> > overflow="scroll">
> > <mn>3</mn><mo>*</mo><mi>a</mi><mo>+</mo><mi>b</mi></math>
> > now this is machine generated, (though I suspect that many authors would 
> > be lazy and wouldn't put an mrow around the 3*a, if they were creating 
> > this by hand)
> Well, that's an example where solution-1
> (presentation-tree-based-selection) is doing the same as text
> selection... it clearly is wrong but if the author is aware of it, he

Actually, it is only clearly wrong with standard semantics where 
+ = addition and * = multiplication on some standard field such
as the real numbers, and using standard conventions on precedence
(and perhaps in a context where you are using standard classical
logic to discuss real numbers).

I didn't see anywhere in the TeX or MathML that says that standard
conventions should apply here. Admittedly p-MathML has an operator
dictionary (which is not part of the normative spec) but even this
just says 3 in <mn>3</mn> should be set as a number and
that <mo>*</mo> and <mo>+</mo> should be in-fix operators with
particular spacing round them.TeX does something similar. I don't 
think it suggests precedence.

In fact "real" mathematicians rarely (perhaps never) use * for 
multiplication and should be trained not to take precedence rules 
for granted!

IMHO it would be quite wrong to apply some prejudged notions of 
precidence where none are actually given.

Best wishes

> might have a macro at hand that could let him type
>   $$\r{3*a}+b$$
> > In order for the machine generated MathML to include mrows at the
> > appropriate places, it would be necessary to pay attention to precedence
> > rules. It strikes me that though many of these are fairly universal, we 
> > hit the usual ambiguity of presentation mathematics problem. Maybe this 
> > could be circumvented using configuration files of some sort.
> Contextual notations... to me this is equivalent to having a good
> text-to-semantic converter such as QMath....
> > One thing seems certain however, that is that there is a need for tools
> > to  perform translations (like adding mrows in the appropriate places
> > etc.)
> Try QMath. It has drawbacks but it does much of that already.
> paul
Received on Thursday, 30 March 2006 13:07:12 UTC

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