minrk/ipython_extensions

issues with TOC installation

edoson opened this issue · 3 comments

Hi,

Just tried installing TOC extension on a mac book. didn't succeed. which custom.js file should I edit and where the TOC button should appear in the notebook?

I've added the line to the file in:
~/anaconda/lib/python2.7/site-packages/IPython/html/static/custom/custom.js

yet I see no TOC button.

Thanks!

I possibly have the same issue:
Added IPython.load_extensions('toc'); to ~/.ipython/<profile name>/static/custom/custom.js and restarted the server but no TOC button.

EDIT: I see what it is from the source nbtoc.py usage:
run %load_ext nbtoc (or add above with 'nbtoc' to custom.js) then %nbtob.

The TOC now displays OK.

To elaborate on what @andmalc said:

The TOC extension does not work as described in the README. When I load a notebook, I get this error in my browser console:

TypeError: IPython is undefined (toc.js:119)

However, downloading extensions/nbtoc.* from this repository to ~/.ipython/<profile name>/extensions/ and then executing the following in the notebook:

%load_ext nbtoc
%nbtoc

works for me. I'm running IPython 2.3.1.

I added to the README that the extensions should be loaded inside the app_initialized.NotebookApp handler. These extensions are only supported on latest master, and aren't supported on 2.x. They may still work, though.