Han Chen
Han Chen

Reputation: 23

Cannot cite using bibtex in blogdown?

My question is similar to How to cite using bibtex in blogdown?

However I have used Rmd file to cite but still not work. I don't know what's wrong and what I should add in the Rmd file.

I hope to cite Casella's Statistical Inference book in text and generate a reference.

For example

  1. I created si.bib file from google scholar and put it into /content/post folder.

  2. I created a Rmd file called "cite something" and included code like this

    ---
    title:  cite something
    author: ''
    date: '2018-05-17'
    slug: cite-something
    categories: []
    tags: []
    bibliography: [si.bib]
    link-citations: true
    ---
    @si
    # Reference
    

I hope to create something like this

enter image description here

But only get

enter image description here

My github repo is here: https://github.com/hc704/hc704.com

And my netlify website is here: hc704.netlify.com

Thanks in advance for any help.

Upvotes: 1

Views: 128

Answers (1)

Guilherme Parreira
Guilherme Parreira

Reputation: 1011

Note that you are using @si, which seems to be wrong. si is the name of the file that contains all your references and it is not the key for Casella reference.

Your current bib file is:

@book{casella2002statistical,
  title={Statistical inference},
  author={Casella, George and Berger, Roger L},
  volume={2},
  year={2002},
  publisher={Duxbury Pacific Grove, CA}
}

and then you should cite it as @casella2002statistical and not @si (which is the name of the file).

Upvotes: 2

Related Questions