-
Notifications
You must be signed in to change notification settings - Fork 5
/
Seminar_12_1_Citations.Rmd
55 lines (39 loc) · 2.15 KB
/
Seminar_12_1_Citations.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
## Seminar 12: Citation management {#writing}
<!-- [Academic writing part 2](#citations) -->
Welcome to the 12th seminar of **Decision Analysis and Forecasting for Agricultural Development**. Feel free to bring up any questions or concerns in the Slack or to [Dr. Cory Whitney](mailto:[email protected]?subject=%5BSeminar_10%5D%20Decision%20Analysis%20Lecture) or the course tutor.
In this seminar, we will discuss how to use Zotero for citations in RMarkdown. If you use an alternative reference management system, you are encouraged to find out how to use it with RMarkdown. However, in this course let's work with Zotero.
Let's start by downloading and installing Zotero.
**1. Install Zotero :**
- If you haven't used Zotero, please download and install Zotero from [zotero.org](https://www.zotero.org/).
**2. Export your Zotero library to a .bib file**:
- Open Zotero.
- Go to `File`, select `Export Library` and choose the `BibTeX` format. <br>
![`Export .bib file from Zotero`](images/zotero_Export_bib.png){width="70%"}
- Save the exported .bib file ![.bib file](images/zotero_References.png){width="15%"} to your project directory.
**3. Add the .bib file to your RMarkdown document**:
- In your RMarkdown document, specify the path to the .bib file using the `bibliography` field in the YAML header.
- Optionally, include a `csl` field if you want to use a specific citation style. Different citation styles can be downloaded from [Citation Style Language](https://www.zotero.org/styles). Save the exported csl file to your project directory.
**4. Cite references in your RMarkdown document**:
- Use `[@citation_key]` to cite references within the text.
Here's an example of how to set this up in an RMarkdown document:
```
---
title: "Your Document Title"
author: "Your Name"
date: "`r Sys.Date()`"
output:
pdf_document: default
html_document: default
bibliography: references.bib
csl: nature.csl # Optional, specify a citation style
---
# Introduction
This is an example of citing a reference [@author2020].
# Method
Describe your method here.
# Results
Present your results here.
# Conclusion
Conclude your document here.
# References
```