I am writing a paper in RMarkdown with knitr and pandoc. My references are saved as a .bib file. All files are in the same folder. With the default pandoc citation system, both the bibliography at the end and the citation in-text show up properly:
---
title: I am a title
author: Mr. Author
output:
pdf_document:
bibliography: ~/framingstudy.bib
---
Authors say many things [@aaroe11].
With natbib, however, neither of them show up:
---
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].
This is the reference entry in the .bib file:
@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}}
Any ideas what I'm doing wrong?
Best Answer
I managed to solve this by doing a fresh install of the
knitr
package fromGithub
: