jupyter笔记本中的编号标题

时间:2018-03-09 08:02:52

标签: markdown jupyter

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

# Heading 1

# Heading 2

## Sub Heading

# Heading 3

会显示如下内容:

1标题1     2标题2
    2.1副标题
    3标题3

我不能用Jupyter 4.2.3获得这个。

3 个答案:

答案 0 :(得分:3)

你喜欢的是jupyter笔记本的默认显示风格。

带标记的输入单元格 Input cell with markdown

笔记本显示: notebook display

在笔记本电脑版本5.4.0上测试

答案 1 :(得分:3)

我认为你并不想只是为你的标题编号。猜猜你正在寻找实际组织的东西,除了编号之外,还可以帮助你在笔记本中导航

  1. 安装nbextensions,它是control panel

    conda install -c conda-forge jupyter_contrib_nbextensions jupyter_nbextensions_configurator
    
  2. 启用ToC2

  3. enter image description here

    1. 刷新,你现在拥有精心组织的笔记本
    2. enter image description here

答案 2 :(得分:0)

我可能忽略了很小的一步:

conda> jupyter contrib nbextension install --user      # to activate js

在以下内容中有完整的解释: http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/