[liblouis-liblouisxml] Re: UTDML and tables

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx, liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Mon, 10 Mar 2014 12:52:29 +0000

I have realised I forgot to attach the files. Hopefully got it this time.

Michael Whapples
On 10/03/2014 10:18, Michael Whapples wrote:
Hello,
I am thinking do we need to spend time on defining exactly how UTDML should handle certain types of structure?

Currently liblouisutdml produces UTDML which does not seem to make sense for a table. Look at the attachments (the table_test.xht is XHTML produced by Word and Mathtype's "Publish to math page" feature, data in table purely fictional).

The problem in the output is that the newline nodes appears to place all cells one above each other, despite there being three columns (the UTDML output is a single column).

I have been discussing with John Gardner about table handling, it appears that it would be desirable to have brl nodes inside the table, rather than a single preformatted block.

One reason is that it will help with synchronised ink and Braille. This I guess is mostly useful to ViewPlus although may be relevant for synchronised editor views as well.

The other reason I agree that a table should not have a single preformatted block of Braille is to help with make the UTDML less page size specific. If one can determine the content of each cell, then one can make efforts to layout the cells according to the page size one is using. This might need a way of line wrapping Braille text.

I can understand the reasoning for the newline xy attribute in the various table cells in my example (it is to get the indenting of paragraphs), however as I understand it these are coordinates relative to the page. May be these should be relative to their container. This would be quite a conceptual change to UTDML and will break things with existing software.

So my questions are:
* What do we want to do to correct tables in the short term? There will be other structures as well we need to deal with. * When do we want to do a major review of UTDML and alter software to use a new version of UTDML?

Michael Whapples

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" 
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd"; [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML";>
]>
<html xmlns:v="urn:schemas-microsoft-com:vml" 
xmlns:o="urn:schemas-microsoft-com:office:office" 
xmlns:w="urn:schemas-microsoft-com:office:word" 
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" 
xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:m="http://www.w3.org/1998/Math/MathML"; semantics="style,document"><head 
semantics="action,no"><meta http-equiv="X-UA-Compatible" 
content="requiresActiveX=true" semantics="action,no"/><!-- saved from 
url=(0014)about:internet --><!-- MSIE Mark of the Web --><meta 
http-equiv="Content-Type" content="text/html; charset=utf-8" 
semantics="action,no"/><meta name="keywords" content="MathPageGen" 
semantics="action,no"/><meta name="Generator" content="MathPage 1.0.1" 
semantics="action,no"/><meta name="Originator" content="Microsoft Word 15" 
semantics="action,no"/><title semantics="style,heading1">Table test<brl 
index="0 0 1 2 5 6 7 8"><newpage brlnumber="1"/><newline xy="80,10"/>⠠⠞⠁â 
¼â €â žâ ‘â Œ<newline xy="20,18"/></brl></title><link rel="dataStoreItem" 
href="table_test_files/item0001.xml" target="table_test_files/props002.xml" 
semantics="action,htmllink"/><link rel="themeData" 
href="table_test_files/themedata.thmx" semantics="action,htmllink"/><link 
rel="colorSchemeMapping" href="table_test_files/colorschememapping.xml" 
semantics="action,htmllink"/><style semantics="action,skip"><!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;
        }
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:0cm;
        margin-right:0cm;
        margin-bottom:8.0pt;
        margin-left:0cm;
        line-height:107%;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        }
.MsoChpDefault
        {font-family:"Calibri","sans-serif";
        }
.MsoPapDefault
        {margin-bottom:8.0pt;
        line-height:107%;}
@page WordSection1
        {size:595.3pt 841.9pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;
        }
div.WordSection1
        {page:WordSection1;}
--></style><style semantics="action,skip">
annotation { display:none }
</style></head><body lang="EN-GB" semantics="action,no"><div 
class="WordSection1" semantics="action,no"><p class="MsoNormal" 
semantics="style,para">Here is a table to test out liblouisutdml<brl index="0 0 
0 4 5 6 7 8 9 10 11 12 15 16 19 20 21 23 24 27 28 29 30 31 32 34 35 36 37 38 39 
40"><newline xy="30,26"/>⠠⠐⠓⠀⠊⠎⠀⠁⠀⠞⠁⠼⠀⠖⠞⠑⠌â 
€â ³â €<newline xy="20,34"/>⠇⠊⠃⠇⠳⠊⠎⠥⠞⠙⠍⠇</brl></p><p 
class="MsoNormal" semantics="style,para">&nbsp;</p><table class="MsoTableGrid" 
border="1" cellspacing="0" cellpadding="0" 
style="border-collapse:collapse;border:none" semantics="style,table"><tr 
semantics="action,no"><td width="200" valign="top" 
style="width:150.25pt;border:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">Braille code<brl index="0 0 0 0 7 8 9 10 11"><newline 
xy="30,42"/>⠠⠃⠗⠇⠀⠉⠕⠙⠑</brl></p></td><td width="200" 
valign="top" style="width:150.25pt;border:solid windowtext 1.0pt;   
border-left:none;padding:0cm 5.4pt 0cm 5.4pt" semantics="action,no"><p 
class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   
normal" semantics="style,para">Table<brl index="0 0 1 2"><newline xy="30,50"/>â 
 â žâ â ¼</brl></p></td><td width="200" valign="top" 
style="width:150.3pt;border:solid windowtext 1.0pt;   
border-left:none;padding:0cm 5.4pt 0cm 5.4pt" semantics="action,no"><p 
class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   
normal" semantics="style,para">From version<brl index="0 0 4 5 6 8 8"><newline 
xy="30,58"/>⠠⠋⠀⠧⠻⠨⠝</brl></p></td></tr><tr 
semantics="action,no"><td width="200" valign="top" 
style="width:150.25pt;border:solid windowtext 1.0pt;   
border-top:none;padding:0cm 5.4pt 0cm 5.4pt" semantics="action,no"><p 
class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   
normal" semantics="style,para">British Braille<brl index="0 0 1 2 3 4 5 7 8 8 8 
8"><newline xy="30,66"/>⠠⠃⠗⠊⠞⠊⠩⠀⠠⠃⠗⠇</brl></p></td><td 
width="200" valign="top" style="width:150.25pt;border-top:none;border-left:   
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;  
 padding:0cm 5.4pt 0cm 5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">En-gb-g2.ctb<brl index="0 0 1 2 3 4 5 6 6 7 7 8 9 10 
11"><newline xy="30,74"/>⠠⠑⠝⠤⠛⠃⠤⠰⠛⠼⠃⠨⠉⠞â 
ƒ</brl></p></td><td width="200" valign="top" 
style="width:150.3pt;border-top:none;border-left:   none;border-bottom:solid 
windowtext 1.0pt;border-right:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">1.0<brl index="0 0 1 2"><newline xy="30,82"/>⠼⠁⠨â 
š</brl></p></td></tr><tr semantics="action,no"><td width="200" valign="top" 
style="width:150.25pt;border:solid windowtext 1.0pt;   
border-top:none;padding:0cm 5.4pt 0cm 5.4pt" semantics="action,no"><p 
class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   
normal" semantics="style,para">US Braille<brl index="0 0 0 2 3 3 3 3"><newline 
xy="30,90"/>⠠⠠⠥⠀⠠⠃⠗⠇</brl></p></td><td width="200" valign="top" 
style="width:150.25pt;border-top:none;border-left:   none;border-bottom:solid 
windowtext 1.0pt;border-right:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">En-us-g2.ctb<brl index="0 0 1 2 3 5 6 6 7 7 8 9 10 
11"><newline xy="30,98"/>⠠⠑⠝⠤⠥⠤⠰⠛⠼⠃⠨⠉⠞â 
ƒ</brl></p></td><td width="200" valign="top" 
style="width:150.3pt;border-top:none;border-left:   none;border-bottom:solid 
windowtext 1.0pt;border-right:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">1.0<brl index="0 0 1 2"><newline xy="30,106"/>⠼⠁⠨â 
š</brl></p></td></tr><tr semantics="action,no"><td width="200" valign="top" 
style="width:150.25pt;border:solid windowtext 1.0pt;   
border-top:none;padding:0cm 5.4pt 0cm 5.4pt" semantics="action,no"><p 
class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   
normal" semantics="style,para">UEB<brl index="0 0 0 1 2"><newline 
xy="30,114"/>⠠⠠⠥⠑⠃</brl></p></td><td width="200" valign="top" 
style="width:150.25pt;border-top:none;border-left:   none;border-bottom:solid 
windowtext 1.0pt;border-right:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">Eub-g2.ctb<brl index="0 0 1 2 3 4 4 5 5 6 7 8 
9"><newline xy="30,122"/>⠠⠑⠥⠃⠤⠰⠛⠼⠃⠨⠉⠞â 
ƒ</brl></p></td><td width="200" valign="top" 
style="width:150.3pt;border-top:none;border-left:   none;border-bottom:solid 
windowtext 1.0pt;border-right:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">2.3<brl index="0 0 1 2"><newline xy="30,130"/>⠼⠃⠨â 
‰</brl></p></td></tr><tr semantics="action,no"><td width="200" valign="top" 
style="width:150.25pt;border:solid windowtext 1.0pt;   
border-top:none;padding:0cm 5.4pt 0cm 5.4pt" semantics="action,no"><p 
class="MsoNormal" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   
normal" semantics="style,para">German<brl index="0 0 1 3 4 5"><newline 
xy="30,138"/>⠠⠛⠻⠍⠁⠝</brl></p></td><td width="200" valign="top" 
style="width:150.25pt;border-top:none;border-left:   none;border-bottom:solid 
windowtext 1.0pt;border-right:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">De-de-g2.ctb<brl index="0 0 1 2 3 4 5 6 6 7 7 8 9 10 
11"><newline xy="30,146"/>⠠⠙⠑⠤⠙⠑⠤⠰⠛⠼⠃⠨⠉⠞â 
ƒ</brl></p></td><td width="200" valign="top" 
style="width:150.3pt;border-top:none;border-left:   none;border-bottom:solid 
windowtext 1.0pt;border-right:solid windowtext 1.0pt;   padding:0cm 5.4pt 0cm 
5.4pt" semantics="action,no"><p class="MsoNormal" 
style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:   normal" 
semantics="style,para">1.1<brl index="0 0 1 2"><newline xy="30,154"/>⠼⠁⠨â 
</brl></p></td></tr></table><p class="MsoNormal" 
semantics="style,para">&nbsp;</p><p class="MsoNormal" 
semantics="style,para">This is it.<brl index="0 0 4 5 6 7 8 10"><newline 
xy="30,170"/>⠠⠹⠀⠊⠎⠀⠭⠲</brl></p></div></body><brl><newline 
xy="155,202"/><span class="brlonly">   1<brl>⠀⠀⠀⠼â 
</brl></span><newpage brlnumber="2"/></brl></html>

Attachment: table_test.xht
Description: application/xhtml

Other related posts: