Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.
/ jupyterlab-toc Public archive

Table of Contents extension for JupyterLab

License

Notifications You must be signed in to change notification settings

jupyterlab/jupyterlab-toc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

24ce0cc · Aug 10, 2021
Jun 18, 2021
Oct 5, 2019
Nov 6, 2019
May 9, 2020
May 9, 2020
Jun 22, 2019
Mar 8, 2020
Jul 11, 2018
Jul 11, 2018
Mar 14, 2018
Jun 18, 2021
May 20, 2020
Sep 11, 2018
Oct 3, 2018
Sep 4, 2018
Aug 10, 2021

jupyterlab-toc

Archived

This project is archived. Development is now happening in https://github.com/jupyterlab/jupyterlab.

This extension was added to the core JupyterLab extensions for JupyterLab 3.0. Anyone using JupyterLab < 3.0 should use this extension, but anyone using JupyterLab >= 3.0 will already have this extension installed with the core JupyterLab extensions. Any issues or pull requests should be added to the JupyterLab repo.

Binder

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 >=2.0
  • NodeJS 12+

Installation

jupyter labextension install @jupyterlab/toc

Settings

Once installed, extension behavior can be modified via the following settings which can be set in JupyterLab's advanced settings editor:

  • collapsibleNotebooks: enable the ability to collapse sections of notebooks from the 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.