Python sphinx 将斯芬克斯TOC分为带有副标题的小节
我有一份斯芬克斯主文件,其中包括以下子文件:Python sphinx 将斯芬克斯TOC分为带有副标题的小节,python-sphinx,restructuredtext,toctree,Python Sphinx,Restructuredtext,Toctree,我有一份斯芬克斯主文件,其中包括以下子文件: .. toctree:: :maxdepth: 2 :numbered: doc1 doc2 doc3 doc4 doc5 doc6 我想将TOC分为几个部分或子部分,以便按照以下内容呈现: Part 1: Title of Part 1 <doc1 TOC> <doc2 TOC> Part 2: Title of Part 2 <d
.. toctree::
:maxdepth: 2
:numbered:
doc1
doc2
doc3
doc4
doc5
doc6
我想将TOC分为几个部分或子部分,以便按照以下内容呈现:
Part 1: Title of Part 1
<doc1 TOC>
<doc2 TOC>
Part 2: Title of Part 2
<doc3 TOC>
<doc4 TOC>
Part 3: Title of Part 3
<doc5 TOC>
<doc6 TOC>
然后在主文档中:
.. toctree::
:maxdepth: 3
:numbered:
part1
part2
part3
问题是当点击“part1”的链接时,你会被带到一个没有真实内容的页面(“part1.rst”)
还有别的办法吗
或者,是否有方法禁止“part1.rst”的条目生成页面链接?一个选项是这样做:
.. toctree::
:maxdepth: 2
:numbered:
doc1
doc2
doc3
Subheading
-----------
.. toctree::
:maxdepth: 2
:numbered:
doc4
doc5
doc6
就我个人而言,我对其他选择也很感兴趣:)
.. toctree::
:maxdepth: 2
:numbered:
doc1
doc2
doc3
Subheading
-----------
.. toctree::
:maxdepth: 2
:numbered:
doc4
doc5
doc6