Citation Management
The tutorial below will help you set up Zotero to add easy citation management to your writing workflow.
Figure 40: Pre-recording Tutorial
Zotero
- Register for a free account at www.zotero.org.
- Download the Zotero desktop app, and configure it to sync with your zotero.org account.
- Install the Zotero plugin in your favorite browser.
- When you discover a good article for your project, add it to your library using the Zotero Connector browser plugin.
- Use collections to organize references articles for different projects.
The Zotero plugin will attempt to pull the relevant metadata directly from the site. Formal sources will try to make this easier by providing the correct metadata, but note that you may need to make manual corrections.
Citekeys
- Look at your library at zotero.org. If syncing is working, articles added to the Zotero app should appear.
- If necessary, make a security key from Settings > Feeds/API.
- From any collection, select a checkbox next to any article.
Click the
export
icon, and and copy thebibtex
api url. It will look something like this for your whole library:https://www.zotero.org/api/users/123456/items/top?limit=25&format=bibtex&key=AbcdeFgHzijKLmN1opQRStUVw&v=1
A collection will contain an id like
/collections/A12BCDE3/
in the URL.
Be sure to check the API call that you copied in case it has extra arguments, as these may lead to only a subset of your library. If your call is different than above, manually edit it to conform to this format.
Program your portfolio to pull your bibliography before building. In your portfolio, add the following code in the first chunk of your
index.Rmd
(the chunk was originally labeledinit
).
This calls the zotero.org api and saves the results locally for use later.readLines('https://www.zotero.org/api/users/123456/items/top?limit=25&format=bibtex&key=AbcdeFgHzijKLmN1opQRStUVw&v=1') %>% writeLines('references.bib')
Add a bibtex citekey from your library anywhere in your prose to create a paranthetical citation and bibliography. For instance, to cite Dean Saxenian’s book Regional Advantage the bibtex record would look like this:
@book{saxenian1994, title = {Regional {{Advantage}}: {{Culture}} and {{Competition}} in {{Silicon Valley}} and {{Route}} 128}, isbn = {978-0-674-75339-6}, shorttitle = {R{\'e}gional {{Advantage}}}, language = {en}, publisher = {{Harvard University Press}}, author = {Saxenian, AnnaLee}, year = {1994}, note = {Google-Books-ID: zt9OAAAAMAAJ}, }
And you could add the citekey
[@saxenian1994]
anywhere in an.Rmd
file to create a paranthetical citation at that location and a fully formatted bibliography at the bottom of the page, like so (Saxenian 1994). See the bookdown documentation for more information on citations.
Better BibTex
- Optionally, install Better BibTex for some additional features designed for professional researchers.
Bibliography
Saxenian, AnnaLee. 1994. Regional Advantage: Culture and Competition in Silicon Valley and Route 128. Harvard University Press.