Sphinx-在toctree的索引内添加索引以包括具有nbsphinx的笔记本

时间:2019-01-20 17:11:46

标签: python jupyter-notebook python-sphinx

我正在编写文档,并且遵循此结构。

.. toctree::
   :maxdepth: 5
   :caption: Contents:

   installation.rst
   quickstart.rst
   data.rst
   geometry.rst
   compute.rst
   math.rst
   process.rst
   plotting.rst
   references.rst

我正在使用nbsphinx以jupyter笔记本形式包括一些示例。我有许多不同的笔记本,但我不想在我的toctree中显示为标题。    我能够做到这一点。

   .. toctree::
   :maxdepth: 5
   :caption: Contents:

   installation.rst
   quickstart.rst
   data.rst
   geometry.rst
   compute.rst
   math.rst
   process.rst
   plotting.rst
   notebook1.ipynb
   notebook2.ipynb
   references.rst

但是我喜欢这样:

      .. toctree::
   :maxdepth: 5
   :caption: Contents:

   installation.rst
   quickstart.rst
   data.rst
   geometry.rst
   compute.rst
   math.rst
   process.rst
   plotting.rst
   workflows -----> which i do not want a .rst file because i want which notebook be one header on my toc
   references.rst

它看起来像

  Worflows
  =========

  notebook1
  ------------

  notebook2
  -----------
  .....

我不希望它们在单个paga中连续显示,它们必须分别在单独的页面中显示。也许我可以在index.rst内为工作流附加index.rst   我希望我已经清楚了。

0 个答案:

没有答案
相关问题