[BlindMath] Current strategies regarding accessible mathematics
Brian Dunn
bd at bdtechconcepts.com
Mon Mar 14 06:23:12 UTC 2022
On Sun, 13 Mar 2022 19:51:27 +0000
Jonathan Godfrey via BlindMath <blindmath at nfbnet.org> wrote:
> There are a variety of tools to take LaTeX source and create
> HTML. I've had good use from TeX4HT but others can point you to other
> solutions.
The following are still being developed, and making progress in ease of use
and the support of more and more LaTeX packages:
TeX4ht: LaTeX to HTML or EPUB with MathML or MathJax. I think there is also
some support for creating word processor files. Around 450 packages and
classes have programmed support, and probably supports a large number of
other packages as-is.
https://ctan.org/pkg/make4ht
Lwarp: LaTeX to HTML with MathJax or SVG math images. Can be used with
Calibre to create EPUBs as well, but it isn't as automatic as TeX4ht would
be. Lwarp can also create a simplified HTML ready for copy/paste into a word
processor. Around 580 packages have programmed support, plus 10 or so
common classes and a decent number of world language classes. Has
additional MathJax emulation for 90 packages. Also supports a large number
of other packages as-is.
https://ctan.org/pkg/lwarp
LaTeXML: LaTeX to HTML with MathML or PNG math images. Around 40 classes
and 350 packages are supported.
https://math.nist.gov/~BMiller/LaTeXML/
In the above, "programmed support" means the document will compile with that
LaTeX package or class, and the conversion either ignores the package as
being irrelevant for HTML output, adapts it for HTML or MathJax or MathML, or
perhaps produces an image of how the piece of code compiles and displays the
result. But this output may not be optimized for a blind reader.
For many objects, such as a TiKz or chemistry image, the result will be an
image with an ALT text of some sort, which in many cases will only be an
almost useless generic name like "image". It is up to the author to provide a
meaningful ALT tag in this case.
For simple inline math, Lwarp and perhaps the others can produce an SVG image
with an ALT tag containing the LaTeX code for the math. For complicated
math, the LaTeX code can become unreasonable or impossible to include as an
ALT tag, and the user should provide an override description.
For other objects, such as a chemistry macro, Lwarp includes the source in
the ALT tag if possible, but it is not always possible. For example, a
plain text copy/paste of parts of a document using the chemmacros
package contains lines like:
\ox{.5,Br2} \ch{"\ox {1/3,I}" {}3+}
(-chemmacros-redoxreaction)
13C-NMR (100 MHz)
\state{G}
\newman(170){1,2,3,4,5,6}
\orbital[angle=135,scale=1.5]{p}
\chcpd{^{12}_{6}C}
(math image)
\pKa[3]
The above is what the text to speech reader would say. Someone who knows
chemistry and the macros for the package may understand much of this, while
the rest of it would have to be described by the author.
LaTeX has recently added support for ALT tags for images in PDF documents.
As authors start using these, they will automatically be included in the
HTML conversions as well. There is a lot of other additional work being done
for improving the accessibility of PDF documents. Hopefully much of this
work will also be useful for HTML conversions.
And if anyone tries the Lwarp package and has suggestions, let me know and
I'll try to improve it further. Likewise for TeX4ht or LaTeXML. Each of
those teams would probably like to hear from you.
Brian
More information about the BlindMath
mailing list