[tex4ht] [bug #351] equation in alt attribute?
Michal Hoftich
michal.h21 at gmail.com
Tue Jan 17 00:55:14 CET 2017
Follow-up Comment #1, bug #351 (project tex4ht):
There are several `pic-[mathtype]` options, see [1]. pic-equation requests
images for equations, but it doesn't include TeX code in the alt attribute, it
seems that it is derived from the DVI code by the tex4ht command.
To get TeX in the alt attribute, we would need to fetch the whole math
content, and use it twice. One time to typeset it, the second time to save it
in the alt attribute, using token register or `\detokenize` command. It seems
that `pic-m+` option does that, but only for `$...$` and `$$...$$`. The
configurations for `\(...\)` and `\[...\]` are commented out in the literate
sources. And there is also "not safe!!" comment, so I guess that it has some
issues. But it works for me on some basic samples.
It seems that GladTeX processes the HTML page for LaTeX code, so it should
work if we leave the math unprocessed. There is a support for that in one
package from Helpers4ht bundle [2]. It uses verbatim to support environments
like equation or align.
Personally, I am more interested in Mathjax-node [3], because it can convert
MathML to the plain HTML+CSS, with correct rendering in both Firefox and
Webkit based browsers. Basically, it is rendered in the same way as if Mathjax
was used, but the loading is much faster, because no Javascript processing is
involved.
[1] http://cvr.cc/?p=504
[2]
https://github.com/michal-h21/helpers4ht/blob/master/mathjax-latex-4ht.sty
[3] https://github.com/mathjax/MathJax-node
_______________________________________________________
Reply to this item at:
<http://puszcza.gnu.org.ua/bugs/?351>
_______________________________________________
Message sent via/by Puszcza
http://puszcza.gnu.org.ua/
More information about the tex4ht
mailing list