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

查看:257
本文介绍了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.

Markdown示例:

Example 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

如何在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天全站免登陆