Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating Table of Contents in VS code Jupyter Notebook

I am using the Jupyter extension in Visual Studio Code to maintain a notebook on python programming and I want to add a table of contents inside it. I want to add the TOC as the notebook is becoming very big and is becoming difficult to navigate.

I write a heading in markdown files using # to structure them properly. I have also seen it how to do it on Jupyter Notebook both by sing hyperlinks and in build feature.

Is the feature not available in case of Jupyter extension in VS? if you have any suggestions on how I can tackle this problem you are most welcome

screenshot for the problem

like image 822
Avishek Roy Avatar asked Jun 14 '21 19:06

Avishek Roy


People also ask

How do you create a table in Visual Studio code?

Right-click on Tables and select Add New Table. The Table Designer opens and shows a grid with one default row, which represents a single column in the table that you're creating. By adding rows to the grid, you'll add columns in the table. Right-click on the CustomerID row, and then select Set Primary Key.

How do I add a table of contents in JupyterLab?

In the notebook as a cellClick the toc2 symbol in the toolbar to bring up the floating ToC window (see the gif below if you can't find it), click the gear icon and check the box for "Add notebook ToC cell". Save the notebook and the ToC cell will be there when you open it in JupyterLab.


1 Answers

I'm a developer on this extension. VS Code has an existing "outline" feature for code editing. This feature is being reused in notebooks for holding ToC navigation. On your left side panel it's "> Outline" below your open files. It should populate with markdown headings and be able to navigate to them. Like so: enter image description here

like image 118
Ian Huff Avatar answered Oct 25 '22 04:10

Ian Huff