Let's example like this :


then I will get the result like this :

In[1]  : 1+1 
Out[1] : 2

There are two separate questions here.

  1. Can a document using PythonTeX be converted into an IPython notebook, which is the interactive, web-based notebook format provided by IPython? The answer is no. PythonTeX provides formatting and inline commands that currently have no direct equivalent in the IPython notebook, so a one-to-one conversion is impossible. It would be possible, at least in principle, to do a round-trip conversion with a limited subset of PythonTeX. I may look into that possibility at some point, but I currently have no plans to try to implement it myself.

  2. Can PythonTeX's pyconsole environment (or an equivalent) use IPython instead of plain Python? Not currently, but adding support would probably be relatively simple. The pyconsole environment uses Python's code module to emulate an interactive interpreter. Adding support for IPython would involve using IPython's equivalent of the code module. I am not familiar with the IPython internals, but if you or someone else wants to track down the comparable IPython functions, then I would be happy to try to add IPython console support.

  • Thank for your quick answer , but I don't enough know about IPython console, and I only use it :) – Hirwanto Jan 24 '15 at 1:57

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.