iodide-project / iodide

Literate scientific computing and communication for the web
Mozilla Public License 2.0
1.49k stars 143 forks source link

include option to compile a table of contents to a notebook? #198

Open hamilton opened 6 years ago

hamilton commented 6 years ago

This might be a worthwhile notebook-level option, which takes all of the various header elements and creates a linked table of contents, linked to scroll to the appropriate anchor.

bcolloran commented 6 years ago

https://github.com/Oktavilla/markdown-it-table-of-contents https://github.com/medfreeman/markdown-it-toc-and-anchor https://github.com/samchrisinger/markdown-it-toc (repo deleted since comment) none of these has particularly many stars, but maybe a starting point

https://github.com/jonschlinkert/markdown-toc has ~500 stars. we could try switching from markdown-it to see https://github.com/jonschlinkert/remarkable to use that plugin. but the katex plugin for remarkable has way less stars than the one for markdown-it, and probably quality latex rendering is more important (a less stellar TOC implementation won't make or break us)