TUGboat, Volume 40 (2019), No. 1 17

Nemeth math and LATEX source does not treat the six-dot cells as separate as braille character codes, but simply as the subset of the eight- dot patterns which happen to have both dot positions Susan Jolly in their fourth row unfilled. This omission requires Abstract the use of additional information to avoid an extra blank line when embossing a braille file encoded as This article, which is dedicated to the late T X ex- E Unicode Braille that is intended as standard six-dot pert Prof. Eitan Gurari [13], introduces braille math braille and the use of a custom simulated braille font for sighted persons unfamiliar with braille. Braille to avoid misalignment when typesetting Unicode systems represent print in one of two ways: either by Braille intended as six-dot braille. transcription or by transliteration. Most braille sys- tems, including the Nemeth system for mathematics, 2 Transliteration and computer braille employ shorthand, markup, meaningful whitespace, context-sensitive semantics, and other strategies to Conversion of print to braille is usually done with transcribe general printed material to a six-dot braille braille systems using transcription, in order to accom- format that accommodates the special requirements modate the special requirements of tactile reading, in- of tactile reading. Transliteration, by contrast, is cluding those described later in this article. This sec- limited by the small number of braille cells and is tion describes conversion done with transliteration. Transliteration is of limited practical use except typically only used for representing plain text ASCII for conversion of plain text ASCII files to braille. files such as LATEX source and computer code. This article argues that while reading and writ- Since there are 94 ASCII keyboard characters (ex- cluding ) and only 63 six-dot braille cells, one- ing mathematics as LATEX source transliterated to braille is possible for facile braille readers who have for-one transliteration of plain text files isn’t possible eight-dot refreshable braille displays and are able to with six-dot braille. Six-dot transliteration of plain text files thus requires some sort of braille system learn LATEX, it is not an appropriate general solution for making mathematics accessible to braille users. that uses both single-cell and two-cell (prefix-root) symbols. One-for-one transliteration of plain text is Tactile reading of transliterated LATEX source is no of course possible with the use of eight-dot braille. different from visual reading of LATEX source. On the other hand, tactile reading of math transcribed using General eight-dot braille systems aren’t widely the Nemeth system is the tactile analog to visual used since tactile recognition of all 255 eight-dot reading of rendered math. Simulated braille is used cells isn’t feasible for the majority of tactile readers. to illustrate this for the benefit of sighted readers. Nonetheless, many refreshable braille displays have eight-dot cells and incorporate built-in support for an ad hoc one-for-one eight-dot transliteration of the 1 Braille cells ASCII characters. This transliteration is known as Most sighted persons reading this article are proba- computer braille because of its usefulness for repre- bly at least somewhat familiar with the punctiform senting computer code. appearance of braille and are aware that the dots Computer braille adds 31 cells with a dot in the need to be physically raised for tactile reading as left columns of their fourth rows to the 63 standard opposed to visual reading. The individual braille six-dot cells. Twenty-six of these additional cells characters, which are usually referred to as braille simply represent capital letters by adding the extra cells, are officially designated as Unicode Braille Pat- dot to the six-dot pattern for the corresponding small terns. Technically speaking, the braille cells aren’t letter. Several options for the remaining five are in characters per se but rather symbols assigned mean- use. Because computer braille is a limited extension ings by a braille system. There are currently more to six-dot braille it, in contrast to general eight-dot than 150 different braille systems. The majority braille, is feasible for tactile reading. represent natural languages but there are several Since computer braille specifies a one-for-one systems for mathematics and for other specialized transliteration of all 94 ASCII keyboard characters it material, including music and chess. thus provides a method for braille users to directly There are two forms of braille: six-dot and eight- read and write any ASCII-based plain text including dot. The standard six-dot patterns are comprised of classic LATEX source. The advantage is that computer three rows of two dot positions each and the eight- braille transliteration doesn’t require special software dot ones are comprised of four such rows. There to translate from print to braille or to back-translate are thus 63 different six-dot with at from braille to print. The disadvantage is that LATEX least one dot and 255 eight-dot ones. Unfortunately source and many other plain text source files are

Nemeth braille math and LATEX source as braille 18 TUGboat, Volume 40 (2019), No. 1

primarily intended to be rendered for visual reading, The next several sections of this article provide not to be read directly. background for understanding the pros and cons for braille users of using computer braille to read and 3 math write mathematics as transliterated LATEX source, The well-known six-dot Nemeth braille system, “The versus using Nemeth braille for that purpose. Nemeth Braille Code for Mathematics and Science Notation”, is an outstanding example of a braille system. It was developed by Dr. Abraham Nemeth 4 Tactile reading (1918–2013), a congenitally blind American math- This section describes some of the aspects of tactile ematician who became a facile braille reader as a reading that are taken into account when develop- young child and was a math professor at Wayne ing braille systems such as Nemeth braille. Note State University for some 30 years. It had been in that braille systems are linear because tactile readers use for a number of years prior to the adoption and can’t easily sense the relative vertical positions of publication of the current official version in 1972. A the braille cells. PDF facsimile of the 1972 book is now available for The rate of tactile reading, rather like the rate download [1]. This book incorporates a thoughtful of typing on a standard keyboard, depends more on guide to numerous issues for converting print math the number of braille cells than on the number of to braille so as to retain all the essential information words. Braille systems that have been designed to while avoiding extraneous print-specific details. minimize the number of braille cells can thus be read Nemeth braille was designed with a thorough more efficiently. understanding of both mathematics and the require- The rate of tactile reading is also affected by ments for efficient tactile reading as outlined in the particular dot patterns. For example the seven six- next section. Nemeth is a complete system for rep- dot braille cells that only have dots in their right resenting text and mathematics and includes for- column are easier to recognize when used as markup matting specifications. Since it was designed long or indicators affecting a subsequent braille cell or before the use of digital media, it was originally in- cells and are typically used for this purpose. The tended for embossed braille transcriptions of math cell with a single dot at the bottom of its right- textbooks and other STEM material as well as for hand column indicates that the following letter is direct entry of math by braille users. The Nemeth capitalized. Nemeth braille uses several others of system for mathematics has stood the test of time these seven indicators to identify transliterations of and is used not only in the United States but in Greek and other non-English . numerous other countries, including India [12]. It is Certain braille cells or sequences can be hard to used with refreshable braille displays and, like LATEX, distinguish from other possibilities. Distinguishing its “math mode” is used for representing individual a lower braille cell, one which has filled dots only math expressions. There is also an equivalent form in its lower two rows, from the corresponding upper for spoken math called MathSpeak. MathSpeak is a cell, which has the same dot pattern in its upper two unique method of speaking math since it is the only rows, is an example. Nemeth uses the lower cells for method of speaking math that supports dictation of the decimal digits but ensures that they are easily math so it can be written correctly in either print or distinguished from the corresponding upper cells by Nemeth braille [5]. requiring a preceding dot locator indicator, a cell Although Nemeth braille is a complete system, with dots in all three rows, before a digit that would the United States, along with other English-speaking otherwise be at the start of a line or preceded by a countries, recently adopted the somewhat controver- space. sial Unified (UEB) system [6]. In the Braille systems can be easier to remember and U.S. it replaces both Nemeth braille and the prior recognize when they use tactile mnemonics related to system for English braille. The UEB math specifica- the specific patterns of the braille cells. For example, tion is awkward for a number of reasons, one being the cell with dots in the upper two positions on its the use of the same braille cells for the decimal digits right is the superscript indicator and the one with and for the letters a–j. The negative reaction to UEB dots in the lower two positions on its right is the math in the United States is significant enough that subscript indicator. Another type of tactile mnemon- many U.S. states allow for Nemeth math, tagged with ics in Nemeth braille uses related dot patterns for switch indicators, to be used for transcribing math related mathematical symbols. Examples are pairs content together with UEB used only for non-math of mirror-image braille symbols used for parentheses text [2, lesson 3.8]. and for the less-than and greater-than symbols.

Susan Jolly TUGboat, Volume 40 (2019), No. 1 19

Finally, Nemeth uses braille-specific constructs 5.1 Simulated display of Nemeth braille to reduce the memory load for tactile comprehen- The simulated braille for this expression is displayed A sion of complex expressions. Nemeth, like LTEX below in five segments to make the descriptions easier (or MathML), naturally represents planar layouts, to follow. Note that the standard six-dot simulated including fractions, in a linear manner. However, braille font used here has shadow dots in the unfilled when an expression, such as a fraction with another positions. Shadow dots are intended to make visual fraction in its numerator, requires nested layout in- reading easier although one may need to take care dicators of the same type, Nemeth adds an explicit not to let the shadow dots obscure the dot patterns indication of the nesting by prefacing outer layout of the corresponding tactile braille cells. indicators with additional markup to represent the order or level of nesting. (This is similar to the use- 5.1.1 First segment fulness to visual readers of highlighting matching Now let’s try to see how the Nemeth braille for ex = pairs of nested parentheses using different colors for from the equation above would be experienced by each pair.) tactile readers. It looks like this: In summary, braille systems like Nemeth braille are carefully designed to accommodate the special e^x .k requirements of tactile reading. This is in contrast to computer braille transliterations of plain text files The first and third cells are the standard cells originally designed for other purposes. for the lower case letters e and x so are nothing new for a braille reader. The second cell, described 5 Simulated braille example of Nemeth previously, indicates that the following expression math is a superscript. This superscripted expression is This section uses simulated braille to display the terminated by default by the space always required Nemeth braille translation of the well-known equa- before comparison symbols. The two-cell symbol for tion, an equals sign purposely resembles a print equals Z x ∞ n sign, as Dr. Nemeth believed that such similarities x X λ e = dλ helped communication between braille readers and −∞ n! n=0 their sighted peers and teachers. This equation, chosen in part because it em- ploys three different planar layouts, illustrates how 5.1.2 Second segment Nemeth’s elegant use of tactile mnemonics and other The second segment represents R x : tactile considerations enhances the tactile readability −∞ and information content of the braille math. $;-,=^x" First, here’s a transliteration from Nemeth braille to standard ASCII Braille used for six-dot braille: The first cell in this segment, which somewhat e^x .k $;-,=^x"".,s

Nemeth braille math and LATEX source as braille 20 TUGboat, Volume 40 (2019), No. 1

5.1.3 Third segment as the fraction end indicator. The cell with two The third segment is a symbol decorated with, as dots that resembles a print forward slash separates ∞ the numerator from the denominator. The third P termed in braille, an underscript and overscript, : cell is the letter l; you shouldn’t have too much n=0 trouble reading the numerator since the other four cells have already been encountered. The letter n in the denominator is followed by the one-cell Nemeth ".,s

5.1.4 Fourth segment 6 Conclusion and future work The fourth segment of the formula above is the frac- Here is some good news: two hardware issues for real- λn time access to braille have recently been addressed. tion n! , which uses the Nemeth simple fraction lay- out indicators: First, new hardware designs have resulted in signif- icantly cheaper single-line braille displays such as ?.l^n"/n&# the six-dot BrailleMe [11]. Second, and of special importance for braille math, is the newly available The first cell in this segment, which resembles six-dot Canute braille display which is not only low an upside-down print L, is a strong tactile shape in cost but also the first multi-line refreshable braille used as the fraction start indicator. The last cell, display [3]. which is used as a dot locator in other contexts, An urgent need for future work is accurate and is another strong tactile shape that is here used free automated backtranslation from braille math to

Susan Jolly TUGboat, Volume 40 (2019), No. 1 21

print math. Currently available applications, most of References which are not free, are problematic and students typ- [1] AAWB-AEVH-NBA, Advisory Council ically require their often unavailable itinerant braille to the Braille Authority, Louisville, KY. teachers to interpret their braille work for their class- The Nemeth Braille Code for Mathematics room teachers. Addressing this issue is a current and Science Notation. 1972 Revision, 1987. goal of the Euromath project [4]. High school and www.brailleauthority.org/mathscience/ college students sometimes resort to learning to read nemeth1972.pdf and write LAT X math as a result of poor support for E [2] American Printing House for the Blind, braille math. In my opinion their time as students Inc., 1839 Frankfort Avenue, Louisville, KY. would be much better spent on improving their math- Nemeth Tutorial, 2015. nemeth.aphtech.org ematical ability. In any case, LATEX source is not an especially convenient basis for manipulating math. [3] Bristol CIC. Electronic A possible starting point for providing auto- Braille: reimagined, 2018. mated backtranslation is the beta version of my free bristolbraille.co.uk and open source BackNem 3.0 app for accurate back- [4] EuroMath Education Platform. EuroMath translation of Nemeth math to MathML, as demon- project, 2017. www.euromath.eu/wp-content/ strated by several samples [9]. This app, which is uploads/2018/12/EuroMath_Presentation. based on the ANTLR 4 parser generator, is to my pdf knowledge the first use of parsing technology for [5] gh, LLC. 2004 MathSpeak initiative, 2004. backtranslation of braille to print [7]. One valuable www.gh-mathspeak.com feature of ANTLR 4, which is especially important [6] C. Gray. Call to action: Prevent educational in educational contexts, is that its parsers can recog- harm to Braille readers, 2014. nize input errors, provide optional developer-supplied all4braille.org/C1002.htm error messages and, unlike other parsers, continue [7] S. Jolly. Using ANTLR 4 for braille processing despite encountering input errors. translation, 2011. Future work needed to support the claims in this github.com/SusanJ/BasicUEB/wiki article includes development of a software system [8] S. Jolly. Positive impacts of EPUB 3: MathML for real-time conversion of LAT X source to six-dot E and Braille mathematics, 2012. braille mathematics designed for integration with www.dotlessbraille.org/mathmlandbraille. screen readers and other applications. The difficulties htm of direct conversion of LATEX to other formats is well-known. A two-step process that first converts [9] S. Jolly. Samples of BackNem 3.0 output, 2018. github.com/SusanJ/Baknem/wiki/Samples LATEX to MathML with one of the currently available applications and then converts MathML to braille [10] S. Jolly. Translation of MathML to Nemeth math is a more viable approach. This second step is Braille, 2018. github.com/SusanJ/MML2Nem straightforward for Nemeth math due to similarities [11] National Braille Press. Braille Me, n. d. between it and MathML, and a beta version of my www.nbp.org/ic/nbp/BRAILLE-ME.html MML2Nem app is available for consideration of a new [12] Overbrook School for the Blind; International approach [8,10]. The need for real-time translation Council for Education of People with Visual is especially critical for education due to the recent Impairment; The Nippon Foundation. dramatic increase in the use of electronic information Mathematics Made Easy for Children with in this context. Visual Impairment, 2005. www.hadley.edu/ Finally, I should point out that I’m not in a Resources_list/Mathematics_Made_Easy_ position to develop the needed software nor to pro- for_Children_with_Visual_Impairment. vide the infrastructure necessary to test, distribute, pdf or maintain software. I am however very glad to [13] D. Walden. Profile of Eitan Gurari volunteer to help other developers of open source (1947–2009). TUGboat 30(2):159–162, 2009. braille software as well as to answer questions about tug.org/TUGboat/tb30-2/tb95gurari.pdf braille mathematics.  Susan Jolly 120 Dos Brazos Los Alamos, NM 87544, USA easjolly (at) ix dot netcom dot com

Nemeth braille math and LATEX source as braille