OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Using nbconvert to export a jupyterlab notebook to html with toc?

  • Thread starter Thread starter jackaixin
  • Start date Start date
J

jackaixin

Guest
I'm currently using

  • jupyterlab 4.1.3
  • nbconvert 7.16.2

and would like to export a notebook to html with toc. In earlier versions of nbconvert (v5.x.x) I know we could do jupyter nbconvert --to html_toc FILENAME.ipynb

However, things seem to have changed in nbconvert v7, and --template is used as an argument in the command: jupyter nbconvert --to html FILENAME.ipynb --template lab

I wonder what's the idiomatic way to achieve the same thing in the newest version of Jupyterlab and nbconvert, and whether there are existing template with nice toc (e.g. with numbering of the sections). I haven't been able to find a template that replaces the html_toc in the older versions.

Thanks!
<p>I'm currently using</p>
<ul>
<li>jupyterlab 4.1.3</li>
<li>nbconvert 7.16.2</li>
</ul>
<p>and would like to export a notebook to html with toc.
In earlier versions of nbconvert (v5.x.x) I know we could do
<code>jupyter nbconvert --to html_toc FILENAME.ipynb</code></p>
<p>However, things seem to have changed in nbconvert v7, and <code>--template</code> is used as an argument in the command:
<code>jupyter nbconvert --to html FILENAME.ipynb --template lab</code></p>
<p>I wonder what's the idiomatic way to achieve the same thing in the newest version of Jupyterlab and nbconvert, and whether there are existing template with nice toc (e.g. with numbering of the sections). I haven't been able to find a template that replaces the <code>html_toc</code> in the older versions.</p>
<p>Thanks!</p>
 

Latest posts

Top