R Markdown无法呈现引用

4

我正在尝试使用RMarkdown的bibtex功能进行引用,但我的引用未被呈现。

我正在使用最新版本的R、RStudio和RMarkdown。

我的rmd文件如下所示:

---
title: "Music Recommender Systems"
output:
  html_document:
    theme: united
    toc: yes
  pdf_document:
    toc: yes
  word_document: default
bibliography: bibliography.bib
---

Blah blah @778431

我的bibtex文件“bibliography.bib”保存在.rmd文件旁边,看起来像这样:

@inproceedings{778431,
    author = {Lesaffre, Micheline and Leman, Marc and Martens, Jean-Pierre},
    booktitle = {Dagstuhl Seminar Proceedings},
    editor = {Crawford, T. and Veltkamp, R.C.},
    issn = {1862-4405},
    language = {eng},
    location = {Dagstuhl, Germany},
    pages = {1--11},
    publisher = {Internationales Begegnungs- und Forschungszentrum fur Informatik (IBFI), Schloss},
    title = {A user-oriented approach to music information retrieval},
    url = {http://drops.dagstuhl.de/vollt...},
    year = {2006},
}

输出结果中没有引用文献,只有:

嘟嘟嘟 @778431

发生了什么?请查看http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html以获得格式建议。我相信我的设置都是正确的,但如果我错过了一些小错误,我很乐意接受指正。

注意,我最初在文件中尝试使用[@778431]。

1个回答

6
经过一些测试,我自己来回答这个问题。不幸的是,RStudio/RMarkdown不允许您使用数字引用标识符。我用a778431替换了778431,然后上面的代码就可以工作了。我听说Endnote会生成数字标识符,因此为了Endnote用户的利益,希望这个问题能得到一些关注。

Zotero 会生成标准的 BibTeX 键,这些键可以很好地与 markdown-pandoc 兼容(并且可以导入您的 EndNote 库以实现平滑过渡)。 - Ben

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接