[IPython-dev] fancyboxes in IPython Notebooks

Brian Granger ellisonbg at gmail.com
Wed Oct 23 13:44:03 EDT 2013


We should probably have an event that fires after the markdown cell is
rendered that third party extensions can handle for things like this.

On Wed, Oct 23, 2013 at 7:33 AM, Matthias Kümmerer
<matthias at matthias-k.org> wrote:
> Hi all,
>
> I am a PhD student in computational neuroscience and I am using IPython
> Notebooks besides data analysis etc. for keeping my lab journal, where I
> document my results. For that, I save the figures that I want to have in the
> lab journal in a subfolder and include them in the notebook using markdown
> (actually I wrote a small library some to automate this process. It is still
> very alpha, but very useful for me [1]).
>
> For the lab journal, I would prefer to have my plots only as small pictures
> included to make scrolling trough the notebook easier. But of course at some
> point I may need the actual plot in full resolution. Thus I thought it would
> be great, if there is an easy way to make the images clickable with the full
> size image appearing after an click, e.g. using jquery fancybox (see [2] or
> [3] for an older version). Basically this is very easy to use, but I am not
> sure how I could make it usable in the notebook. The easiest way would be just
> to include fancybox somehow and write the html-code in the markdown cells for
> the href:
>
> <a class="fancybox" rel="group" href="big_image_1.jpg"><img
> src="small_image_1.jpg" alt="" /></a>
>
> but then still some javascript code has to deal with creating the fancy box.
> It would probably be more elegant to have some kind of extension in the
> IPython Notebook that deals with this automatically and converts markdown
> images in fancy box links.
>
> I would be very interested in this feature and I am definitely willing to
> invest some time on this if you could give me some hints how this could be
> plugged into IPython Notebook best.
>
> Thanks for your help and the work on IPython!
> Best,
>   Matthias
>
>
>
> [1] https://github.com/matthias-k/ipython-journal
> [2] http://fancyapps.com/fancybox/
> [3] http://fancybox.net/
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com



More information about the IPython-dev mailing list