我一直在敲打这个问题几个小时,我确信解决方案很简单,或者根本不存在.
我正在尝试将html文件转换为docx!
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: #d0e4fe;
}
h1 {
color: orange;
text-align: center;
}
p {
font-family: "Times New Roman";
font-size: 20px;
}
</style>
</head>
<body>
<h1>My First CSS Example</h1>
<p>This is a paragraph.</p>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我可以转换它没有问题,但我不能让风格坚持下去.
pandoc -s myfile.html -o test64.docx
pandoc -s -c myfile.css myfile.html -o test64.docx
Run Code Online (Sandbox Code Playgroud)
请救救我