【发布时间】:2012-10-23 01:25:47
【问题描述】:
我希望能够在表格中生成目录。例如。这应该 有边框,看起来像这样:
.. tabularcolumns:: |p{10.5cm}|p{1.1cm}|p{1.4cm}|p{1.1cm}|
+----------------------------------------------------+-------+---------+-----+
| | hw1 | hw2 | hw3 |
+====================================================+=======+=========+=====+
| heading 1 | | | |
+----------------------------------------------------+-------+---------+-----+
| heading 2 | | | |
+----------------------------------------------------+-------+---------+-----+
| heading 3 | | | |
+----------------------------------------------------+-------+---------+-----+
我想从以下内容自动生成表格:
.. toctree::
:maxdepth: 2
file 1
file 2
输出为 html 和 pdf。
这可以吗?还是我必须使用 docutils 解析器或类似的?
【问题讨论】:
标签: python-sphinx restructuredtext tableofcontents docutils toctree