【发布时间】:2020-07-10 13:36:42
【问题描述】:
以test.md Markdown 文件为例:
---
title: "Testing"
author: Bob Alice
date: July 07, 2010
geometry: margin=2cm
documentclass: extarticle
fontsize: 12pt
output: pdf_document
---
Here is a test of a table:
+----------+-------------------+-----------------+
| Box name | Another parameter | The IP address |
+==========+===================+=================+
| Test 1 | random-string-01 | 10.0.0.20 |
| Test 2 | random-string-02 | 10.0.0.30 |
+----------+-------------------+-----------------+
如果我通过 pandoc 进行转换:
$ pandoc --version
pandoc.exe 2.10 ...
...与:
pandoc test.md --pdf-engine=xelatex -o test.pdf
...结果是:
也就是说,“Test 1”和“Test 2”被压缩成一行——即使文档明确提到了grid_tables:
https://pandoc.org/MANUAL.html#tables
Pandoc 不支持具有行跨度或列跨度的网格表。这意味着 Pandoc 不支持跨行的可变列数和跨列的可变行数。所有网格表的每一行中的列数必须相同,并且每列中的行数必须相同。
所以,我真的不明白它是如何将这些行合并为一个的。
是否有可能让 pandoc -> latex -> pdf 在各自的单元格中保留“测试 1”和“测试 2”?以及是否可以摆脱表格底部的空白垂直空间?
【问题讨论】: