LaTeX to Braille

The first thing to do is the convert the text to Braille. I am using LuaLaTeX (it should work with XeTeX as well). So I found Braille here and did a \setmainfont{Braille} after installing it as a system font. Leaves formulas and graphs.

Then, I came up with the following idea. Physicists tend to read mathematical formulas as the TeX-commands without the need to typeset. In particular, ASCII emails can still be used, even with extensive formulas. So the most straightforward way would be the verbatim environment for the formulas. The verbatim package is very handy since \renewenvironments combined with \start{verbatim} did not work for me without it. Verbatim is typeset in monospaced font, we need a \setmonofont{Braille} as well.

Leaves us with the graphs. I am not sure if this can be done with a pure LaTeX 'conversion'. If you use e.g. jpgs and \includegraphics there is not much LaTeX can do. It might be possible with pdfs to at least replace the axes label and such.

Here is my MWE, I cannot read Braille, I hope the font is good.

\documentclass{article}

\usepackage{fontspec}
\setmainfont{Braille}
\setmonofont{Braille}
\usepackage{lipsum}
\usepackage{verbatim}

\renewenvironment{equation}%
   {\endgraf\noindent FORMULA:%
    \endgraf\verbatim}%
   {\endverbatim}

\begin{document}
\lipsum[1]

\begin{equation}
y = m x +b
\end{equation}

\lipsum[2]

\end{document}

Test document


Maybe the statement on the tex4ht page refers to this Eitan Gurrari's project. Maybe the prototype they used to have is somewhere available, I don't know. Edit: There is some discussion right now.

But you can use plain tex4ht to produce xhtml with mathml, which some screen readers can read. There is some tutorial.

Another option is to produce braille text. You can use xml2brl to translate from xhtml to braille text.

math-pok.tex:

\documentclass{article}

\begin{document}
$(\overline{x+y})=\overline{x}\overline{y}$
\end{document}

compile:

mk4ht mzlatex math-pok.tex "html, mathplayer"
xml2brl math-pok.xht math-pok.brf

math-pok.brf:

("x+y<}) .k "x:"y:

There is also graphical frontend fot xml2brl, called dots, it can display braille output. The brf file can be used to print braille with embosser.

edit If you really want to view braille dots on screen or print them, there are two options. You can install some font with nemeth math support. Other option is using dots, if you select in main menu view -> braille, you can copy dots to your text editor and typeset them using fontspec and some font with support for unicode braille table.

\documentclass{article}
\usepackage{fontspec}
% this font is good for testing, for normall typesseting use
% for example ghUBraille.ttf 
% you can download both of them from http://www.gh-mathspeak.com/downloads.php
\setmainfont{gh_SimBraille_Nemeth_One.ttf}
\begin{document}
% contents of the brf file
("x+y<\}) .k "x:"y:

\fontspec[Script=Braille]{DejaVu Sans}
% and using unicode
⠷⠐⠭⠬⠽⠣⠾⠀⠨⠅⠀⠐⠭⠱⠐⠽⠱
\end{document}

enter image description here


@Andy There are different ways to type out braille equations, especially when both letters and numbers are involved. I am just realizing how complex it is because I am producing tikz graphics with braille labels for a student who is blind. I have to work with a braille specialist to figure out how to do the labels. A font does not translate it into braille well at all, and just keeping the commands would not really be adequate. You have to add certain characters before numbers to indicate that it is a number and not a letter because the first ten letters of the alphabet are the same braille character as the numbers 1,2,3...0. Unless it is a nemeth braille font, in which case the dot config is moved down one spot for the numbers. It is still convention to indicate numbers and letters using certain symbols, and other symbols indicate whether what follows is a greek letter, or capitalized, or subscripted, ... and on and on. It is especially important for labels, where a character hangs out all by itself, to establish where the top and bottom of the braille cell is so the reader can see if it is a letter or number. For the label ab(union sign)c, I would have to type ;ab@+c, but for aB(union sign)c I would have to type ;a,b@+c. So already by not doing any translation you would lose any indication of capitalization, which is important for latex encoding. Additionally the symbols used in latex coding could easily be misinterpreted as other things. A decimal before a letter indicates that the letter is a greek letter, for instance. I don't know enough to fully explain the issues and complications. I am not a braille expert. I only have enough experience to know that there will be quite a few. Here is a website that can give you a little background about nemeth braille math notation, http://braillebug.afb.org/nemeth_braille.asp