在我的机器上,最近安装的Pandoc版本(pandoc 1.13.2.1)似乎有问题。使用以前安装的版本,从标记到纯文本的转换将在纯文本输出中生成'Setext-style headers---'=' for H1 and '-' for H2---。此外,我还注意到另外两个不确定的问题:
在过去的几分钟里,我一直在与不同的潘多克游戏,运气不佳。
如何将插图#1转换为插图#3
环境pandoc (pandoc 1.13.2.1) Kubuntu 15.10
说明1:输入标记文件
# Title
## Section
* This is the section.
### Subsection
* This happens to be the subsection说明2:运行pandoc -f markdown -t plain pandoc_markdown_issue.md后输出纯文本
TITLE
Section
- This is the section.
Subsection
- This happens to be the subsection说明3:所需输出
Title
=====
Section
-------
- This is the section.
Subsection
----------
- This happens to be the subsection发布于 2015-12-07 17:28:37
纯文本编写器被更改为使用纯文本书籍的一般格式。当然,没有选择会使每个人都满意。对于您给出的示例,使用减价编写器会很好。
发布于 2019-09-11 22:35:22
我可以通过完全省略-f和-t标志并让Pandoc从输出文件扩展名推断转换格式来实现您想要的输出:
pandoc file.md -o file.txt或者,使用-t plain似乎也有效:
pandoc -f markdown -t plain file.md -o file.txt不太清楚为什么第一个例子有效。我猜这是其中一个标价的读者,因为有多个。
发布于 2021-12-16 13:42:21
Pandoc现在自动为标题生成大写字母。
我遇到了这个问题,-t plain从docx变成了上层,使用了一个小小的lua过滤器。一开始我做了
$ pandoc -t native foo.docx看到上面的文本被Strong所包围,例如[Para [Strong [Str "some text"]]]。非粗体文本就像[Para [Str "moar", Space, Str "text"]]。所以过滤器变成:
function Strong(element)
return element.content
end我把它放进一个文件weaken.lua然后
$ pandoc --lua-filter=weaken.lua -f docx -t plain foo.docx -o foo.txthttps://stackoverflow.com/questions/34132549
复制相似问题