[liblouis-liblouisxml] Preview of Next Releases

  • From: "John J. Boyer" <johnjboyer@xxxxxxxxxxxxx>
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 30 Jul 2008 11:58:18 -0500

This is a preview of the new features and enhancements in the next
releases of liblouis and liblouisxml. Most of these will not require you
to change the way you use xml2brl or the liblouis and liblouisxml
functions. The mode parameter for the liblouisxml functions other than
lbx_init was introduced in the previous release. In this one, it has
been given an additional function (See below).

You may need to change your configuration files to accommodate certain 
enhancements. More mathematics codes than Nemeth are now supported. 
Consequently, the old math.sem file has been renamed to nemeth.sem . The 
html.sem file no longer contains an include statement for math.sem . 
Instead you must specify "semanticFiles nemeth.sem,html.sem" on the xml 
section of your configuration file. The configuration files supplied 
with this release already have the necessary changes. Nemeth is still 
the default math code.

In future, enhancements like this will be anticipated when new features 
are introduced. This is part of software QA and will help to avoid 
surprises.

liblouisxml has two important new features. First, It will now work with 
files in plain html, rather than being confined to xhtml and other 
flavors of xml. This feature works with the function lbx_translateFile. 
The function first tries the xml parser. If this fails, it tries the html 
parser. When the xml parser fails it produces a lot of error messages. 
You can avoid this by specifying htmlDoc as the mode parameter if you 
know that the file is in fact plain html. If you wish to tell 
liblouisxml not to reinitialize itself, use noInit | htmlDoc .

If you use xml2brl you can specify that a document is html by using the 
-t option: h(t)ml .

The other important new feature is that you can now tell liblouisxml to
show links in a file in a way that enables you to use them. To do this
you specify "formatFor browser" in the outputFormat section of the
configuration file or use -CformatFor=browser on the command ine of
xml2brl. The resulting file can be viewed in a browser such as IE,
Firefox or lynx. The text, mathematics and computer code will be
translated appropriately with the line length you specify. Links will be
clickable and will take you to wherever they point. This feature grew
out of the work on an algebra book that had links to other sections
within each chapter. Future development may include a special braille
text browser that uses this feature.

Changes to liblouis have been minor. They consist of eliminating warning 
messages that were appearing in Microsoft compilers and defining a new 
escape sequence \e for the escape character \x001b . liblouisxml is 
using this character tr transmit formatting information from the xml 
interpreter through liblouis to the formatting functions.

This same escape sequence is also defined in liblouisxml for use in the 
third column of semantic-action files. One use of the escape character 
followed by another character is to denote the beginning and end of 
mathematical expressions. This enables an editing table to do such 
things as remove a baseline indicator at the end of such an expression 
and put a number sign at the beginning if it begins with a digit.

A new semantic action has been introduced. The "generic" semantic action 
causes text to be passed through to the translator and also inserts the 
characters in the third column appropriately. Most of the MathML tags, 
such as mn and mo could actually be replaced with generic. This action 
is not the same as "no". The latter causes any text to be passed to 
liblouis, but also inserts spaces.

New features under consideration include a way for liblouis to detect 
Roman numerals so they can be handled properly.

If you have features you would like to see, please psot a message on the 
list so they can be discussed.

Thanks,
John


-- 
My websites:
http://www.godtouches.org
http://www.jjb-software.com
Location: Madison, WI, USA

For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts: