[IPython-dev] TikZ Magics

Michael Kraus michael.kraus@ipp.mpg...
Wed Jan 9 06:12:19 CST 2013


Dear all,

I tried to send this mail to the list a few days ago, but it seems it didn't make it.

Fist of all, thanks a lot for the great work on the IPython Notebook. I'm using it a lot and really like it. Especially the LaTeX support is great and extraordinary useful!

However, I'm using TikZ quite a lot as well, for drawing figures and sketches. I thought it would be really nice to do that within the IPython Notebook. So I created TikZ magics that aim at allowing exactly that. Of course, it needs an existing LaTeX installation to run properly (and probably convert from ImageMagick).

So far it's mostly a quick hack based on the Octave magics. Right now only PNG works fine. The JPG and SVG output of the LaTeX Standalone module seems to be pretty crappy so that the result is rather useless. Nevertheless, the support for SVG and JPG is in the module, just in case the LaTeX (or convert) guys get that working properly. One can also think about using convert to go from PNG to JPG, which should work better. For SVG I don't have a workaround, yet. 

If it's interesting for anybody, the tikzmagic module can be found at [1] and an IPython notebook with some examples can be found at [2]. I have just tested it in the Notebook where it seems to work fine.


Cheers,
Michael


[1] http://www.ipp.mpg.de/~mkraus/python/tikzmagic.py
[2] http://www.ipp.mpg.de/~mkraus/python/tikzmagic_test.ipynb



More information about the IPython-dev mailing list