Pandoc 支持将包含跨多列或多行的单元格的表格从 Markdown 转换为 DOCX,例如
---
title: MWE
---
Lorem ipsum
+---------------------+-----------------------+
| Location | Temperature 1961-1990 |
| | in degree Celsius |
| +-------+-------+-------+
| | min | mean | max |
+=====================+=======+=======+=======+
| Antarctica | -89.2 | N/A | 19.8 |
+---------------------+-------+-------+-------+
| Earth | -89.2 | 14 | 56.7 |
+---------------------+-------+-------+-------+
将转换为
可以反向操作吗?将表格从 DOCX 转换为 Markdown?
我尝试了
pandoc --from docx --to markdown+grid_tables
但它产生了
-------------------------------------------------------------------------
Location Temperature
1961-1990 in
degree
Celsius
--------------------------------- ------------- ------------ ------------
min mean max
Antarctica -89.2 N/A 19.8
Earth -89.2 14 56.7
-------------------------------------------------------------------------
Pandoc 的 Markdown writer(版本 3.1.11.1)不支持 rowspan 和 colspan。 https://github.com/jgm/pandoc/issues/8990有一个开放的功能请求。