以下步骤中的第1和第2步可以使用
conda install -c conda-forge jupyter_contrib_nbextensions
命令替换。以下命令均在cmd终端运行。
Install the python package
pip install jupyter_contrib_nbextensions
Install javascript and css files
jupyter contrib nbextension install --user
Once installed, you’ll need to restart the notebook server.
Enabling/Disabling extensions
jupyter nbextension enable <nbextension require path>
<nbextension require path>
为codefolding\main
所在位置,比如我的位置:F:\Anaconda3\Lib\site-packages\jupyter_contrib_nbextensions\nbextensions\codefolding\main
jupyter nbextension enable F:\Anaconda3\Lib\site-packages\jupyter_contrib_nbextensions\nbextensions\codefolding\main
activate
then you just need to go to http://localhost:8888/nbextensions (assuming a default configuration) and select “Table of contents” and “activate” to get a new “Table of contents” button at the top of your notebooks.
jupyter notebook
http://localhost:8888/nbextensions
进入插件设置页面 :
Automatically number notebook's sections
对TOC的序号自动编号Add a Table of Contents cell at the top of the notebook
在notebook的顶行添加一个TOCDisplay toc window/sidebar at startup
在启动时显示TOC浮动条Display Table of Contents as a sidebar (otherwise as a floating window)
选中则在浏览器侧边显示TOC,否则以浮动窗口形式存在。Display Table of Contents as a navigation menu
在notebook菜单栏显示navigation菜单按钮Move notebook's title and menu on the left instead of being centered -- This provides a better look when the toc/sidebar is present
联系客服