我正在使用sphinx作为我的文档。 我有一个音符警告,我想在其中添加一个表格。因为我希望将表扩展到注释的整个宽度,所以我想使用tabularcolumns指令。 但是,在添加此指令时,表格不会呈现为乳胶格式,因此不会呈现为pdf或html。
这是我重新构建的文字摘要:
.. note::
Reserve the necessary amount of time to install your environment. The following table gives approximate values for installation of the Operating System (OS) and for the initialization of the nodes.
.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|
+-------------------------+-----------------------+---------------------+
| Node | Install OS (parallel) | Initialize (serial) |
+=========================+=======================+=====================+
| AS20/AS30 Storage Node | 12 minutes | 10 minutes |
+-------------------------+-----------------------+---------------------+
| AS36 Storage Node | 8 minutes | 15 minutes |
+-------------------------+-----------------------+---------------------+
| AC1/AC2 Controller Node | 8 minutes | 15 minutes |
+-------------------------+-----------------------+---------------------+
当我省略该指令时,表格被正确处理
答案 0 :(得分:-1)
如果你缩进表3空格,它应该工作。像这样:
.. note::
Reserve the necessary amount of time to install your environment. The
following table gives approximate values for installation of the
Operating System (OS) and for the initialization of the nodes.
.. tabularcolumns:: |p{5cm}|p{5cm}|p{5cm}|
+-------------------------+-----------------------+---------------------+
| Node | Install OS (parallel) | Initialize (serial) |
+=========================+=======================+=====================+
| AS20/AS30 Storage Node | 12 minutes | 10 minutes |
+-------------------------+-----------------------+---------------------+
| AS36 Storage Node | 8 minutes | 15 minutes |
+-------------------------+-----------------------+---------------------+
| AC1/AC2 Controller Node | 8 minutes | 15 minutes |
+-------------------------+-----------------------+---------------------+