我正在使用 knitr 和 pandoc 在 RMarkdown 中撰写论文。我的参考文献保存为 .bib 文件。所有文件都位于同一文件夹中。使用默认的 pandoc 引用系统,末尾的参考书目和文中的引用均正确显示:
---
title: I am a title
author: Mr. Author
output:
pdf_document:
bibliography: ~/framingstudy.bib
---
Authors say many things [@aaroe11].
然而,使用 natbib 时,它们都不会出现:
---
title: I am a title
author: Mr. Author
output:
pdf_document:
citation_package: natbib
bibliography: ~/framingstudy.bib
biblio-style: apalike
---
Authors say many things [@aaroe11].
这是.bib文件中的参考条目:
@article{aaroe11,
Author = {Lene Aaroe},
Date-Added = {2017-03-14 00:40:32 +0000},
Date-Modified = {2017-03-28 22:17:31 +0000},
Journal = {Political Communication},
Number = {2},
Pages = {207-226},
Title = {Investigating Frame Strength: The Case of Episodic and Thematic Frames},
Volume = {28},
Year = {2011}}
知道我做错了什么吗?
答案1
我设法通过全新安装软件包knitr
来解决这个问题Github
:
devtools::install_github('yihui/knitr')