I use PythonTeX for a number of my articles, yet a number of journals request a single .tex file which they can compile with what I assume is just texlive and a bunch of packages.

The problem being that they don't have PythonTeX. The way I understand it, however, PythonTeX generates a bunch of PGF and PNG figures, which are then static unless it is re-run. I also see that PythonTeX does not re-run any Python code if I do just recompile the document without editing any of the code.

Is there any way to use the trace files generated by pdflatex and PythonTeX upon compilation to create a document which will compile without PythonTeX and simply based on the static figures I can distribute to them?

I have tried arlatex based on this question but it fails for the PythonTeX elements (be they figures or text).


PythonTeX comes with depythontex that, according to section 5 of the manual,

can convert a PythonTEX document into a plain LATEX document

You need to

  1. Turn on the package option depythontex
  2. Run the depythontex.py script
  3. Compile the depythontex file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.