Pandoc:Markdown-> PDF文档中的长表行不会获得换行

时间:2014-07-30 12:52:33

标签: pdf-generation latex pandoc

我正在使用Pandoc生成包含大量表格的markdown-> DOCX文档,但希望更好地控制布局。

我现在正在尝试输出markdown-> PDF,但是遇到了表输出问题。

在DOCX中,带有文本的长行只是分成多行。在PDF文档中,这不会发生;一行始终是一行,不会在右边距处换行,而是继续在页面外部。正常段落文本根据右边距流动,因此问题可能不是页面大小。

Markdown示例:

This is text that flows according to the page limits. This is text that flows according to the page limits. This is text that flows according to the page limits. 
This is text that flows according to the page limits. This is text that flows according to the page limits. 

| Version | Date  | Comment |
|--------:|-------|---------|
| 1.0.0     | 07.04.2014 | This is a table row that does not flow with the page limits. This is a table row that does not flow with the page limits. |
| 2.0.0     | 07.04.2014 | This is a table row that does not flow with the page limits. This is a table row that does not flow with the page limits. |

This is text that flows according to the page limits. This is text that flows according to the page limits. This is text that flows according to the page limits. 
This is text that flows according to the page limits. This is text that flows according to the page limits. 

产生的PDF Resulting PDF

如何在PDF表格中启用换行?

1 个答案:

答案 0 :(得分:10)

管道表不会包装在LaTeX / PDF输出中。使用多行或网格表,如pandoc User's Guide中所述。这也可以让您控制列的相对宽度。