class: center, middle, inverse, title-slide # Presentation Ninja ## References with xaringan ### Joseph Casillas ### Last update: 2018-03-07 --- # Bib setup ```r source(here::here("helper.R")) library(RefManageR) BibOptions(check.entries = FALSE, bib.style = "authoryear", style = "markdown", dashed = TRUE) file.name <- system.file("Bib", "biblatexExamples.bib", package = "RefManageR") bib <- ReadBib(file.name) ``` --- # Citaion examples 1. Standard citation, single author: <a name=cite-wilde></a>([Wilde, 1899](#bib-wilde)) 2. Multiple citations <a name=cite-bertram></a>([Bertram and Wentworth, 1996](#bib-bertram)) on a single line <a name=cite-kastenholz></a>([Kastenholz and Hünenberger, 2006](http://dx.doi.org/10.1063/1.2172593)). 3. Inline citation: <a name=cite-iliad></a>[Homer (2004)](#bib-iliad) said this and this. 4. More than two authors: <a name=cite-vazques-de-parga></a>([Vázques de Parga, Lacarra, and Uría Ríu, 1993](#bib-vazques-de-parga)) 5. More than two authors inline: <a name=cite-springer></a>[Springer (1950)](#bib-springer) talk about things. <a name=cite-massa></a>[Massa (2004)](#bib-massa) has great ideas. ```r # 6. 'NoCite' function to include references in bib that # don't appear in text NoCite(bib, c("knuth:ct:a", "aristotle:poetics", "herrmann")) ``` --- # References (all on one page) <a name=bib-aristotlepoetics></a>[Aristotle](#cite-aristotlepoetics) (1968). _Poetics_. Ed. by D. W. Lucas. Clarendon Aristotle. Oxford: Clarendon Press. <a name=bib-bertram></a>[Bertram, A. and R. Wentworth](#cite-bertram) (1996). "Gromov invariants for holomorphic maps on Riemann surfaces". In: _J.~Amer. Math. Soc._ 9.2, pp. 529-571. <a name=bib-herrmann></a>[Herrmann, W. A, K. Öfele, S. K. Schneider, et al.](#cite-herrmann) (2006). "A carbocyclic carbene as an efficient catalyst ligand for C-C coupling reactions". In: _Angew.~Chem. Int.~Ed._ 45.23, pp. 3859-3862. <a name=bib-iliad></a>[Homer](#cite-iliad) (2004). _Die Ilias_. Trans. by W. Schadewaldt. With an intro. by J. Latacz. 3rd ed. Düsseldorf and Zürich: Artemis & Winkler. <a name=bib-kastenholz></a>[Kastenholz, M. A. and P. H. Hünenberger](#cite-kastenholz) (2006). "Computation of methodology\hyphenindependent ionic solvation free energies from molecular simulations". In: _J.~Chem. Phys._ 124. DOI: [10.1063/1.2172593](http://dx.doi.org/10.1063/1.2172593). <a name=bib-knuthcta></a>[Knuth, D. E.](#cite-knuthcta) (1984b). _Computers & Typesetting_. Vol. A.: _The \TeXbook_. Reading, Mass.: Addison-Wesley. <a name=bib-massa></a>[Massa, W.](#cite-massa) (2004). _Crystal structure determination_. 2nd ed. Berlin: Spinger. <a name=bib-springer></a>[Springer, O.](#cite-springer) (1950). "Mediaeval Pilgrim Routes from Scandinavia to Rome". In: _Mediaeval Studies_ 12, pp. 92-122. <a name=bib-vazques-de-parga></a>[Vázques de Parga, L, J. M. Lacarra and J. Uría Ríu](#cite-vazques-de-parga) (1993). _Las Peregrinaciones a Santiago de Compostela_. Vol. 3. 3 vols. Ed. facs. de la realizada en 1948-49. Pamplona: Iberdrola. <a name=bib-wilde></a>[Wilde, O.](#cite-wilde) (1899). _The Importance of Being Earnest: A Trivial Comedy for Serious People_. English and American drama of the Nineteenth Century. Leonard Smithers and Company. Google Books: googlebooks. --- # References (split up) <a name=bib-aristotlepoetics></a>[Aristotle](#cite-aristotlepoetics) (1968). _Poetics_. Ed. by D. W. Lucas. Clarendon Aristotle. Oxford: Clarendon Press. <a name=bib-bertram></a>[Bertram, A. and R. Wentworth](#cite-bertram) (1996). "Gromov invariants for holomorphic maps on Riemann surfaces". In: _J.~Amer. Math. Soc._ 9.2, pp. 529-571. <a name=bib-herrmann></a>[Herrmann, W. A, K. Öfele, S. K. Schneider, et al.](#cite-herrmann) (2006). "A carbocyclic carbene as an efficient catalyst ligand for C-C coupling reactions". In: _Angew.~Chem. Int.~Ed._ 45.23, pp. 3859-3862. <a name=bib-iliad></a>[Homer](#cite-iliad) (2004). _Die Ilias_. Trans. by W. Schadewaldt. With an intro. by J. Latacz. 3rd ed. Düsseldorf and Zürich: Artemis & Winkler. <a name=bib-kastenholz></a>[Kastenholz, M. A. and P. H. Hünenberger](#cite-kastenholz) (2006). "Computation of methodology\hyphenindependent ionic solvation free energies from molecular simulations". In: _J.~Chem. Phys._ 124. DOI: [10.1063/1.2172593](http://dx.doi.org/10.1063/1.2172593). <a name=bib-knuthcta></a>[Knuth, D. E.](#cite-knuthcta) (1984b). _Computers & Typesetting_. Vol. A.: _The \TeXbook_. Reading, Mass.: Addison-Wesley. --- # References II (split up) <a name=bib-massa></a>[Massa, W.](#cite-massa) (2004). _Crystal structure determination_. 2nd ed. Berlin: Spinger. <a name=bib-springer></a>[Springer, O.](#cite-springer) (1950). "Mediaeval Pilgrim Routes from Scandinavia to Rome". In: _Mediaeval Studies_ 12, pp. 92-122. <a name=bib-vazques-de-parga></a>[Vázques de Parga, L, J. M. Lacarra and J. Uría Ríu](#cite-vazques-de-parga) (1993). _Las Peregrinaciones a Santiago de Compostela_. Vol. 3. 3 vols. Ed. facs. de la realizada en 1948-49. Pamplona: Iberdrola. <a name=bib-wilde></a>[Wilde, O.](#cite-wilde) (1899). _The Importance of Being Earnest: A Trivial Comedy for Serious People_. English and American drama of the Nineteenth Century. Leonard Smithers and Company. Google Books: googlebooks. --- # How it works The previous two slides were created using the `print_bib_rmd` function. <pre><code>```{r, results='asis', echo=FALSE, warning=FALSE} print_bib_rmd(bib, start = 1, stop = 6) ```</code></pre> and <pre><code>```{r, results='asis', echo=FALSE, warning=FALSE} print_bib_rmd(bib, start = 7, stop = 10) ```</code></pre>