Jupyter notebook themes

126 views
Skip to first unread message

Bill Page

unread,
May 30, 2017, 12:05:22 PM5/30/17
to sage-devel
Is it possible to use a custom Jupyter css theme in Sage? E.g.

https://github.com/powerpak/jupyter-dark-theme

How and where would I put the 'custom.css' file? My first attempts to
do this where in my user $HOME/.jupyter/custom directory and second
was in the 'sage -root' directory /.jupyter/custom/ but neither of
these seemed to work when I started sage with --notebook=jupyter

Am I doing something wrong?

Vincent Delecroix

unread,
May 30, 2017, 3:44:57 PM5/30/17
to sage-...@googlegroups.com
Do the following to get the list of config paths

$ sage -sh -c "jupyter --paths"

Vincent

Bill Page

unread,
May 30, 2017, 5:02:02 PM5/30/17
to sage-devel
Great! Thank you. On my system I get:

wspage@strix ~ $ ./sage/sage -sh -c "jupyter --paths"
config:
/home/wspage/.sage//jupyter-4.1
/home/wspage/sage/local/etc/jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/home/wspage/.local/share/jupyter
/home/wspage/sage/local/share/jupyter
/usr/local/share/jupyter
/usr/share/jupyter
runtime:
/run/user/1000/jupyter

What's with the double // ?

Anyway, I checked the config directories

wspage@strix ~ $ ls /home/wspage/.sage//jupyter-4.1
migrated
wspage@strix ~ $ ls /home/wspage/sage/local/etc/jupyter
jupyter_notebook_config.py nbconfig
wspage@strix ~ $ ls /usr/local/etc/jupyter
ls: cannot access '/usr/local/etc/jupyter': No such file or directory
wspage@strix ~ $ ls /etc/jupyter
ls: cannot access '/etc/jupyter': No such file or directory

--

My ~.jupyter directory has the following:

wspage@strix ~ $ ls .jupyter
custom migrated

So I decided to try this:

wspage@strix ~ $ cp -r .jupyter/custom /home/wspage/.sage//jupyter-4.1
wspage@strix ~ $ ls /home/wspage/.sage//jupyter-4.1
custom migrated

Now after restarting Sage with --notebook=jupyter I get the hoped for result.

This is exactly what I needed to know but could not find anywhere in the docs.
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages