Zuoyuan Huang 0ebd5f2f93 refactored the way icons are added to toc %!s(int64=6) %!d(string=hai) anos
..
src 0ebd5f2f93 refactored the way icons are added to toc %!s(int64=6) %!d(string=hai) anos
style 0ebd5f2f93 refactored the way icons are added to toc %!s(int64=6) %!d(string=hai) anos
.gitignore 1673e368cc added some comments %!s(int64=6) %!d(string=hai) anos
.prettierignore d24e666ca6 Make the codebase prettier. %!s(int64=6) %!d(string=hai) anos
.prettierrc d24e666ca6 Make the codebase prettier. %!s(int64=6) %!d(string=hai) anos
LICENSE 3ea740cce3 Add license. %!s(int64=7) %!d(string=hai) anos
README.md d24e666ca6 Make the codebase prettier. %!s(int64=6) %!d(string=hai) anos
package.json a803f211bf refactored notebook metadata, images and shared methods %!s(int64=6) %!d(string=hai) anos
toc.gif 4ded86bb2a Update README.md %!s(int64=7) %!d(string=hai) anos
tsconfig.json d30b36076b make ts build all subdirectories %!s(int64=6) %!d(string=hai) anos
tslint.json 83ae046abe Linting and nullchecks. %!s(int64=6) %!d(string=hai) anos
yarn.lock e2e7526de8 fixed autonumbering for rendered markdown doc %!s(int64=6) %!d(string=hai) anos

README.md

jupyterlab-toc

A Table of Contents extension for JupyterLab. This auto-generates a table of contents in the left area when you have a notebook or markdown document open. The entries are clickable, and scroll the document to the heading in question.

Here is an animation showing the extension's use, with a notebook from the Python Data Science Handbook: Table of Contents

Prerequisites

  • JupyterLab v0.33

Installation

jupyter labextension install @jupyterlab/toc

Development

For a development install, do the following in the repository directory:

jlpm install
jlpm run build
jupyter labextension install .

You can then run JupyterLab in watch mode to automatically pick up changes to @jupyterlab/toc. Open a terminal in the @jupyterlab/toc repository directory and enter

jlpm run watch

Then launch JupyterLab using

jupyter lab --watch

This will automatically recompile @jupyterlab/toc upon changes, and JupyterLab will rebuild itself. You should then be able to refresh the page and see your changes.