Importing Citations with Zotero - ubc-geomatics-textbook/docs GitHub Wiki
Using Zotero to Manage Citations
Zotero is a tool for collecting and managing citations. Here is how you can use Zotero to manage the citations for your textbook chapter.
Save Your Citations in Zotero
Here is the quick start guide to Zotero if it is new to you. Once you have written your chapter, you can save the sources you cite to a new Zotero collection (folder). Be sure to name the folder "ch(number of chapter)" to follow the naming convention (for example, "ch15" or "ch16").
Export Collection
After you are done adding citations to your collection, right click on the folder and select Export Collection. A dialog box will appear; make sure that the format is saved as a BibTeX file. Click Ok and the file navigator for your computer will appear. Navigate to where you saved the local version of the textbook on your machine. Add your file to the "bibliographies" folder within the textbook, making sure that the name of the file follows the "ch(number of chapter)" convention.
Link Citations to Inline References
Add your file to the "bibliography" array within the index.Rmd file. This will look like "bibliography/ch(number of chapter).bib", and you will see others there as well. Be sure to separate your file from the others with a comma.
Next, you will need to find each inline citation within your chapter and replace the citation with a link. This link will look like @author_shortTitle_date. Refer to chapter 15 for some examples of what the inline references will look like.
The link text will depend on how Zotero has formatted your citations. Open your ch(number of chapter).bib file to see all of your citations. The link text to reference will be the first line within the curly brackets. Once you render the textbook, the links should lead to the corresponding full citation at the end of your chapter.