Duxbury Braille Translator: Print Mathematics to Nemeth Code Braille

The following is the speech given by Joe Sullivan, President, Duxbury Systems, Inc.:

(Please note that the files the presenter refers to can be found by clicking the following link: Duxbury Files)

The Duxbury Braille Translator (DBT) has been used for translating print to Braille - and Braille to print - for nearly 30 years now, and many people who are involved with Braille are generally familiar with it. Consequently I will go over the way that it works fairly quickly, covering only the basics that are required to understand how it handles mathematics.

Launching DBT for Windows, we find ourselves with a typical "File Edit View ..." menu at the top and an otherwise blank screen'similar to most word processors, underscoring the fact that, even though DBT's main strength is as a Braille translator, it is also a word processor for both print and Braille. We select File, New, "Print" as the document type and "English (American) - Standard Literary Format" as the template to begin a new document. Then we type something simple, such as:

Hello there.

Next, to translate to Braille, we select File, Translate - or more simply, taking a hint from the shortcut key we find listed next to "Translate" on the File menu, we could just enter Ctrl-t. A new file containing the equivalent Braille, simulated by black dots, appears on the screen. If you are using a screen reader with refreshable Braille device, it can be read on that device as well. If you are familiar with Braille, you should notice that words such as "there" are contracted according to English Braille usage. You could proceed to output the Braille on an embosser, or print it in simulated form on a printer, or edit it as Braille if you wish - but for our purposes we need go no further once we have translated to Braille on screen.

That's basically what the translator does, but before we leave this simple "literary" scenario, we need to look a little into what's "behind" the Braille or text that we see on screen. To do this, we close the Braille file (Ctrl-F4), and the original print file reappears. Now we're going to apply a "style" to that print to say that it's a main heading. With the cursor still at the end of the line or anywhere in the text, enter F8 and press the letter h to jump down to "h1." in the list of available styles. Then press Enter to select that style. The text should immediately be centered, that being the defined rendering for the "h1." style. Now, to see "why" the text is centered, press Alt-F3. Those of you who used WordPerfect may remember that as the "reveal codes" key - it has the same meaning in DBT. The screen now shows the text not centered but surrounded by codes resembling XML element tags in that each code is delimited by angle brackets. It will look something like:

<h1.>Hello there.</h1.>

The codes are also shaded to further distinguish them from the text itself - even though the angle brackets, or square brackets for some other types of codes, also set them off. These codes are important because they control either the formatting, as in this case, or other aspects of the interpretation of the text, as we will see when we come to mathematics.

Incidentally, if we had created our file in the first place by importing from other formats, such as Microsoft Word or DAISY XML, rather than by entering the text directly into DBT, we would have found that appropriate DBT codes were created from information in the original file. This can save a lot of work.

Now, if we press Ctrl-t again to translate to Braille, we see that the corresponding Braille text is also centered. Pressing Alt-F3 again, we can see that the "h1." style has been carried over into the Braille in order to bring about the centering.

So far we've been using DBT itself to enter and edit the print, and that is certainly a viable way to work with ordinary "literary" material. For more complex kinds of math, however, DBT does not presently have a way to display print math in the customary form, and so we turn to another popular program, Scientific Notebook from MacKichan Software. With Scientific Notebook, it is easy to enter not only ordinary linear text but also mathematical structures such as superscripts, subscripts, fractions, radicals, summation signs and integrals - and at all times, the working display on screen looks just like what would appear in a printed math book. In itself, Scientific Notebook is a sighted person's tool and not, to my knowledge, accessible using standard screen readers - but we will hear later in this conference from Nancilu McClellan of Metroplex Voice Computing, whose MathTalk program addresses this need.

For our purposes I'll start with a very simple file already created in Scientific Notebook, quad.tex (See Duxbury Files). (Note: Scientific Notebook and DBT files can be viewed in the demo versions of those programs, downloadable from the web sites of MacKichan Software and Duxbury Systems, Inc. respectively.) As some of you know, a "tex" file is in a common math markup language known as LaTeX (usually pronounced LAY-tech or LAH-tech; the last three letters are actually tau, epsilon, and chi). Scientific Notebook is only one of many programs that can work with text files. In fact, tex files can be edited by most ASCII text editors, a fact put to good use by some blind mathematicians.

To convert this file to Braille, we can simply launch DBT, select File, Open (or just press Ctrl-o), select the file, and in the ensuing "import filter" dialogue box, choose any of the American templates and confirm that the file is a LaTeX file. The result is a print file like quad.dxp. In the normal view, that file is not very readable because we can't tell, for instance, where the numerator of a fraction ends and the denominator begins. But if we use Alt-F3 to reveal the codes, it becomes clear that there are codes that preserve the necessary mathematical information. We're not usually very interested in this "print" file, however, so we press Ctrl-t to translate to Braille; the result is a file like quad.dxb.

All the text and math in quad.dxb are correct, and would be easily readable by someone familiar with the American standard for representing mathematical material in Braille (the Nemeth Braille Code for Mathematics and Science Notation, 1972). However, there is a small formatting issue that we would would want to take care of if we wanted the Braille to be correct in every respect. The problem is that the sentence starting "For a cubic equation ..." is indented to cell 3, which in Braille implies that it begins a new paragraph, whereas our intention in the original document was simply to continue the paragraph already begun - we had only skipped a line in order to set off the equation above. This is easily corrected if we apply a style called "para.continue." to that text. This could be done in the Braille file, but usually it's best to do any required touch-ups in the print file first, then translate. So we apply that style in quad.dxp, producing a file like quada.dxp and when we translate to the Braille file quada.dxb the paragraph continues as it should, in cell 1.

Another potential problem, one that doesn't show up here because the equations are not longer than a Braille line, is that the equations are also treated as ordinary paragraphs and while that happens to result in correct placement (cell 3) for the first line of an equation, the placement of any subsequent lines would not be correct (cell 1 instead of cell 5). So, in quada.dxp, you may note that we have also created and applied a "mathdisplay." style to take care of this. These kinds of format adjustments are typically necessary after import if you need to observe Nemeth Code formatting rules strictly. In DBT it is possible, by the way, to save any styles that you make up in your own template, and then use that template when importing other files where similar styles may be needed.

(While we are concerned here only with Nemeth Code, a similar process can currently be used to produce mathematics according to three other Braille codes: British Braille, Unified English Braille, and French Braille; others are being considered for future development.)

The foregoing is a very simple example, made up to illustrate the process. I'll close by presenting an excerpt from a real source, a contemporary book on the Riemann Hypothesis for the general mathematical reader called "Prime Obsession," by John Derbyshire. See file pr137a.tex for the original Scientific Notebook file, and pr137a.dxp and pr137a.dxb for the DBT files resulting from the process just described.