[liblouis-liblouisxml] Re: How does MathML handle arithmetic examples and spatial layouts?

  • From: Neil Soiffer <neil.soiffer@xxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Fri, 13 Nov 2009 19:58:28 -0800

The main new features of presentation MathML that you probably need to
consider are:

1.  The elementary math notations/elements
2.  Linebreaking/indenting support (this will probably be tricky for you
since you'll need to do/remember spatial layout and pay attention to
attribute values, but it is quite powerful) -- linebreaking/indenting is
given via attributes on operators (mo) and can also be done on mspace for
backwards compatibility.

Other changes probably don't affect liblouis.  They include:
1.  mglyph can now reference an image -- "alt" remains a required attr.
2.  bi-directional language support, including an addition to menclose
3.  an addition to mpadded
4.  the href, mathcolor, and mathbackground attrs are allowed on most
elements
5.  any values settable by mstyle can be set on the math element

If you have any questions about details, let me know.

     Neil



On Fri, Nov 13, 2009 at 5:23 PM, John J. Boyer <john.boyer@xxxxxxxxxxxxxxxxx
> wrote:

> Thanks for the urls. I may have to do some additional coding to
> accommodate new features.
>
> John
>
> On Fri, Nov 13, 2009 at 08:40:49AM -0800, Neil Soiffer wrote:
> >    Here's the URL to the beginning of the spec:
> >    [1]http://www.w3.org/TR/MathML3
> >
> >    I gave you one that pointed to the elementary math part:
> >    [2]http://www.w3.org/TR/MathML3/chapter3.html#presm.elementary
> >
> >    *** Neil
> >
> >    On Fri, Nov 13, 2009 at 3:08 AM, John J. Boyer
> >    <[3]john.boyer@xxxxxxxxxxxxxxxxx> wrote:
> >
> >      Thanks for the examples. Can you give me the url for MathML 3?
> >
> >      Thanks,
> >      John
> >      On Thu, Nov 12, 2009 at 08:26:36PM -0800, Neil Soiffer wrote:
> >      > * *MathML 2 doesn't have a good way to represent elementary math
> >      notations.*
> >      > * *You could use tables, but then you have lost the numbers and
> they
> >      are very
> >      > * *fragile, it's hard to get the lines right, etc.* MathML 3,
> which
> >      just
> >      > * *ended it's last call period yesterday, adds some elements to
> make
> >      > * *elementary math easier and hopefully accessible.
> >      >
> >      > * *Here's an example for a simple addition (there is a space after
> the
> >      "+"):
> >      >
> >      > * *<math xmlns="[1][4]http://www.w3.org/1998/Math/MathML";>
> >      > * *<mstack>
> >      > * ** <mn>424</mn>
> >      > * ** <msrow> <mo>+</mo> <none/> <mn>33</mn> </msrow>
> >      > * ** <msline/>
> >      > * *</mstack>
> >      > * *</math>
> >      >
> >      > * *Here's an example of subtraction with borrows:
> >      > * *<math xmlns="[2][5]http://www.w3.org/1998/Math/MathML";>
> >      > * *<mstack>
> >      > * ** <mscarries crossout='updiagonalstrike'>
> >      > * ***** <mn>2</mn> <mn>12</mn> <mscarry crossout='none'> <none/>
> >      </mscarry>
> >      > * *** </mscarries>
> >      > * *** <mn>2,327</mn>
> >      > * *** <msrow> <mo>-</mo> <mn> 1,156</mn> </msrow>
> >      > * *** <msline/>
> >      > * *** <mn>1,171</mn>
> >      > * *</mstack>
> >      > * *</math>
> >      >
> >      > * *Finally, here's a more complicated example of long division
> >      >
> >      > *<mlongdiv longdivstyle="lefttop">
> >      > * *<mn> 3 </mn>
> >      > * *<mn> 435.3</mn>
> >      >
> >      >
> >      > * *<mn> 1306</mn>
> >      >
> >      > * *<msgroup position="2" shift="-1">
> >      > * * *<msgroup>
> >      > * * * *<mn> 12</mn>
> >      > * * * *<msline length="2"/>
> >      > * * *</msgroup>
> >      >
> >      > * * *<msgroup>
> >      > * * * *<mn> 10</mn>
> >      > * * * *<mn> 9</mn>
> >      > * * * *<msline length="2"/>
> >      > * * *</msgroup>
> >      > * * *<msgroup>
> >      > * * * *<mn> 16</mn>
> >      > * * * *<mn> 15</mn>
> >      >
> >      > * * * *<msline length="2"/>
> >      > * * * *<mn> 1.0</mn> * * * * * <!-- aligns on '.', not the right
> edge
> >      ('0') -->
> >      > * * *</msgroup>
> >      > * * *<msgroup position='-1'> * <!-- extra shift to move to the
> right
> >      of the "." -->
> >      >
> >      > * * * * <mn> 9</mn>
> >      > * * * *<msline length="3"/>
> >      > * * * *<mn> 1</mn>
> >      > * * *</msgroup>
> >      > * *</msgroup>
> >      > *</mlongdiv>
> >      >
> >      > * *To keep things simple (one digit per column) for these
> important
> >      > * *notations, they don't work for synthetic division.* For that
> you
> >      would
> >      > * *have to use mtable, although there are some tricks that I think
> >      might let
> >      > * *you make use of mstack -- I haven't thought them through.
> >      >
> >      > * *You can read about it here:
> >      > * *[3][6]
> http://www.w3.org/TR/MathML3/chapter3.html#presm.elementary
> >      > * *Based on feedback during the last call, there have been a few
> >      changes, but
> >      > * *that is mostly accurate.* We hope to have a "Call for
> >      Implementations"
> >      > * *draft out before Christmas.* It would be great to get your
> feedback
> >      on
> >      > * *trying to implement the elementary math in the two month(?)
> period
> >      for
> >      > * *that.
> >      >
> >      > * ***** Neil
> >      >
> >      > * *On Thu, Nov 12, 2009 at 6:56 PM, John J. Boyer
> >      > * *<[4][7]john.boyer@xxxxxxxxxxxxxxxxx> wrote:
> >      >
> >      > * * *Yes. I am asking about 2d addition, subtraction, division,
> etc.,
> >      where
> >      > * * *the units, tens and so on are lined up. Also about synthetic
> >      division
> >      > * * *and representations of fractions that are spread out for
> better
> >      viewing.
> >      > * * *I suppose mtable is used, but what are the attributes and
> values?
> >      >
> >      > * * *Thanks,
> >      > * * *John
> >      > * * *On Thu, Nov 12, 2009 at 03:06:29PM -0800, Neil Soiffer wrote:
> >      > * * *> * *I'm not quite sure what you are asking.* Are you asking
> >      about 2d
> >      > * * *addition,
> >      > * * *> * *subtraction, etc?* Or are you referring to something
> else?
> >      > * * *>
> >      > * * *> * ***** Neil
> >      > * * *>
> >      > * * *> * *On Thu, Nov 12, 2009 at 8:12 AM, John J. Boyer
> >      > * * *> * *<[1][5][8]john.boyer@xxxxxxxxxxxxxxxxx> wrote:
> >      > * * *>
> >      > * * *> * * *I'm trying to explain how to get liblouisxml to handle
> >      them in
> >      > * * *the
> >      > * * *> * * *documentation, but I haven't actullly seen them in
> MathML.
> >      I
> >      > * * *guess this
> >      > * * *> * * *is a question for Neil.
> >      > * * *>
> >      > * * *> * * *Thanks,
> >      > * * *> * * *John
> >      > * * *>
> >      > * * *> * * *--
> >      > * * *> * * *John J. boyer; President, Chief Software Developer
> >      > * * *> * * *Abilitiessoft, Inc.
> >      > * * *> * * *[2][6][9]http://www.abilitiessoft.com
> >      > * * *> * * *Madison, Wisconsin USA
> >      > * * *> * * *Developing software for people with disabilities
> >      > * * *>
> >      > * * *> * * *For a description of the software and to download it
> go to
> >      > * * *> * * *[3][7][10]http://www.jjb-software.com
> >      > * * *>
> >      > * * *> References
> >      > * * *>
> >      > * * *> * *Visible links
> >      > * * *> * *1. mailto:[8][11]john.boyer@xxxxxxxxxxxxxxxxx
> >      > * * *> * *2. [9][12]http://www.abilitiessoft.com/
> >      > * * *> * *3. [10][13]http://www.jjb-software.com/
> >      > * * *--
> >      > * * *John J. boyer; President, Chief Software Developer
> >      > * * *Abilitiessoft, Inc.
> >      > * * *[11][14]http://www.abilitiessoft.com
> >      > * * *Madison, Wisconsin USA
> >      > * * *Developing software for people with disabilities
> >      >
> >      > * * *For a description of the software and to download it go to
> >      > * * *[12][15]http://www.jjb-software.com
> >      >
> >      > References
> >      >
> >      > * *Visible links
> >      > * *1. [16]http://www.w3.org/1998/Math/MathML
> >      > * *2. [17]http://www.w3.org/1998/Math/MathML
> >      > * *3. [18]
> http://www.w3.org/TR/MathML3/chapter3.html#presm.elementary
> >      > * *4. mailto:[19]john.boyer@xxxxxxxxxxxxxxxxx
> >      > * *5. mailto:[20]john.boyer@xxxxxxxxxxxxxxxxx
> >      > * *6. [21]http://www.abilitiessoft.com/
> >      > * *7. [22]http://www.jjb-software.com/
> >      > * *8. mailto:[23]john.boyer@xxxxxxxxxxxxxxxxx
> >      > * *9. [24]http://www.abilitiessoft.com/
> >      > * 10. [25]http://www.jjb-software.com/
> >      > * 11. [26]http://www.abilitiessoft.com/
> >      > * 12. [27]http://www.jjb-software.com/
> >      --
> >      John J. boyer; President, Chief Software Developer
> >      Abilitiessoft, Inc.
> >      [28]http://www.abilitiessoft.com
> >      Madison, Wisconsin USA
> >      Developing software for people with disabilities
> >
> >      For a description of the software and to download it go to
> >      [29]http://www.jjb-software.com
> >
> > References
> >
> >    Visible links
> >    1. http://www.w3.org/TR/MathML3/
> >    2. http://www.w3.org/TR/MathML3/chapter3.html#presm.elementary
> >    3. mailto:john.boyer@xxxxxxxxxxxxxxxxx
> >    4. http://www.w3.org/1998/Math/MathML
> >    5. http://www.w3.org/1998/Math/MathML
> >    6. http://www.w3.org/TR/MathML3/chapter3.html#presm.elementary
> >    7. mailto:john.boyer@xxxxxxxxxxxxxxxxx
> >    8. mailto:john.boyer@xxxxxxxxxxxxxxxxx
> >    9. http://www.abilitiessoft.com/
> >   10. http://www.jjb-software.com/
> >   11. mailto:john.boyer@xxxxxxxxxxxxxxxxx
> >   12. http://www.abilitiessoft.com/
> >   13. http://www.jjb-software.com/
> >   14. http://www.abilitiessoft.com/
> >   15. http://www.jjb-software.com/
> >   16. http://www.w3.org/1998/Math/MathML
> >   17. http://www.w3.org/1998/Math/MathML
> >   18. http://www.w3.org/TR/MathML3/chapter3.html#presm.elementary
> >   19. mailto:john.boyer@xxxxxxxxxxxxxxxxx
> >   20. mailto:john.boyer@xxxxxxxxxxxxxxxxx
> >   21. http://www.abilitiessoft.com/
> >   22. http://www.jjb-software.com/
> >   23. mailto:john.boyer@xxxxxxxxxxxxxxxxx
> >   24. http://www.abilitiessoft.com/
> >   25. http://www.jjb-software.com/
> >   26. http://www.abilitiessoft.com/
> >   27. http://www.jjb-software.com/
> >   28. http://www.abilitiessoft.com/
> >   29. http://www.jjb-software.com/
>
> --
> John J. boyer; President, Chief Software Developer
> Abilitiessoft, Inc.
> http://www.abilitiessoft.com
> Madison, Wisconsin USA
> Developing software for people with disabilities
>
> For a description of the software and to download it go to
> http://www.jjb-software.com
>

Other related posts: