我想在 Markdown 文档中使用网格表。
我的带有网格表的降价:
# Grid tables
## Fist example
+-------------------+-------------------+
| Grid Tables | Are Beautiful |
+===================+===================+
| | In code and docs |
| Easy to read | |
| | |
+-------------------+-------------------+
| Exceptionally flexible and powerful |
+-------+-------+-------+-------+-------+
| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 |
+-------+-------+-------+-------+-------+
## Second
+---------------------+----------+
| Property | Earth |
+=============+=======+==========+
| | min | -89.2 °C |
| Temperature +-------+----------+
| 1961-1990 | mean | 14 °C |
| +-------+----------+
| | min | 56.7 °C |
+-------------+-------+----------+
## End
*The end.*
然后我使用pandoc转换为pdf:
pandoc -s -o ./test.pdf --from=markdown+grid_tables ./test.md
我做错了什么?
谢谢!
可能是你的pandoc版本太旧了;用
pandoc -v
检查。 pandoc 2.19 中添加了网格表支持。
只有 Pandoc 2.9 或更高版本可以处理网格表中的行跨度和列跨度,请参阅 https://github.com/jgm/pandoc/releases/tag/2.19 .
下面这个更简单的表格可以吗?
+---------------+---------------+--------------------+
| Fruit | Price | Advantages |
+===============+===============+====================+
| Bananas | $1.34 | - built-in wrapper |
| | | - bright color |
+---------------+---------------+--------------------+
| Oranges | $2.10 | - cures scurvy |
| | | - tasty |
+---------------+---------------+--------------------+