我正在使用 pandoc v3.2,这是我的 markdown 文件: markdown 文件
# Test
`This is a table:`
| 1 | 1 | 1 | 1 |
| ---- | ---- | ---- | ---- |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 |
+---------------+---------------+--------------------+
| Fruit | Price | Advantages |
+===============+===============+====================+
| Bananas | $1.34 | - built-in wrapper |
| | | - bright color |
+---------------+---------------+--------------------+
| Oranges | $2.10 | - cures scurvy |
| | | - tasty |
+---------------+---------------+--------------------+
然后使用cmd:
pandoc -s test.md -o test.pdf --from=markdown+grid_tables --pdf-engine=xelatex -V CJKmainfont="Microsoft YaHei" -V mainfont="Microsoft YaHei"
结果:
结果
它总是三行表,不是我想要的(grid_tables)
谁知道怎么解决?谢谢!!!
我需要使用 pandoc 的网格表禁用 longtable。谢谢!!!
Markdown 中使用的表格样式对输出表格所使用的样式没有影响。
如果您想要单元格之间有更多行,请查看此问题及其中提供的解决方案:https://github.com/jgm/pandoc/issues/922