Automatic toctree update

三世轮回 提交于 2021-01-27 13:00:44

问题


I'm not sure if this is possible. But I'm hoping to put multiple .rst files in a directory, and during compilation. I want these files to automatically be inserted in the toctree. How can I go about this?


回答1:


You can use the glob option which enables wildcards. Like this:

.. toctree::
   :glob:

   *

This adds all other *.rst files in the same directory to the toctree.

Reference: "Use “globbing” in toctree directives"



来源:https://stackoverflow.com/questions/28773398/automatic-toctree-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!