Reputation: 3031
I'd like to install the extension to generate automatic table of contents using header cells.
however, when I copy/paste
curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js > $(ipython locate)/nbextensions/toc.js
into terminal, it says directory not found. The extension in question can be found here.
Upvotes: 0
Views: 7671
Reputation: 11399
Install jupyter_contrib_nbextensions by entering the following commands at the shell
pip install --user jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
Activate the table of content extension:
jupyter nbextension enable toc2/main
There are many other extensions available in this package. Optionally you can install the jupyter notebook extension configurator (not needed)
pip install --user jupyter_nbextensions_configurator
jupyter nbextensions_configurator enable --user
This will make a configurator available at:
http://localhost:8888/nbextensions
Upvotes: 2
Reputation: 465
Cloning the repo and creating the sum links did not work for me.
While using ipython 1.1, I had to do the following:
The extension expects the section headings to be in separate cells. So, if one has a markdown cell with a few headings & sub-headings, it will not be recognised.
For ipython 2.2, you need to also download the min map files of backbone & underscore also.
Upvotes: 0
Reputation: 896
This IPython Notebook semi-automatically generates the files for minrk's table of contents in Windows (I guess one only needs to change
%%cmd- to %%bash magics
to make it work in Linux). It does not use the 'curl'-commands or links, but writes the *.js and *.css files directly into your IPython Notebook-profile-directory.
There is a section in the notebook called 'What you need to do' - follow it and have a nice floating table of contents : )
Here is an html version which already shows it: http://htmlpreview.github.io/?https://github.com/ahambi/140824-TOC/blob/master/A%20floating%20table%20of%20contents.htm
Upvotes: 0
Reputation: 180401
I did the following and it worked for me using Ubuntu:
1. git clone https://github.com/minrk/ipython_extensions.git
2. ln -s $(pwd)/extensions $(ipython locate)/extensions
ln -s $(pwd)/nbextensions $(ipython locate)/nbextensions
3. curl -L https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/gist.js > $(ipython locate)/nbextensions/gist.js
4. I use ubuntu so I used the text editor from bash like so gedit $(ipython locate profile)/static/custom/custom.js.
5. I appended "IPython.load_extensions('gist');" to the bottom of custom.js and saved the file.
If you want to install the Retina Figures extension follow the rest of the instructions here
If you do are using Windows there is a tutorial here that shows both how to create sym links in Windows and Linux.
If you do not have git installed then download the zip file with this link
Upvotes: 1