jupyterlab-toc icon indicating copy to clipboard operation
jupyterlab-toc copied to clipboard

How to integrate TOC in file

Open parthi2929 opened this issue 5 years ago • 2 comments

Hi

This is a great life savior for long files. While I could use on left pane, I also wish I could integrate this TOC on top of my markdown file. Is it possible? If not can you kindly integrate it?

parthi2929 avatar Aug 05 '18 05:08 parthi2929

Yes, this feature would be valuable. I want a script that can generate a TOC section on a cell for me and also update the link for each header automatically. It doesn't need to be real-time. It can be manual every time I click a button to generate TOC for example.

offchan42 avatar Aug 07 '18 03:08 offchan42

To add a ToC cell in the notebook, it is possible to use the toc2 extension via launching the classic notebook from JupyterLab. To add a ToC cell to the exported HTML, it is possible to use nbconvert with the html_toc extension format provided by the toc2 extension, so you don't need to open the classic notebook. I wrote more detailed about this in a SO answer.

joelostblom avatar Dec 11 '19 12:12 joelostblom