What options exist for doing something like this? I'm particularly interested in LaTeX that describes mathematics.
3 Answers
tex2mail might be an option; from the ctan catalogue:
Tex2mail is a perl script to convert TeX files into plain text files: various mathematical symbols (sums, products, integrals, sub/superscripts, fractions, square roots, ...) are replaced by “ascii art” that spreads over multiple lines if necessary. This is helpful for people who can’t read TeX fluently.
never used it
- 231
The only tool I'm aware of (there are probably more) that tries to remove LaTeX markup is the command line tool detex. No idea what it does with math, but I'm certain that it wouldn't transform $x^2y$ to $\exp(2\ln(x))y$. You could use Mathematica to do something like that for you, however (provided you were happy with CForm or whatever form you wanted the maths in).
- 73,872
-
2I'm pretty sure Charles meant that example as a joke (he in not the OP). – Caramdir Dec 07 '10 at 16:05
-
detexalso doesn't work all that well. See http://tex.stackexchange.com/questions/534/is-there-any-way-to-do-a-correct-word-count-of-a-latex-document/535#535 – Willie Wong Dec 07 '10 at 19:16
$\alpha^5\in{\mathbb R}^+$into the plain text `α⁵∈ℝ⁺. Of course, tuch formatting is not as general as TeX, but is useful. – Frédéric Grosshans Apr 01 '11 at 16:31