Reputation: 145
With the nbextension toc, jupyter notebooks have table of content capabilities which is said to be transferable to html via nbconvert --to html_toc function, or via the dropdown menue "download as html with toc". However, neither option works in my case.
jupyter nbconvert FILE.ipynb --template toc
jupyter nbconvert FILE.ipynb --template toc2
(These two appear to be incomplete but are supplied like this)
jupyter nbconvert --to html_toc FILE.ipynb
(same error as above via menue)jupyter nbconvert FILE.ipynb --template toc2
gives error "jinja2.exceptions.TemplateNotFound: toc2"
I still have not understood the role of the toc2 template. Is it (still) necessary? Why? How (with the other files?)? Where (how is the location provided)? What exactly is needed where and how to make use of this extremely usefull functionality?(Please tell me if you need more information)
jupyter core : 4.7.1
jupyter-notebook : 6.2.0
qtconsole : 5.0.2
ipython : 7.20.0
ipykernel : 5.3.4
jupyter client : 6.1.7
jupyter lab : 3.0.8
nbconvert : 6.0.7
ipywidgets : 7.6.3
nbformat : 5.1.2
traitlets : 5.0.5
Upvotes: 6
Views: 6949
Reputation: 11
You can try running the following command:
pip install "nbconvert<6"
Then check that it installed nbconvert-5.6.1
(5.6.1 version).
After that, execute the following:
jupyter nbconvert --to html_toc YOURFILENAME.ipynb
Upvotes: 1