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

Keep numbered header when exporting

Open marctorsoc opened this issue 5 years ago • 3 comments

Being this my first contribution to this repo, I first would really like to show appreciation for this extension. I really love it and use it.

Something I use everyday is the option to show numbered headers based on whether you define #, ##, ###, etc. However, the numbers are not shown when exporting to e.g. HTML? Is this something difficult to implement? I'm not front-end, but with some guidance I can take a look :)

Thanks

marctorsoc avatar Dec 12 '19 15:12 marctorsoc

Good idea, I just want to point out, that permanent switch to displayin numbers can lead to exactly opposite problem, where other people for other cases, would prefer to not display numbers.

Expectation to show numbers in headers is different case by case.

I like the idea - can be definitely useful and it should be configurable somehow:

  • maybe from UI which can be harder
  • or via some preferences in Settings.

stefansimik avatar Mar 13 '20 11:03 stefansimik

agree, as another option, we might add some indication when adding a header (#), say #n or something, so that the HTML exporter understands we want numbers? Not sure this is feasible as no idea how it internally works

marctorsoc avatar Mar 13 '20 12:03 marctorsoc

Again, thanks for this beautiful extension. If I understand correctly, this exists in toc2, the extension for Jupyter: https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/toc2/README.html and it used an additional export option "Export as html_toc" Would it be easy to implement?

FelixChop avatar Apr 07 '20 06:04 FelixChop