pythontex
pythontex copied to clipboard
Namespace sharing between pysub and pyconsole
\begin{pyconsole}
import math
\end{pyconsole}
\begin{pysub}
$1 + 1 = !{math.sqrt(1+1)}$
\end{pysub}
The pysub block does not recognize the math import from the pyconsole block. Is there a way to fix this?
Everything in the pycon* commands and environments is in a separate session from all the other py* command and environments. So nothing is shared between them. I suppose it would be possible to create a pyconsub...unfortunately, I have almost no time for writing software at present.
I would be willing to look into it, if you don't think it's too difficult.