Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to the TOC extension for ipython notebook?

I'm trying to install the great table of contents extension in a new computer. but I cant find it anymore. the only page I do find does not explain how to install the extension on windows.

So.. How can I install it, and why is it not a part of the official Ipython notebook? I simply can't understand how people are getting along without it.

like image 889
idoda Avatar asked Jan 17 '14 14:01

idoda


People also ask

How do I make a table of contents in Jupyter Notebook?

Click the toc2 symbol in the toolbar to bring up the floating ToC window (see the gif below if you can't find it), click the gear icon and check the box for "Add notebook ToC cell". Save the notebook and the ToC cell will be there when you open it in JupyterLab.

What is the IPython notebook extension?

ipynb file extension is used for computational notebooks that can be open with Jupyter Notebook. The Jupyter Notebook was formerly named IPython Notebook. The extension *. ipynb is from letters IPython Notebook.

How do you view the table of contents in JupyterLab?

A table of contents is auto-generated in the left sidebar when you have a notebook, markdown, latex or python files opened. The entries are clickable, and scroll the document to the heading in question. In the sidebar panel, you can number headings, collapse sections, and navigate into the file.

Is the extension for the Jupyter Notebook?

Jupyter Notebook Extensions All the extensions mentioned in this article are available through an open-source package, 'jupyter_contrib_nbextensions. ' This python package includes multiple unofficial extensions provided by the community that extends the capability of the Jupyter Notebook.


1 Answers

I've installed toc nbextension successfully with Jupyter 4 (ie. ipython notebook 4) recently. In fact installing extension is easier than before :)

I post my solution here, may it help.

## download 
mkdir toc
cd toc
wget https://raw.githubusercontent.com/minrk/ipython_extensions/master/nbextensions/toc.js
wget https://raw.githubusercontent.com/minrk/ipython_extensions/master/nbextensions/toc.css

## install and enable
cd ..
jupyter-nbextension install --user toc
jupyter-nbextension enable toc/toc

A bit more explain:

install will copy toc to ~/.local/share/jupyter/nbextensions/

enable will modify ~/.jupyter/nbconfig/notebook.json.

You can check these two place to see what happened.

Note: we use enable toc/toc here is because toc.js is in ~/.local/share/jupyter/nbextensions/toc/. If you put toc.js and toc.css directly in ~/.local/share/jupyter/nbextensions/ then you should use enable toc here.

Edit

Sorry, I didn't notice the orginal problem is on windows. I'm not sure if it's same for windows jupyter, any report is welcome.

Update

Now the toc nbextension has been added into this project which provide a collection of kinds of nbextensions. It's very easy to install and manage, worth to try!

like image 149
Syrtis Major Avatar answered Sep 22 '22 05:09

Syrtis Major