使用 Grid Table 时,Sphinx 文档生成器不喜欢多行单元格

Sphinx document generator does not like multi-line cell when using Grid Table

我阅读了有关在创建 table 时使用网格 Table 样式以通过 Sphinx 文档生成器显示一些信息的文档 here。但是,我的 gride table 在格式化时不起作用。有什么想法吗?

+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| Element Selector                                                                                         | data-*      | data-neuro-* value | Combined                    |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-button | loMonthly          | data-button='loMonthly'     |
| div.lo.lo__all-offers > div.lo__sortable-header > button.lo__sortable-header--monthly.selected-sort.desc |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-button | loSortBtn          | data-button='loSortBtn'     |
|  div.lo.lo__all-offers > div.lo__sortable-header > button.lo__sortable-header--apr.desc                  |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-button | loInterest         | data-button='loInterest'    |
|  div.lo.lo__all-offers > div.lo__sortable-header > button.lo__sortable-header--interest-paid.desc        |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-button | loTerm             | data-button='loTerm'        |
| div.lo.lo__all-offers > div.lo__sortable-header > button.lo__sortable-header--term-length.desc           |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-region | loFees             | data-region='loFees'        |
| div.lo.lo__all-offers > div.lo__sortable-header > div.lo__sortable-header--fees                          |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-region | loCall             | data-region='loCall'        |
| div.lo.lo__all-offers > a > div > p                                                                      |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-button | LoanOptionBtn      | data-button='LoanOptionBtn' |
| div.lo__drawer-container > div > button                                                                  |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+
| #loanOfferSection > div.application-form-section__container > div > form >                               | data-region | CopyText           | data-region='CopyText'      |
| div.lo__drawer-container.show-drawer > div > div.lo__legal-copy                                          |             |                    |                             |
+----------------------------------------------------------------------------------------------------------+-------------+--------------------+-----------------------------+

我希望元素选择器单元格足够短,以便在生成文档时不必水平滚动,但我什至无法查看它,因为出现以下错误:'(ERROR/3) 格式错误 table' 当我 运行 我的 html 创建我的文档时。

在单词 "Element" 之前的第一行和第一列中有一个奇怪的不可见字符。删除那个不可见的字符,table 应该呈现。

但是我认为网格 table 不支持列宽,除非您将每个单元格的内容包装到相对所需的宽度。对于 csv tables,您可以使用 :widths: 属性指定每列中应出现多少个字符,如下所示:

.. table:: my table description
   :widths: 40, 10, 15, 30