如何修复reStructuredText表中的列宽?

时间:2014-12-18 12:34:35

标签: python-sphinx restructuredtext

我正在使用Sphinx创建此表:

+---------------+---------------------+---------------------------+-------------------------------------+---------------------+
| Stakeholder   | Major Value         | Attitudes                 | Constraints                         | Major Interests     |
+===============+=====================+===========================+=====================================+=====================+
| Manager       | Reduce data entry.  | Strong commitment through | Cost, time and the required skill to| Google apps         |
|               | Improve ft          | release 4.                | develop this application.           | integration.        |
|               | productivity.       |                           |                                     |                     |
+---------------+---------------------+---------------------------+-------------------------------------+---------------------+
| Ft            | More efficient use  | Strong enthusiasm         | Training required to use       CRM. | Google apps         |
|               | of time. Less       |                           |                                     | integration.        |
|               | repetitive work.    |                           |                                     |                     |
|               |                     |                           |                                     |                     |
+---------------+---------------------+---------------------------+-------------------------------------+---------------------+

我希望将列宽固定为较小的尺寸,以便此表可以显示在一个页面中。但是狮身人面像 使ceil文本成一条长线。因此列宽是ceil文本的大小。请参见附图。

有没有办法修复列宽或将ceil文本显示为源表?

由于

enter image description here

1 个答案:

答案 0 :(得分:3)

如果您的问题是乳胶输出,.. tabularcolumns:: |p{1.5cm}|p{1.5cm}|L| 指令为您提供了必要的灵活性。

以下是强制前2列宽度的示例:

  output: {
    path: PATHS.build,
    filename: '/[name].[chunkhash].js',
    chunkFilename: '/[chunkhash].js'   }

有关详细信息,请参阅reference documentation