[liblouis-liblouisxml] LibLouisUTDML and tables

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 26 Mar 2014 11:23:49 +0000

Hello,
The last couple of commits I made relate to tables with varying number of entries per row.

This was mainly in response to the illegal characters problem Brandon had in BrailleBlaster, which was caused by a mtable element with mtr elements with differing numbers of mtd elements inside them.

According to the MathML 2.0 standard, it appears that should an mtr be short of the correct number of entries on a row then it should pad it with empty mtd elements.

My fix does not quite do actual padding with empty mtd elements, but rather it accepts that the row has been finished and so will start a new row. I can put in padding to show the additional empty entries if desired.

This fix though could potentially apply to other table structures in a document. My reason for taking this route was to try and prevent having format specific code inside liblouisutdml (try and keep the format details in semantic action files), so this seemed the lesser of two evils.

Whilst this does not deal with rowspan and columnspan attributes, it does mean though that in these cases liblouisutdml will at least produce something sensible as output as it will understand there being less than the expected number of entries in a row.

Another possible concern I have is that if the first row of a mtable element does not have the full set of mtd elements (IE. less than other rows) this might upset liblouisutdml. I will look at creating a fix to this potential issue unless someone comes back and says that it would not be valid MathML anyway.

Michael Whapples
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts: