This post was kindly contributed by SAS Programming for Data Mining - go there to comment and to read the full post. |
Jupyter notebook does not support Table Of Contents (ToC) out of box, unlike R Markdown. There are nbextensions that ppl made to support this. It is easy to add this capability, following these steps to add Table of Contents to your notebook:
1. Find your Jupyter Notebook data directory by using this command in your DOS console:
a. Jupyter –data-dir
2. Copy the following two files into your Jupyter data directory:
https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js
https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.css
3. Run this command:
a. Jupyter nbextension enable toc –user
4. In your Jupyter Notebook, add this command to a MarkDown cell on top of your notebook:
a. < div id=”toc” > < /div >
One caveat is that all headings will be listed in ToC, including your Title (if there is one). One easy work around is to write your title in Word, save a screenshot into an image, save the image file to the same folder as your notebook is, then use the following command in the top Markdown cell:
< div style=”float: left;” > < img src=”Title.png” height=”200″ width=”800″> < /div >
This post was kindly contributed by SAS Programming for Data Mining - go there to comment and to read the full post. |