Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Render markdown cells with pandoc in the ipython notebook

I know that it's possible add custom css and js to our ipython notebooks. I also know that we can change the templates used to convert a ipynb file to static html with nbconvert. However I didn't figure out how we can change templates. for rendering the live ipython notebook.

I'm using ipython==2.20 installed via pip on a Ubuntu 14.04 distribution.

I'd like to process all my markdown cells with pandoc and not node.js marked as it is done by default in the IPython/html/static/notebook/js/textcell.js

like image 716
Ben Avatar asked Nov 24 '25 06:11

Ben


1 Answers

This can't be done out-of-the-box with IPython notebook, unfortunately. The mathjax javascript library is available to the IPython notebook so Markdown can be parsed, but no such javascript library for using pandoc to render the text cell exists.

I would recommend investigating commonmark, node-pdc and markmon for inspiration if you would like to investigate writing such a library.

like image 131
mtd Avatar answered Nov 27 '25 03:11

mtd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!