jkitchin / ox-ipynb

org-mode exporter to Jupyter notebooks
170 stars 39 forks source link

Possible bug: Table of contents not displayed #34

Open ovasseur opened 3 years ago

ovasseur commented 3 years ago

I am trying to generate the table of contents of my notebook when exporting it. I use the following in-buffer setting: #+OPTIONS: toc:2

However, the exported .ipynb file only contains a header "Table of Contents" without any contents below. The setting #+OPTIONS: toc:t gives the same result.

Are table of contents even supported by ox-ipynb?

I tried with the following minimal example:

#+OPTIONS: toc:2

* Headline 1
#+BEGIN_SRC ipython :results output drawer
  print("A block under Headline 1.")
#+END_SRC

#+RESULTS:
:results:
A block under Headline 1.
:end:

** Subheadline 1
 #+BEGIN_SRC ipython :results output drawer
   print("A block under Subheadline 1.")
 #+END_SRC

 #+RESULTS:
 :results:
 A block under Subheadline 1.
 :end:

** Subheadline 2
 #+BEGIN_SRC ipython :results output drawer
   print("A block under Subheadline 2.")
 #+END_SRC

 #+RESULTS:
 :results:
 A block under Subheadline 2.
 :end:

* Headline 2
#+BEGIN_SRC ipython :results output drawer
  print("A block under Headline 2.")
#+END_SRC

#+RESULTS:
:results:
A block under Headline 2.
:end: