47

I would like to make my LaTeX documents as accessible as possible to those that are blind or visually impaired.

The posts that I have linked to below ask questions about alt-tags or tooltips, both of which would be great options. I would like to ask a question along a different tack.

The TUG website http://www.tug.org/tex4ht/ states that tex4ht can convert documents to Braille. I have searched for the commands to do so, but to no avail.

Does anyone know how to convert a LaTeX document (with mathematical content and graphs) to Braille? An OS-independent solution would be ideal.

Related posts:

5

5 Answers 5

18

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

5
  • This looks very promising, thank you :) I was able to re-create your results, but I was hoping for a file math-pok.something that would contain the Braille translation. Have I misunderstood?
    – cmhughes
    Oct 25, 2011 at 17:04
  • @cmhughes see my updated answer
    – michal.h21
    Oct 26, 2011 at 14:16
  • This looks very close to what I want. I have to confess that I don't know what to do with the .brf file. Should it be run through some software to produce dots?
    – cmhughes
    Nov 2, 2011 at 23:46
  • @cmhughes I addes some examples for printing contents of the brf file
    – michal.h21
    Nov 3, 2011 at 8:46
  • This looks great, thank you very much for your time :)
    – cmhughes
    Nov 3, 2011 at 14:45
20

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

5
  • 1
    I also found dotlessbraille.org/nemeth.htm. Is there a standardized way to typeset formulas in Braille? Then, unicode-math and that font would further improve the output.
    – Andy
    Oct 25, 2011 at 5:43
  • 5
    "Physicists tend to read ...". This is debatable. Whilst it is possible for someone used to LaTeX to read the LaTeX code of simple formulae, as it gets more complicated, fewer people will be able to do that. Moreover, if accessibility is to live up to its name, it should include support for visually impaired people who do not know LaTeX (for example, school students), and making them learn LaTeX to read a document is not accessible. Oct 25, 2011 at 6:52
  • I agree with you. If someone could point me to a white paper that explains mathematical typesetting for visually impaired people I could have a look at that. The upper link is rather old.
    – Andy
    Oct 25, 2011 at 7:17
  • I'm not an expert, just have a strong interest in this area. You could take a look at the archives of the blindmath mailing list (see comment on original question). There's also the site access2science.com that is trying to be a central repository of information. The person who set that up (John Gardner) is worth contacting. Oct 25, 2011 at 7:21
  • THANK YOU @Andy !!! I have a blind student, and eh mentioned that reading the LaTeX source helps a huge lot (his text-to-speech software works fine with my class notes, but formulas get confusing because, for example, eh cannot tell the difference between two consecutive formulas and a division typeset with \frac). I'll try to use your method.
    – Jay
    Mar 25, 2019 at 18:22
3

@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

2

For general text-to-text mapping, xelatex is available when a mapping file needs to be used. The mapping file is user-definable (and needs to be compiled with teckit_compile.exe).

example of mapping

Mappings can be any character(s) to any other character(s).

Code

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Noto Serif} 

\newfontface\fmapped[Mapping=latin-to-braille,Scale=2]{DejaVu Sans}

\begin{document}
\section{Mapping}
A many-to-many mapping can be done using xelatex and a text .map file compiled into a binary .tec file with \verb|teckit_compile.exe|. I define the mappings.

So, for example, when I type `zero' in the mapped font, I get {\fmapped{zero}}.

And `a' gives {\fmapped{a}}.

\end{document}

Mapping file

; TECkit mapping for TeX input conventions <-> Unicode characters

LHSName "latin-to-braille"
RHSName "UNICODE"

pass(Unicode)

; ligatures from Knuth's original CMR fonts
U+002D U+002D           <>  U+2013  ; -- -> en dash
U+002D U+002D U+002D    <>  U+2014  ; --- -> em dash

U+0027          <>  U+2019  ; ' -> right single quote
U+0027 U+0027   <>  U+201D  ; '' -> right double quote
U+0022           >  U+201D  ; " -> right double quote

U+0060          <>  U+2018  ; ` -> left single quote
U+0060 U+0060   <>  U+201C  ; `` -> left double quote

U+0021 U+0060   <>  U+00A1  ; !` -> inverted exclam
U+003F U+0060   <>  U+00BF  ; ?` -> inverted question

; additions supported in T1 encoding
U+002C U+002C   <>  U+201E  ; ,, -> DOUBLE LOW-9 QUOTATION MARK
U+003C U+003C   <>  U+00AB  ; << -> LEFT POINTING GUILLEMET
U+003E U+003E   <>  U+00BB  ; >> -> RIGHT POINTING GUILLEMET



U+0061    <>  U+281B U+281C U+281D  ;  a 

U+007A U+0065 U+0072 U+006F    <>  U+281A  ;  zero
0

Here or here one can find information about transforming Latex to Braille. The program is getting better since it was made. It is an effort made from the Mathematics Department of University of the Aegean in Greece, so that blind people can study math. It has already been used to make many documents accessible. It needs some programming skills. One can also find answers to frequently asked questions and a greek dictionary for math symbols in Braille. For more details you should contact the creator. It has successfully been tested for many and big tex documents and it is very fast.

1
  • 2
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 10, 2021 at 16:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .