8

What options exist for doing something like this? I'm particularly interested in LaTeX that describes mathematics.

Stefan Kottwitz
  • 231,401

3 Answers3

5

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

anon
  • 231
4

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).

  • 2
    I'm pretty sure Charles meant that example as a joke (he in not the OP). – Caramdir Dec 07 '10 at 16:05
  • detex also 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
4

pandoc does a pretty good job as far as I am concerned. I convert markdown documents to latex and back again. I'm pretty sure it also supports plain text. Check it out.

chadgh
  • 163