VSCode Bug fix or workaround to correctly display Numbered Table of Contents in Jupyter Notebooks in VSCode (TOC is currently corrupted)

Viewed 333

VSCode incorrectly shows Jupyter Notebooks' Numbered Table of Contents with a "Mv" (a capital M followed by a down arrow) instead of the auto-numbered Headings that I slaved to create. Jupyter NB Numbered Headings corrupted in TOC rendering

I have made many Jupyter Notebooks documents with carefully built "Numbered Table of Contents". They render just fine when I open them in JupyterLab (or Jupyter Classic NB with TOC2). However, in VSCode all heading numbers are GONE in the left-hand Notebook TOC window pane.

Does anyone have a workaround or permanent fix for this problem? This VSCode BUG (not a feature!) needs to be fixed by Microsoft. This bad rendering was mentioned in the Jupyter NB forums over 1 year ago, but nothing has been done yet.

Microsoft VSCode documentation incorrectly calls this TOC navigation area the "Outline", (probably a holdover name from MS-Word.) Their MS-terminology needs to follow the Jupyter Notebook and JupyterLab Open Source Community on this one.

This is quite annoying because I really want to use VSCode Python debugging capabilities and other add-ins. However, without RTF authoring and numbered TOC headings, it is easier to format and organize content in JupyterLab or Jupyter Classic NB with the TOC2 extension.

What I have tried:

I have looked into the code for the VSCode Jupyter Notebook renderer source code, but cannot make sense out of how or why it drops heading numbers from the Jupyter.iPyNB JSON file format.

I have updated VScode numerous times to no avail.

I have searched https://github.com/microsoft/vscode for updates many times. I have looked elsewhere using focused Google searches to find repos outside the Microsoft developer community.

############################## Here's my version information:

VSCode Version Information:
Version: 1.62.3 (system setup) Commit: ccbaa2d27e38e5afa3e5c21c1c7bef4657064247 Date: 2021-11-17T08:11:14.551Z Electron: 13.5.2 Chrome: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19043

Jupyter Notebook Version Information: (base) C:\Users<username>\Desktop>jupyter --version Selected Jupyter core packages... IPython : 7.29.0 ipykernel : 6.5.0 ipywidgets : 7.6.5 jupyter_client : 6.1.12 jupyter_core : 4.9.1 jupyter_server : 1.12.0 jupyterlab : 3.1.18 nbclient : 0.5.9 nbconvert : 6.2.0 nbformat : 5.1.3 notebook : 6.4.4 qtconsole : 5.2.1 traitlets : 5.1.1

0 Answers
Related