Tuesday, 9 October 2012

Solarized theme for IPython code mirror syntax highlighting

Changes the syntax highlighting of IPython. Just call this function one time in your notebook. I recommend using it only while "programming" and not using it for printing or publishing.

solarized.py

2 comments:

  1. Hi,
    recent version of IPython allows you to drop your custom css files in
    ~/.ipython/profile_xxx/static/css/custom.css

    So no need to actually execute anything from the kernel...

    That css can also be added to a markdown cell...

    The @media screen (http://www.w3schools.com/css/css_mediatypes.asp)
    could avoid the css to be used while printing.

    ReplyDelete
    Replies
    1. Hi Matthias

      That's good to know, thanks for the additional info. I just tried the markdown cell, that works well. Do you use solarized in the notebook?

      BTW The latest version https://github.com/adfinis-sygroup/adsy-python/blob/master/display.py#L302 allows adding and removing the solarized theme, that's yet another way. :-)

      Best,
      Jean-Louis

      Delete