I tried the PythonTeX package, and the output it produced contained question marks instead of running python code, what should i do ??
[Tex/LaTex] PythonTeX rendering problem
python
python
I tried the PythonTeX package, and the output it produced contained question marks instead of running python code, what should i do ??
Best Answer
Packages which call other programs, such as
sagetex
,python
,gnuplot
, or (as G. Poore confirms)PythonTeX
require you to process the your document in a similar fashion: 1. (pdf)latex your document to create a special file (withsagetex
it's a .sage file. 2. Process the special file with the program/script (Sage/Python/gnuplot) 3. (pdf)latex your document again.After step 1 your output will have ?? marks where the computations/pictures are supposed to be. I suspect you didn't realize that 2 more steps of processing are necessary. As G. Poore indicates above your second step will be "run the PythonTeX script (pythontex2.py or pythontex3.py, depending on your Python version)". Depending on the package you might be able to streamline the process with a shell escape in your tex file or configuration of your IDE