TOC not shown after a notebook reload
jankatins opened this issue · 8 comments
Opening a notebook will not show the TOC, even if that was added (and executed) during the last session. The box is there, but only the text "Content [hide]" is shown, but not the links to the headlines. It seems that the display_html
content is preserved over reloads, but not the display_javascript
one.
(chrome browser)
It would also be nice if the nbtoc could be added as javascript extension, so that it can be used in every notebook without executing anything.
It would be also nice if the TOC has a button to reload TOC. Would it be hard to implement?
extension is now pure-js, and can render on load
An "how to enable" would be nice: a simple require(["nbextensions/nbtoc"]);
in <profile>/custome/custom.js
(the file was loaded with the change, checked with inspect element... But nbtoc was not loaded...
Or do I have to update ipython to a newer version?
It's in the readme. And yes, these js-only extensions rely on changes in IPython master.
Ah, was too fast with this question and didn't reload the front page. Anyway: is there any way to clone the repo into one dir and load both the python parts and the js parts from this checkout? Currently this repo is checkout out into .ipython\extensions\ipython_extensions
and and I couldn't find the nbtoc.js file via ipython_extensions/nbextensions/nbtoc
. I now copied both nbtoc files into the default profile static dir and it worked...
This is how I use it:
ln -s /path/to/ipython_extensions/extensions ~/.ipython/extensions
ln -s /path/to/ipython_extensions/nbextensions ~/.ipython/nbextensions
Cool, that works even under windows (after renaming the old directories and using a admin cmd...):
mklink /d ipython_extensions\extensions extensions
mklink /d ipython_extensions\nbextensions nbextensions
@minrk: The readme still says "or clone into .ipython/extension": do you want a PR with this new information?
@JanSchulz readme updated