markdown - pandoc docx:没有表或坏表
问题描述
我正在尝试使用 pandoc 在 docx 中生成表格,但无法使其工作。LibreOffice 至少会尝试生成一个表格,而 OpenOffice 只是忽略表格,完全将单元格视为具有对齐的段落。
它应该工作吗?我可以修复设置中的某些内容以使其正常工作吗?可能可以在参考文档中以样式制作一些东西吗?
这是tmp.md
包含三个表格示例的完整文件:
plain text
Right Left Center Default
------- ------ ---------- -------
12 12 12 12
123 123 123 123
1 1 1 1
---------------------------------------------------------------------------
Item Kilowatts Use Cost
--------------- --------------- ---------------- -----------
Geothermal Plant **`1250.0`** Electricity **` 4.4`**
Houses **`13.7`** Shelter **` 4.2`**
---------------------------------------------------------------------------
| head1 | head 2 |
|-------|---------
| data1 | data2 |
| data3 | data4 |
这就是我运行的
$ pandoc tmp.md -o tmp.docx
这就是我在 OpenOffice 中得到的
这是我的 pandoc 版本:
$ pandoc --version
pandoc 2.7.3
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.8.1
该系统是macOS Mojave 10.14.6
表扩展集是
$ pandoc --list-extensions| grep -i table
+grid_tables
+multiline_tables
+pipe_tables
+simple_tables
+table_captions
解决方案
推荐阅读
- python - python - 在pygame中碰撞后如何在其他地方随机生成敌人?
- javascript - 评估javascript在flutter webview中花费的时间太长?
- python - 使用分箱 X 值 Python 制作条形图
- javascript - 如何将对象数组转换为单个对象
- python - 从列表中删除较早的重复项并保持顺序
- linq - 如何在三列上编写 LINQ 查询,每列具有不同的值
- java - (JAVA)如何将双精度从列表转换为整数
- python - 我需要帮助来确定不受支持的操作数类型的位置?
- sql - SQL 包月费率
- javascript - Javascript gives false array length?