How Can I Get The Option 'export Notebook To Html_toc' On The 'export Notebook As...' Menu In Jupyter Lab?
How can all of the jupyter nbconvert export options be enabled from the Export Notebook As... menu in Jupyter lab? Specifically, how can I get the option to Export Notebook to Ht
Solution 1:
- This answer is a roundabout hack for enabling the full menu in Jupyter Lab
- In this situation, I have a clean installation of Anaconda, which includes Jupyter Lab and Jupyter Notebook.
- Upon entering Jupyter Lab, only the minimal Export options are available.
To enable the Html_toc Export option, do the following
- Go to the Extension Manager in Jupyter Lab and install
@jupyterlab/toc
- Shut down Jupyter lab and go to the Anaconda Prompt
- If your version of
nbconvert
is greater than 5.6.1, then doconda install -c conda-forge "nbconvert=5.6.1"
- Run
conda install jupyter_contrib_nbextensions
orconda install -c conda-forge jupyter_contrib_nbextensions
per Installing jupyter_contrib_nbextensions Guide.- This will install a number of extensions to
\\Anaconda3\\lib\\site-packages\\jupyter_contrib_nbextensions\\nbextensions\\
- There are
pip
install options in the guide, but I haven't tried this for a manual installation of Jupyter Lab and Jupyter Notebook
- This will install a number of extensions to
- Run
jupyter contrib nbextension install --user
- From the Anaconda Prompt, run
jupyter notebook
- During loading of the Jupyter Notebook environment, there where warnings as follows
[jupyter_nbextensions_configurator] nbextension '...' has duplicate listings
. - One location was
\\Anaconda3\\...
, as mentioned above, and the other was\\Users\\...\\AppData\\\Roaming\\jupyter\\nbextensions\\...
- This could be because I had a previous installation of Anaconda, but I resolved this issue by renaming
\\Users\\...\\AppData\\\Roaming\\jupyter\\nbextensions\\...
to\\Users\\...\\AppData\\\Roaming\\jupyter\\nbextensions_old\\...
- During loading of the Jupyter Notebook environment, there where warnings as follows
- Go to the
Nvextensions
tab, select the option forTable of Contents (2)
, andEnable
it. - Quit / Logout of Jupyter Notebook
- From the Anaconda prompt, go the
jupyter lab
- Now all of the
Export Notebook As...
options will be enabled in the file menu.- Including, and specifically
Export Notebook to Html_toc
- Including, and specifically
Examples
- Here are examples of HTML notebooks with a Table of Contents output from Jupyter Lab. See the DataCamp notebooks.
Post a Comment for "How Can I Get The Option 'export Notebook To Html_toc' On The 'export Notebook As...' Menu In Jupyter Lab?"