jupyter笔记本中的编号标题 [英] Numbered headers in jupyter notebooks

查看:1166
本文介绍了jupyter笔记本中的编号标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改Jupyter显示所谓的标题单元格的方式.默认情况下,标题级别仅通过不同的字体大小来区分. 我希望jupyter显示分层编号的标题,以便:

I'd like to change the way Jupyter displays the so called heading cells. By default, heading levels are only differentiated through a different font size. I'd like jupyter to display hierarchical numbered titles so that :

# Heading 1

# Heading 2

## Sub Heading

# Heading 3

将显示类似:

1标题1
2标题2
2.1子标题
3标题3

1 Heading 1
2 Heading 2
2.1 Sub Heading
3 Heading 3

Jupyter 4.2.3并没有帮助我.

I don't get this with Jupyter 4.2.3.

推荐答案

如果仅用于获取标题和编号,则使用markdown语法,则不需要任何扩展名(如Xiaodong的回答中所建议).

If it's only about getting the headings and numbering, then use markdown syntax, you wouldn't need any extensions (as suggested in Xiaodong's answer).

如果您不仅想对标题进行编号,还想寻找一些实际组织起来的东西,不仅可以对笔记本进行编号,还需要ToC2扩展名.

If you're trying to not only number your headings, but also looking for something that actually organizes and help you navigate around the notebook in addition to just numbering, then you will need ToC2 extension.

  1. 安装 nbextensions ,它是

  2. 启用 ToC2

    1. 刷新,您现在已经有了井井有条的笔记本

    这篇关于jupyter笔记本中的编号标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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