Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 840 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 840 Bytes

nb_toc (Notebook Table of Contents)

Creates internal hyperlinks to make navigating large notebooks quicker.

$ pip install nb_toc

Usage

from nb_toc import generate
generate('my_notebook.ipynb')

It is possible to run this in a notebook while it is open, but make sure to save beforehand. Possible to use as a pre-commit hook.

Optional Parameters for generate

Argument Default Value Role
title 'Table of Contents' Header for TOC cell
additional_text None Text at end of TOC cell
indent_size 8 Amount of indentation for TOC
ignore_lower 0 Ignores headers <= this number
ignore_upper 7 Ignores headers >= this number

Example TOC

example