Pandoc:Markdown 中的长表格行->PDF 文档没有换行 [英] Pandoc: Long tablerows in Markdown->PDF documents do not get linewrap

查看:98
本文介绍了Pandoc:Markdown 中的长表格行->PDF 文档没有换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am using Pandoc to generate markdown->DOCX documents with a lot of tables but would like better control over the layout.

我现在也在尝试输出 markdown->PDF,但遇到了表格输出问题.

I am now trying to output markdown->PDF as well, but have run into problems with table output.

在 DOCX 中,带有文本的长行被简单地分成多行.在 PDF 文档中,这不会发生;一行始终是单行,不会在右边距处换行,而是在页面之外继续.正常的段落文本根据右边距流动,所以问题可能不是页面大小.

In DOCX, long rows with text are simply broken up into multiple lines. In the PDF document this does not happen; a row is always a single line that do not wrap at the right margin but continue outside of the page. Normal paragraph text flows according to the right margin, so the problem is probably not the page size.

示例降价:

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

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

How do I enable line-wrapping in PDF tables?

推荐答案

管道表不包含在 LaTeX/PDF 输出中.使用多行表或网格表,如 pandoc 用户指南中所述.这也可以让您控制列的相对宽度.

Pipe tables don't wrap in LaTeX/PDF output. Use multiline or grid tables, as described in the pandoc User's Guide. This will also give you control over relative widths of columns.

这篇关于Pandoc:Markdown 中的长表格行->PDF 文档没有换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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