# RE: Questions about Elementary Math

From: Grégory Pakosz <gpakosz@myscript.com>
Date: Thu, 3 Jul 2014 19:07:45 +0000
To: Neil Soiffer <NeilS@dessci.com>
CC: "www-math@w3.org" <www-math@w3.org>
Message-ID: <1404414465516.51403@myscript.com>
Neil,

In the screen shot attached of a Dutch division, maybe a position attribute on the quotient <msrow> would do the job.

Reminder: this is a handwritten division recognized with our tech and I serialize the interpretation into MathML.

I was able to generate a <msgroup> to properly align 345 with -42 (as written on paper). But the original ink shows that the \ sign is aligned with the 3 of 23 and the 3 of 345. Then, the 91 of 291 is aligned with the 45 of 345. Adding a <none/> before 291 AND having a position to offset the quotient would enable to achieve that alignement.

But that's just reasoning on a single example... Not sure how well it generalizes.

Regards,

Gregory

________________________________
From: neil.soiffer@gmail.com <neil.soiffer@gmail.com> on behalf of Neil Soiffer <NeilS@dessci.com>
Sent: Thursday, July 03, 2014 7:50 PM
To: Grégory Pakosz
Cc: Neil Soiffer; David Carlisle; www-math@w3.org
Subject: Re: Questions about Elementary Math

You shouldn't have needed to reboot, but who knows what else was going on...  A reboot never hurts :-)

There's no way to adjust the position using mlongdiv attrs. I tried playing with mpadded, but because MathPlayer places the : and =, those tricks don't work. So I'm sorry to say there doesn't seem to be a way to change that.

If you have suggestions for improving mlongdiv such as adding a tight=true/false for making the divisor tight against the dividend vs what MathPlayer currently does where it pushes it to the right of the "division stack" (my name -- maybe there's an official name for that). Of course, tight would only apply to those longdivstyles where it is sensible. I'm not saying that "tight" is the right attribute to add, but just throwing it out as a possibility.

Neil

On Thu, Jul 3, 2014 at 9:31 AM, Grégory Pakosz <gpakosz@myscript.com<mailto:gpakosz@myscript.com>> wrote:

Nevermind,

I didn't reboot my Windows 7 + IE9 VM after having installed MathPlayer since instructions said I just had to relaunch IE.

In any case, is there a way to adjust the position of the divisor and the quotient?

My use case is the following: I recognize handwritten elementary math operations and I would like to position everything with respect to what's been written. In the screenshot attached, to achieve that, I would need to shift ":891 = 12" a bit to the left.

Thanks.

Gregory

________________________________
From: Grégory Pakosz
Sent: Thursday, July 03, 2014 5:54 PM
To: Neil Soiffer; David Carlisle
Cc: www-math@w3.org<mailto:www-math@w3.org>

Subject: RE: Questions about Elementary Math

Neil,

That said, MathPlayer fails to render the following MathML, see screenshot attached.

<math xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle displaystyle="true">
<mstack stackalign="right">
<mscarries>
<none/>
<mn> 1 </mn>
<none/>
</mscarries>
<msrow>
<mn> 241 </mn>
</msrow>
<msrow>
<mo> + </mo>
<none/>
<mn> 29 </mn>
</msrow>
<msline position="0" length="3"/>
<msrow>
<mn> 270 </mn>
</msrow>
</mstack>
</mstyle>
[/itex]

Gregory

________________________________
From: neil.soiffer@gmail.com<mailto:neil.soiffer@gmail.com> <neil.soiffer@gmail.com<mailto:neil.soiffer@gmail.com>> on behalf of Neil Soiffer <NeilS@dessci.com<mailto:NeilS@dessci.com>>
Sent: Thursday, June 26, 2014 7:03 PM
To: David Carlisle
Cc: Grégory Pakosz; www-math@w3.org<mailto:www-math@w3.org>
Subject: Re: Questions about Elementary Math

As noted, MathPlayer (which died at IE9 unless MS fixes a bug in enterprise mode -- enterprise mode was introduced a few months back), supports it. Along with MathPlayer, the MathFlow SDK tools (EquationComposer and DocumentComposer) also support it. That's where the rec's images came from.

Neil

On Wed, Jun 25, 2014 at 8:10 AM, David Carlisle <davidc@nag.co.uk<mailto:davidc@nag.co.uk>> wrote:
On 24/06/2014 15:56, Grégory Pakosz wrote:

Hello,

I have two questions regarding elementary math as specified by MathML 3.0:

1) Is there a renderer out there that supports rendering additions, substractions, multiplications, and divisions with <mstack>, <mscarries>, and <mlongdiv> ? I failed to find one so far (downgrading IE to IE9 + installing a plugin isn't really future proof).

Possibly currently only MathPlayer supports it natively, and as you indicate that is not available in current IE
however it's possible to transform the markup to mathml2 for rendering in other clients.

The MathJax "content mathml" extension and the firefox  mathml-mml3ff addon both work by using some XSLT of mine
to translate the markup to mathml2 mtable.

Most of that content mathml to presentation transformation has also been re-encoded in javascript to avoid the XSLT stage
(which is very slow in chrome) although not currently the elementary math part, that shouldn't be hard to add, given some time.

2) Despite being XML, <mstack> relies on children order instead of named elements like <dividend>, <divisor>, <quotient>. What's the rationale behind this choice?

Positional children are used quite a lot in the mathml design: mfrac msub etc  also do not have named arguments.

Thanks you,

Gregory

David



(image/png attachment: sshot.png)

Received on Thursday, 3 July 2014 19:08:17 UTC

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