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
would display something like :
1 Heading 1
2 Heading 2
2.1 Sub Heading
3 Heading 3
I don't get this with Jupyter 4.2.3.
Numbered lists: Start with 1. followed by a space, then it starts numbering for you. Start each line with some number and a period, then a space. Tab to indent to get subnumbering.
Use the number sign (#) followed by a blank space for notebook titles and section headings: # for titles. ## for major headings. ### for subheadings.
Break down your notebook into smaller parts and use Heading levels 2, 3, 4, and so on for the hierarchy of topics and sub-topics. A notebook should ideally have just one Heading level 1, under which multiple Heading levels of 2, 3, 4, and so on are nested.
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).
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.
Install nbextensions and it's control panel
conda install -c conda-forge jupyter_contrib_nbextensions jupyter_nbextensions_configurator
Enable ToC2
There is on tiny step I may overlooked:
conda> jupyter contrib nbextension install --user # to activate js
perfectly explained in: http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With