pythontex icon indicating copy to clipboard operation
pythontex copied to clipboard

Pythontex and TikZ externalization

Open Nnomis opened this issue 3 years ago • 1 comments

Is it possible to externalize TikZ pictures ? I read on stack that it seems like the answer is no. I'm using pycode and pysub everywhere to write exercices. Can I hope a solution ? It would be so amazing. Currently the only things that really make my compilations slow down are the tikzpictures, and I'm kind of desperate about that... I'm using subfiles waiting for a better solution...

Nnomis avatar May 09 '21 08:05 Nnomis

PythonTeX is not currently compatible with TikZ externalization. It may be possible to add support for that at some point in the future, so I will leave this issue open for now.

Possible workaround: If you are generating the TikZ code using Python, you could save the TikZ code to its own separate file and then use Python's subprocess.run() to create a PDF from this.

gpoore avatar Jun 06 '21 15:06 gpoore