如何将目录添加到 Jupyter/JupyterLab 笔记本? [英] How can I add a table of contents to a Jupyter / JupyterLab notebook?

查看:41
本文介绍了如何将目录添加到 Jupyter/JupyterLab 笔记本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://ipython.org/ipython-doc/stable 上的文档/interactive/notebook.html

您可以使用不同级别的标题为整个计算文档提供概念结构;有 6 个级别可用,从级别 1(顶级)到级别 6(段落).这些可以稍后用于构建目录等.

You can provide a conceptual structure for your computational document as a whole using different levels of headings; there are 6 levels available, from level 1 (top level) down to level 6 (paragraph). These can be used later for constructing tables of contents, etc.

但是,我无法在任何地方找到有关如何使用分层标题创建此类目录的说明.有没有办法做到这一点?

However, I can't find instructions anywhere on how to use my hierarchical headings to create such a table of contents. Is there a way to do this?

注意:如果有的话,我也会对使用 ipython 笔记本标题的其他类型的导航感兴趣.例如,从一个标题到另一个标题来回跳跃以快速找到每个部分的开头,或者隐藏(折叠)整个部分的内容.这是我的愿望清单 - 但任何类型的导航都会引起兴趣.谢谢!

NB: I'd also be interested in other kinds of navigation using ipython notebook headings, if any exist. For instance, jumping back and forward from heading to heading in order to quickly find the start of each section, or hiding (folding) the contents of an entire section. This is my wish-list - but any kind of navigation at all would be of interest. Thanks!

推荐答案

有一个 ipython nbextension 构建目录对于笔记本.它似乎只提供导航,不提供部分折叠.

There is an ipython nbextension that constructs a table of contents for a notebook. It seems to only provide navigation, not section folding.

这篇关于如何将目录添加到 Jupyter/JupyterLab 笔记本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆