# Append `-ExtractOutputPreprocessor.enabled=False` (after the toc2 extension has been installed): jupyter nbconvert file.ipynb -to html_toc Which can be used directly with nbconvert from the command line The toc2 extension mentioned above adds an export format called html_toc,
Insert a table in texmacs how to#
Nbconvert can be used to export notebooks to HTMLįollowing rules of how to format the exported HTML. (which I personally think looks cleaner). The inserted cell is a markdown cell with html in it,Ĭan be configured in the "Nbextensions" tab Save the notebook and the ToC cell will be there (see the gif below if you can't find it),Ĭlick the gear icon and check the box for Install toc2 as part of the jupyter_contrib_nbextensions bundle: conda install -c conda-forge jupyter_contrib_nbextensionsĪnd open the notebook in which you want to add the ToC. Or automatically via the toc2 jupyter notebook extension This can either be done manually as in Matt Dancho's answer, This extension is included by default since JupyterLab 3.0, in older version you can install it with the following command jupyter labextension install the notebook as a cell That can number headings, collapse sections, and be used for navigation (see gif below for a demo). The jupyterlab-toc extension adds the ToC as a side panel In a notebook while working in and exporting from JupyterLab. I wrote this answer to detail the possible ways of including a ToC There are already many good answers to this question,īut they often require tweaks to work properly with notebooks in JupyterLab.