[BRLTTY] Encorporating python scripts for LaTeX into brltty

Yannick PLASSIARD yan at mistigri.org
Wed Aug 16 05:37:24 EDT 2006


On Mon, Aug 14, 2006 at 12:56:52AM -0400, Dave Mielke wrote:
> [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?
>
	I think that it's a very good idea.
For the protocol however, I'm thinking about binary vs text input/outputs.
Text input/output may (I'm saying "may" not "is"), be better if translation programs are scripts that have "complicated" ways of handling bit fields and / or bits operations such shell-scrifts or Perl (for Perl, I didn't find it but it may exist somewhere, lost in CPAN modules...) :)

A little draft of proposal:
input (Brltty sends text to the program for a translation):
TRANSLATE text="What a beautiful world we're leaving in!" cells=32 cursor=0\r\n

Indeed we have a command "TRANSLATE" and then parametters which are self-explained. ;)
Then for the output (programs sends back to brltty the result):
TRANSLATE dots="234578|125|24|234|0|24|234|0"..... 
(I'll not write all the cells but it becomes easy to parse it and translate it into dots). 

For now I only immagine a TRANSLATE command, but we could expand this mechanism to allow a certain kind of scripting (I don't know exactly how, but....).

Here are my ideas, any feedback is welcomed. :)
--
Regards
	Yannick 
> -- 
> 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/
> _______________________________________________
> This message was sent via the BRLTTY mailing list.
> To post a message, send an e-mail to: BRLTTY at mielke.cc
> For general information, go to: http://mielke.cc/mailman/listinfo/brltty

-- 
Yannick PLASSIARD
yan at mistigri.org
+33 (0)622382501 
www.mistigri.org/~yan

Get my GPG signature with: 
gpg --keyserver www.keyserver.net --recv-key 5F2D71B8


More information about the BRLTTY mailing list