Pandoc 错误 4:无法确定 r markdown 中的参考书目格式

问题描述 投票:0回答:1

我有一个从尾注导出的带有参考文献的文件,名为

ref.bib.txt
,我正在尝试将其插入到 r markdown 文档中。该文件保存在我的工作目录中,标题为 ref.bib.txt,但是当我尝试将我的 r markdown 文件编织为 pdf 时,出现以下错误:

Could not determine bibliography format for ref.bib.txt
Error: pandoc document conversion failed with error 4
Execution halted

还有其他人遇到过这个错误吗?如果是的话,你是如何解决的?

示例参考:

@article{RN20,
    author = {Fang, Yi-Ya and Yamaguchi, Takashi and Song, Soomin C and Tritsch, Nicolas 
    X and Lin, Dayu},
    title = {A hypothalamic midbrain pathway essential for driving maternal behaviors},
    journal = {Neuron},
    volume = {98},
    number = {1},
    pages = {192-207. e10},
    ISSN = {0896-6273},
    year = {2018},
    type = {Journal Article}
}
r r-markdown pandoc bibtex
1个回答
1
投票

pandoc 似乎尝试通过文件扩展名识别书目格式,因此将文件重命名为 ref.bib

 应该可以解决问题。

(Windows/MacOS 上的某些设置会隐藏文件扩展名,因此这可能会有点令人困惑。)

© www.soinside.com 2019 - 2024. All rights reserved.