设置 jupyter notebook 主题后工具栏不可见

J. *_*wee 16 python themes toolbar jupyter-notebook

当我从笔记本调用和加载主题时,工具栏和笔记本名称不显示。

我可以用代码从笔记本加载主题,但我不知道如何使用交换机类似-T,并-N用于调用工具栏和笔记本电脑的名称。

我在代码单元中使用了以下内容:

from jupyterthemes import get_themes
import jupyterthemes as jt
from jupyterthemes.stylefx import set_nb_theme
set_nb_theme('solarizedd')
Run Code Online (Sandbox Code Playgroud)

主题改变了,但工具栏和笔记本名称没有出现。即使使用菜单栏中的“切换标题”和“切换名称”也没有效果。

小智 28

我刚刚安装了 jupyter 主题并解决了同样的问题。我的常规和 nbextension 工具栏消失了,除非我恢复为默认值,否则无法恢复!jt -r

经过一番研究,我把它弄清楚了……所以你的细胞应该写

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

  • 工具栏可见 -T
  • 名称和徽标可见 -N
  • 内核标志可见 -kl
    • 他们的默认设置为无

请参阅jupyter 主题的文档文档

或者使用命令“!”的更持久和更少代码行的东西 在实际单元格中

!jt -t solarizedd -T -N -kl
Run Code Online (Sandbox Code Playgroud)

  • `set_nb_theme('solarizedd', -T, -N,-kl)` 不起作用(`NameError: name 'T' is not Defined` 并且使用 `"-T"` 等也会失败)... `!jt` 却很有魅力!:) +1! (3认同)
  • 的确; `TypeError: set_nb_theme() 采用 1 个位置参数,但给出了 4 个。` (2认同)

小智 5

jt -t 海洋16 -T -N

这肯定会有所帮助。


Lig*_*ger 5

我可以通过编辑位于 ~/.jupyter/custom/custom.css 的 custom.css 文件来解决这个问题。我将邮件工具栏设置从 \xe2\x80\x99none\xe2\x80\x99 更改为 \xe2\x80\x98block\xe2\x80\x99。即找到这一行:

\n
    div#maintoolbar {\n        display: none !important;\n    }\n
Run Code Online (Sandbox Code Playgroud)\n

...并将其更改为:

\n
    div#maintoolbar {\n        display: block !important;\n    }\n
Run Code Online (Sandbox Code Playgroud)\n

希望这也适合你!不要想象寻找它无法启动的原因,但是,有一个理论是在它运行时无法更新。

\n