如何修复 reStructuredText 表中的列宽? [英] How to fix column width in reStructuredText tables?

查看:30
本文介绍了如何修复 reStructuredText 表中的列宽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Sphinx 创建此表:

I am using Sphinx to create this table:

+---------------+---------------------+---------------------------+-------------------------------------+---------------------+
| 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 文本的大小.请参阅随附的图像.

I want the column width to be fixed at a narrow size so this table can be displayed in one page. But Sphinx makes the ceil text into one long line. So the column width is the size of the ceil text. See the attached image.

有没有办法固定列宽或使ceil文本显示为源表?

Is there a way to fix the column width or make the ceil text displayed as the source table?

谢谢

推荐答案

如果您的问题与乳胶输出有关,tabularcolumns 指令可为您提供必要的灵活性.

If your issue is with latex output, the tabularcolumns directive gives you the necessary flexibility.

这是一个强制前两列宽度的例子:

Here is an example for forcing the width of the first 2 columns:

.. tabularcolumns:: |p{1.5cm}|p{1.5cm}|L|

有关详细信息,请参阅参考文档.

For more information, see the reference documentation.

这篇关于如何修复 reStructuredText 表中的列宽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆