[BRLTTY] Encorporating python scripts for LaTeX into brltty

Dave Mielke dave at mielke.cc
Mon Aug 14 00:56:52 EDT 2006


[quoted lines by Alastair Irving on 2006/08/09 at 20:28 +0100]

>As I work with a lot of documents in LaTeX, (a typesetting language
>widely used for maths and science), I have written a script in python
>which translates a line of a LaTeX file into nemeth maths braille.  I
>would like to get this working with brltty, so it can be used when
>editting documents.  My idea is that instead of being translated by the
>standard brltty translation tables, the current line can be passed to my
>scripts, and the returned translation can be output to the braille
>display.

The translation table mechanism assumes a one-to-one correspondance between
text and braille characters. What oculd be used, however, is the contraction
table mechanism. This even has the advantage that you can turn it on and off,
i.e. you can turn it off to view the LaTeX and then turn it on to view the
result. Here's a proposal:

If the selected contraction table is executable then brltty would invoke it
with both an input and an output pipe, write the uncontracted text to it, and
read the contracted braille from it. Both directions of transfer would have to
support binary data. When writing the uncontracted text, brltty would supply
the text itself, the maximum number of braille cells it can accept back (which
would ultimately be the width of the display), and the current cursor position.

What do you and others think? Any suggestions for a protocol?

-- 
Dave Mielke           | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: dave at mielke.cc | Canada  K2A 1H7   | if you're concerned about Hell.
http://FamilyRadio.com/                   | http://Mielke.cc/bible/


More information about the BRLTTY mailing list