jupyterlab / jupyterlab-toc

Table of Contents extension for JupyterLab
BSD 3-Clause "New" or "Revised" License
728 stars 106 forks source link

Feature Request : Add Heading inside cell #108

Open mindryu opened 4 years ago

mindryu commented 4 years ago

Colaboratory can add title of cell directly to the TOC by using the title tag. Use as follows:

@title Init varriables

It's very convenient because you can add a TOC directly in the cell. I'd like to have a similar feature.

Cheers,

kgryte commented 4 years ago

@AlcoholV Not sure what exactly you are asking for. Can you clarify?

This extension supports "adding" a heading to the ToC by finding and parsing those Markdown cells which begin with a Markdown heading. Hence, to add a "title", one simply uses the syntax for a Markdown heading. Not clear to me the benefit of introducing a syntax which is not an official feature of Markdown.

mindryu commented 4 years ago

@kgryte My explanation wasn't enough. I apologize.

I think adding a markdown header from the code cell will make notebook more consistent and easier to find and read. I think it can do some sort of bookmark. Of course, it is not an official markdown syntax. Once I used the Colab, I noticed that it's so nice and convenient feature. I post an example link to show how it works.

https://colab.research.google.com/drive/1BnTDkLMjBesxTuwVFoIdnELotbolJS8O#scrollTo=iUqeMDzayc7C

screenshot