Markdown Pandoc不维护从.txt文件到Word文件的换行符

Markdown Pandoc不维护从.txt文件到Word文件的换行符,markdown,pandoc,Markdown,Pandoc,我正在使用Pandoc将Scrivener与Zotero集成。我在Scrivener中编写,添加Zotero引文键,编译一个.txt文件,然后使用Pandoc将.txt文件转换为Word文件,在该文件中,引文键有效地转换为我喜欢的引文样式(本例中为APA)。按照网页上的说明,我还设置了“Marked 2”,以显示我在Scrivener中使用markdown编写的内容的输出 问题来了:换行符。 如果我用便笺书写: I want a newline after this. This should b

我正在使用Pandoc将Scrivener与Zotero集成。我在Scrivener中编写,添加Zotero引文键,编译一个.txt文件,然后使用Pandoc将.txt文件转换为Word文件,在该文件中,引文键有效地转换为我喜欢的引文样式(本例中为APA)。按照网页上的说明,我还设置了“Marked 2”,以显示我在Scrivener中使用markdown编写的内容的输出

问题来了:换行符。 如果我用便笺书写:

I want a newline after this.
This should be a newline.
I want a newline after this.<br>
This should be a newline.
然后标记2显示:

I want a newline after this. This should be a newline.
于是我在Scravener上写道:

I want a newline after this.
This should be a newline.
I want a newline after this.<br>
This should be a newline.
太好了!现在我编译成一个.txt文件,我得到:

I want a newline after this.<br>
This should be a newline.
我得到了我的.docx文件(当我使用完整的文档进行此操作时,我所有的引用都在那里,这样就行了!),但随后我读到:

I want a newline after this. This should be a newline.

请注意,.txt文件中的换行命令已经消失,但我仍然没有换行。

原因是传统的在标记中写入硬换行符的方法是在行尾添加两个空格

I want a newline after this.␠␠
This should be a newline.

元素被解释为原始HTML,也就是说,它将以支持HTML的任何格式呈现,如标记或HTML本身。然而,Docx不支持原始HTML,因此只需删除

因此,要么使用上面解释的传统标记语法(这是丑陋的IMHO),要么使用pandoc功能,该功能允许通过以反斜杠结束一行来添加硬换行符,“转义”换行符:

I want a newline after this.\
This should be a newline.

Pandoc的主要帮助来源是其。你试过了吗?谢谢,事实上我是在发帖后找到的。谢谢。我发现的另一个选项是在pandoc命令中添加-f markdown+硬线分隔符。