Hey all,
I don't know if this is still useful to folks in 2020, but I was looking
for a way to embed all the LaTeX maths I'm using on my Primer on Bezier
Curves (https://pomax.github.io/beziercurve) as code comments/fallback
and after trying the various "latex to plain text" tools I could find
(they're hard to come by, and it's a short list: asciitex, catdvi,
tex2mail, pandoc, tex4ht, and those last two were long shots), the thing
that got closest to at least usable was tex2mail, which turned out to be
not too crazy hard to massage just a tiny bit into working reasonably in
modern contexts where even the default monospace fonts have ridiculously
wide unicode support.
On that note: all credit to Ilya Zakharevich, I haven't worked with Perl
in 20+ years but the tex2mail code is organized well enough to allow
folks to pretty quickly jump in an update it.
So I did: I've updated it to suit at least my own needs and stuck it
online as tex2utf over on https://github.com/pomax/tex2utf in case
anyone else could use a utility that turns (a surprisingly large amount
of) (Xe)LaTeX maths into plain text form. And if anyone wants to help
further massage it, or come up with a github action that autosubmits
releases to CTAN, do let me know.
- Pomax