You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently looking at different options to generate nice PDF documents. I like the approach of PyLaTeX and I wondered if one can use PyLaTeX to compile an existing TeX document.
I could also do something like this:
import os
os.system("pdflatex thedoc.tex")
But then I might need to deal with intermediate files (log / aux / ...) and having to re-run (e.g. for bibtex / indices / references).
Is it possible to compile an existing TeX document via PyLaTeX? Where are limitations?
The text was updated successfully, but these errors were encountered:
PyLaTeX itself uses Latexmk for compiling (see https://mg.readthedocs.io/latexmk.html). This is a build tool that automatically performs reruns if needed, runs bibtex etc., and can clean up temporary files afterwards. You can use Latexmk with the relevant options via os.system("latexmk thedoc.tex"). Of course you can also bypass Python and run Latexmk directly from any programming language/toolchain/shell script that fits the use case.
I am currently looking at different options to generate nice PDF documents. I like the approach of PyLaTeX and I wondered if one can use PyLaTeX to compile an existing TeX document.
I could also do something like this:
But then I might need to deal with intermediate files (log / aux / ...) and having to re-run (e.g. for bibtex / indices / references).
Is it possible to compile an existing TeX document via PyLaTeX? Where are limitations?
The text was updated successfully, but these errors were encountered: