打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
jupyter notebook markdown TOC目录设置 – 泛泛星辰


  1. 利用jupyter命令,将该notebook插件文档复制到Jupyter数据目录。
  2. 运行juypter notebook, 然后去设置页面激活Table of Contents(TOC)插件。

以下步骤中的第1和第2步可以使用 conda install -c conda-forge jupyter_contrib_nbextensions命令替换。

以下命令均在cmd终端运行。

1. 安装pip包

Install the python package

pip install jupyter_contrib_nbextensions

2. 安装js和css文件

Install javascript and css files

jupyter contrib nbextension install --user

Once installed, you’ll need to restart the notebook server.

3. 启用插件

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

4. 在jupyter notebooke里激活

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

进入插件设置页面

  1. 勾选Table of Contents选项
  2. Parameters参数设置:
    • Automatically number notebook's sections 对TOC的序号自动编号
    • Add a Table of Contents cell at the top of the notebook 在notebook的顶行添加一个TOC
    • Display 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

转载请注明:泛泛星辰 » jupyter notebook markdown TOC目录设置

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Jupyter Notebook 自动补全插件
Python基础详解(一):工具准备篇
大邓强力推荐-jupyter notebook使用小技巧
高效方法 | Jupyter Notebook 比你想象中的还要强大
jupyter notebook使用技巧
Jupyter Notebook主题字体设置及自动代码补全
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服