# Re: movablelimits attribute on munderover/munder/mover?

From: David Carlisle <davidc@nag.co.uk>
Date: Mon, 06 Jan 2014 12:09:27 +0000
Message-ID: <52CA9CF7.9060302@nag.co.uk>
To: Frédéric WANG <fred.wang@free.fr>, "www-math@w3.org" <www-math@w3.org>
On 06/01/2014 11:35, Frédéric WANG wrote:
> Hi all,
>
> This is a well-known problem in MathJax but I don't think it has ever
> been reported to the Math WG... Basically, some TeX commands like \lim,
> \max, etc have "movablelimits": in display mode they should render as
> munderover but in inline mode as msubsup. But in MathML, only <mo>
> operators can have this property. So the code generated by MathJax is
>
> <munder>
>    <mo movablelimits="true">max</mo>
>    <mi>a</mi>
> </munder>
>
> Other TeX-to-MathML converters such as itex2MML tries to use
> <mi>max</mi> but they have to decide at conversion time if
> msubsup/munderover should be used according to the display style of the
> current subexpression. The disadvantage of this approach (besides making
> generation slightly harder) is that if one modifies the display style
> (e.g. by setting the display attribute via Javascript, or copying the
> MathML source code and editing it somewhere else...) then the
> msubsup/munderover descendants won't be updated automatically.
>
> So my first question is: what is the markup recommended by the Math WG
> for these TeX commands: <mo> or <mi>? My understanding is that it is
> <mi>, so this leads to the second question: would it be possible to add
> a "movablelimits" attribute to the munderover/munder/mover elements to
> address this use case? The default value will be "false" and the value
> won't be taken from mstyle ancestors (see issues that I reported in the
> past with that element and the similarity with the accent attribute). I
> think this would be relatively easy to implement for MathML layout
> engines that already support mo@movablelimits...
>

Good question. This is a personal response,

There could be more clarity on whether multi-letter identifiers use mi
or mo, but I think they can use mo and in particular I think we should
keep the rule that only mo triggers a lookup of the operator dictionary.

http://www.w3.org/Math/draft-spec/mathml.html#chapter3_presm.mo.dict.attrs

where it discusses moveablelimits explicitly mentions lim as an example
which suggests that

a) <mo>lim</mo>  is correct and that

b) there ought to be a default operator dictionary entry for lim.

The MathMl2 had op dict entries for lim max and min

http://www.w3.org/TR/MathML2/appendixf.html#oper-dict.entries

But these were dropped in MathML3 as the operator dictionary was
re-organised and more closely tied to unicode characters

unicode.xml already has entries for lim/max/min they just don't have
operator dictionary fields, they could be added if the working group
agrees....

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is