[IPython-dev] Preferred way to customize CSS for something that will be displayed on nbviewer?

Jody Klymak jklymak at gmail.com
Sun Aug 10 11:39:03 EDT 2014


Hi all

Has this been updated yet?  I'd like to share ipython notebooks on nbviewer for teaching and would like to change the CSS to make the pages easier to read.  What is the current best practice? 

Thanks.   Jody


On Feb 20, 2014, at  2:54 AM, Matthias Bussonnier <bussonniermatthias at gmail.com> wrote:

> There should be a discussion on IPython user about that from a few weeks ago. 
> 
> We are thinking on metadata in notebook level that nbviewer could look at that allow to select a theme on nbviewer.
> 
> IPEP and code to do so have to be written.
> 
> Envoyé de mon iPhone
> 
> Le 20 févr. 2014 à 04:58, Aron Ahmadia <aron at ahmadia.net> a écrit :
> 
>> Let's say I've developed a snazzy CSS file and I want it so that an uploaded notebook being viewed on nbviewer uses my custom CSS.
>> 
>> I've seen this bit of code in the wild[1]:
>> 
>> from IPython.core.display import HTML
>> def css_styling():
>>     styles = open("../styles/custom.css", "r").read()
>>     return HTML(styles)
>> css_styling()
>> 
>> But this seems a bit awkward, since I'm effectively just piping the CSS file into the notebook's rendered HTML.  Does nbviewer know to look anywhere for CSS, or is this the best we have right now?
>> 
>> -A
>> 
>> [1] http://nbviewer.ipython.org/github/barbagroup/AeroPython/blob/master/lessons/00_Lesson00_QuickPythonIntro.ipynb
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140810/be90a84c/attachment.html>


More information about the IPython-dev mailing list