我在使用sphinx生成一些文档时遇到表问题。 我在rst文件中的表格如下所示:
.. tabularcolumns:: p{3.5cm}p{.5cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}
+-------------------------+--------+--------+--------+--------+--------+--------+--------+
| Typ modelu | ISM035 | ISM054 | ISM074 | ISM096 | ISM120 | ISM150 | ISM200 |
+--------------------+----+--------+--------+--------+--------+--------+--------+--------+
| Ciśnienie spalania | Pa | 35 | 40 | 45 | 45 | 50 | 50 | 50 |
+--------------------+----+--------+--------+--------+--------+--------+--------+--------+
| Spadki ciśnień komponentów Ø 80 |
+--------------------+----+--------+--------+--------+--------+--------+--------+--------+
| Rura Ø 80 o dł 1m | Pa | 2.3 | 6.4 | 11.7 | 19.2 | 25 | 34.9 | 52.4 |
(...)
以* .tex结尾:
\begin{tabulary}{\linewidth}{p{3.5cm}p{.5cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}}
\hline
\multicolumn{2}{|l|}{
Typ modelu
} &
ISM035
&
ISM054
&
ISM074
&
ISM096
&
ISM120
&
ISM150
&
ISM200
\\
\hline
Ciśnienie spalania
&
Pa
&
35
&
40
&
45
&
45
&
50
&
50
&
50
\\
\hline \multicolumn{9}{|l|}{
Spadki ciśnień komponentów Ø 80
}\\
\hline
Rura Ø 80 o dł 1m
&
Pa
&
2.3
&
6.4
&
11.7
&
19.2
&
25
&
34.9
&
52.4
\\
\hline
对我来说有什么问题是: \多列{2} {| L |} { (......) \ hline \ multicolumn {9} {| l |} {
如何在创建多列时避免获取额外的规格?我想用“l”代替“| l |” ?
我遇到的第二个问题是antoher表,其中文本从表格单元格中出来:
.. tabularcolumns:: p{4cm}p{3cm}p{1.5cm}p{2cm}p{3cm}
+---------------------------+-----------------------+--------+-----------------------+------------------------------+
| Założenia | Komponent | Ilość | Spadek ciśnienia | Suma spadku ciśniena |
+===========================+=======================+========+=======================+==============================+
| Moduł ISM035, | 1 metrowa rura 0 80 | 9 szt. | 2.3 Pa | 20.7 Pa |
| ciśnienie spalania 35 Pa +-----------------------+--------+-----------------------+------------------------------+
| wysokość komina 9m | Parasol 0 80 | 1 szt. | 2 Pa | 2 Pa |
| +-----------------------+--------+-----------------------+------------------------------+
| | Trójnik 0 80 | 1 szt. | 5.9 Pa | 5.9 Pa |
| +-----------------------+--------+-----------------------+------------------------------+
| | RAZEM | 28.6 Pa |
+---------------------------+--------------------------------------------------------+------------------------------+
但是我从出口到pdf的结果很差:
网格表是从rest表中获取合并单元格的唯一方法吗?我应该如何格式化以便在pdf中正确显示?