[BRLTTY] BRLTTY and the latex-access project by means of python brlapi module

Daniel Dalton d.dalton at iinet.net.au
Sun Nov 27 01:22:31 EST 2011


Hi, 

I'm working on a project called latex-access:
http://latex-access.sourceforge.net

The aim of the project is to provide a nemeth translation of latex
source code into nemeth Braille in real time for mathematical and
scientific documents written in latex. It also has a speech module which
converts the latex syntax to English speech for instance \frac{3}{2} = 3
halves, and 3/2 in nemeth translation. 

The project was written for jaws, but I've expanded it for emacs under
linux. Currently it works by putting the Braille translation in a
separate emacs window next to the source buffer. 

However, the point of this email is to discuss the potential of
using BRLTTY directly to show the translation. 

I've got a few ideas, but am quite vaigue. Firstly emacs can call a
function to update the display every time the point moves, this is fine,
but now I have some problems:
1) I can write text to the display with the brlapi.writeText ()
function, but if this text exceeds the length of the display how can I
enable panning? 
2) I know how to read keys pushed on the display. However, what is the
best way to retrieve say the previous line if the prior line key is
pressed? How can I work out where the beginning of the Braille window is
so that my translation begins from the beginning of the Braille window
to the end of the line. 
3) From my research it looks like I'm going to have to redefine every
brltty key binding? Is this true? Basically I intend on having the
process as follows:
* Get the latex from beginning of braille window to end of current line 
* pass this to the nemeth function 
* Displayed the returned math on the display

I obviously need bindings to move the window around the screen, and each
time repeat this process to display the mathematics. So does this mean
I'll need to remap all the important keys on the display for my
application? 
4) When the user switches emacs buffers, or say opens a new screen
terminal, I need to know when to leaveTtyMode. How could I detect when I
need to leave tty mode? Will I need to create a daemon and somehow check
the user's whereabouts? Or is it just best to leave it up to the user to
turn off this functionality with perhaps a hotkey on the display,
because when they re-enter the window the emacs functions could
re-enable the braille application if that makes sense, or is there an
easy way to make this automated? 

So in summary since my email is probably rather ambiguous my main
questions: 
- How to move the display around the screen ie.e retreive the prior
line, and keep track of where the display is? 
- How to figure out where the beginning of the Braille window is
actually sitting?
- I presume I will need to make my own key bindings?

Thanks very much for any help,

Dan


More information about the BRLTTY mailing list