首页 > 解决方案 > 狮身人面像不尊重 :widths: 表格的属性(rtd-theme)

问题描述

我使用以下语法为 sphinx 声明一个表:

.. list-table::
   :header-rows: 1
   :widths: 1 1 2

   * - Platzhalter
     - Beispiel
     - Beschreibung
   * - <from_date>
     - <from_date>
     - ...

但是 Sphinx 只是以某种方式忽略了 widths 属性,如下所示:

狮身人面像桌被切断

该表显然不符合我的要求。我怎样才能解决这个问题?

注意:我正在使用阅读文档主题,我不得不把

.wy-table-responsive table td,
.wy-table-responsive table th {
  white-space: normal;
}

进入我的 layout.html 以使表格尊重 div 边框。也许与此有关。如果我省略了这个选项,我只会得到一个滚动条,这也不是很好:/

标签: python-sphinxrestructuredtextread-the-docs

解决方案


推荐阅读