pythontex icon indicating copy to clipboard operation
pythontex copied to clipboard

depythontex loses standard output from pyconsole blocks

Open unpingco opened this issue 8 years ago • 3 comments

Hi,

I have many pyconsole blocks with standard output that is nicely incorporated into the text using the usual pythontex method. However, when I follow the instructions to use depythontex, none of the standard output from these blocks is present in the so-produced PDF, although all of the code in the pyconsole blocks is present.

Why is the standard out not appearing in the depythontex version? FYI, I am using an older 0.12 version of PythonTeX on an Ubuntu machine.

Any help appreciated.

unpingco avatar Jan 20 '16 18:01 unpingco

You may need to delete the pythontex-files-* directory. It looks like there is a bug that is preventing the console text from being properly generated if a document is compiled first with \usepackage{pythontex} and then with \usepackage[depythontex]{pythontex}. You might try a simple sample document first to see if it works.

\documentclass{article}
\usepackage[depythontex]{pythontex}
\begin{document}

Text
\begin{pyconsole}
a = 1
a
print(12**3)
\end{pyconsole}

\end{document}

Compile normally, then depythontex <document>.

gpoore avatar Jan 20 '16 19:01 gpoore

This works great!

Thanks for the quick response.

unpingco avatar Jan 20 '16 22:01 unpingco

I'm going to reopen this issue, since there is actually a bug, and I don't want to forget to fix it.

gpoore avatar Jan 21 '16 02:01 gpoore