i want to generate a pdf output created from latex inside a python script. Since I'ma working under windows with python xy and that i cannot install latex, i would like to know if there is a way to produce a latex output using a package from pythonxy (like sphinx or docutils) Any suggestions welcomed
Asked
Active
Viewed 1,609 times
0
-
3why you can't install latex under windows? – Max Li Feb 07 '12 at 11:20
-
I think there is no sensible way to interpret TeX source without really being TeX, it is just a too strange language. There might be some PDF-generating libraries in Python, but anything interpreting LaTeX would be almost a full LaTeX distribution. – Paŭlo Ebermann Feb 09 '12 at 22:58
-
We need to know a little bit more about your needs. It looks like you get some LaTeX input describing a table and that you need to turn it into a PDF. Right? If the LaTeX code is not too much "LaTeXy", do you think you could parse it and convert it to another format which is easily converted to PDF? – Eric O. Lebigot Mar 23 '12 at 18:17
1 Answers
1
PlasTeX is a Python package that can interpret LaTeX files. Since it does not include a PDF renderer, the easiest way to render to PDF is probably via the DocBook renderer. I don't think there are any DocBook renderers for Python though.
A pure-python solution would be to write a plasTeX (or DocBook) frontend for RinohType (I'm the author of RinohType).

Brecht Machiels
- 3,181
- 3
- 25
- 38