Toolbar not visible after setting jupyter notebook theme

旧城冷巷雨未停 提交于 2021-02-06 10:56:36

问题


The toolbar and notebook name does not show when I call and load the themes from the notebook.

I can load the themes from notebook using a code but I am not sure how to use the switches like -T and -N for call to toolbar and notebook name.

I have used the following in a code cell:

from jupyterthemes import get_themes
import jupyterthemes as jt
from jupyterthemes.stylefx import set_nb_theme
set_nb_theme('solarizedd')

The theme changes but the toolbar and notebook name does not appear. Even using the Toggle Header and Toggle Name from view in menu bar has no effect.


回答1:


I just installed the jupyter themes and went thru the same issue. My regular and nbextension toolbar disappeared and could not make it come back unless I reverted to default !jt -r.

after some research i fugure it out....so your cell should write

from jupyterthemes import get_themes import jupyterthemes as jt from jupyterthemes.stylefx import set_nb_theme set_nb_theme('solarizedd', -T, -N,-kl)

  • Toolbar Visible -T
  • Name & Logo Visible -N
  • Kernel Logo Visible -kl
    • their defaults are set to none

see the documentation documentation of jupyter theme

or something more permanent and fewer lines of code, using the command "!" in the actual cell

!jt -t solarizedd -T -N -kl



回答2:


jt -t oceans16 -T -N

this would surely help.




回答3:


Have you tried to update to the latest version? I have tried many suggestions. All did not work until I updated the theme package to the latest version

pip install --upgrade jupyterthemes

I found the solution here




回答4:


I was able to solve this by editing the custom.css file located at ~/.jupyter/custom/custom.css. I changed the mailtoolbar setting from ’none’ to ‘block’. i.e. find this line:

    div#maintoolbar {
        display: none !important;
    }

...and change it to:

    div#maintoolbar {
        display: block !important;
    }

Hope that works for you too! Don't imagine looking for reasons it failed to start with, however, there is a theory one cannot update while it is running.



来源:https://stackoverflow.com/questions/56044487/toolbar-not-visible-after-setting-jupyter-notebook-theme

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!