【发布时间】:2018-01-02 00:56:34
【问题描述】:
我有一个像这样的 html 文件:
<!DOCTYPE html>
<html>
<head>
<style>
h1 {text-align:center;}
p {text-align:center;}
</style>
</head>
<body>
<h1>My heading</h1>
<p>Some poetry here.</p>
</body>
</html>
我想将它转换为 pandoc 中的 docx。我尝试使用通常的命令
pandoc -s test.html -o test.docx
并且文本被正确渲染,但它没有居中。我会自动生成数百个 html,因此手动修复不在预算之内。基本上我需要一些段落左对齐(默认)和一些居中,因为它们是诗歌。如何实现?
谢谢。
PS:我也可以使用 markdown 作为输入语言而不是 Html。
【问题讨论】:
-
pandoc 不处理样式。
标签: pandoc