Citing in Rmarkdown using zotero

TC

2017/07/07

Categories: r Tags: r-markdown citr zotero bibliography

Motivations

The advantage of using Rmarkdown as a replacement of Word, libreoffice or other editors is tremendous and perfect in my current workflow, in which R coding, visualization are recorded for reproducibility and presentation.

For reports, manuscripts written in the academic style, sufficient reference is important because we are scientist and that’s what we do! all arguements should be backed up by evidence. In order to make the citation process painless, I did the following process and works for me (for now).

The motive behind doing this is simple:

Human beings should automate repetitive works and focus on things of real importance

In my opinion, the best practice in adding citations should be:

Comparing to two alternative strategies:

Rmarkdown + zotero is best suited for my need by providing a set of simple grammars to form organized hierachichal structure, which looks pretty in either html,pdf, word, or plain .rmd too!

Setup

And it’s all set.

Workflow of adding citations

Here is a typical scenario in my writing experience where citation is needed.

  1. Plan to write a topic or a section in the manuscript; Search a bunch of related papers, select & read them roughly, organize them in my own word.Add useful articles in my zotero library, lots of tutorials are available;

  2. Write the part;

  3. At each point where a citation is needed, use Addins-Insert citations, add citation to the paper.

  4. Edit YAML to include the bibtex file (eg: bibliography: ./references.bib); add ## reference at the end of the main text;
  5. knit into pdf or html.


  1. basically you can click on citations in line, and the ref will pop up, instead of scrolling back and forth in pdfs