# Add Citations to an RMarkdown Document and Print Bibliography

This is an R Markdown document. This is an example of a citation in the text Loh (1992). Now we cite in parentheses (e.g., Baez and Lauda, 2004b). Notice the useful 'b' beside the year in the citation. You can change the default options in a setup chunk at the start of the document or at any other point using the `BibOptions` function or by specifying options as a list in the `.opts` argument to the cite functions. In this example we mix `"authoyear"` citation style with `"numeric"` bibliography style.

Note that I do not only have to cite by key, and may use all the features of the `SearchBib` function to index into the BibEntry object. Here are all the entries of type `Report` in my bibliography Chiu and Chow (1978); Padhye, Firoiu, and Towsley (1999). The hyperlinks will take you to their entry in the bibliography. The link for Markey (2005) will open the document in a new window; this is the default behaviour, if a link is available (see `?open.BibEntry`). The following citation has no hyperlink (de Geer, 1985). You can also embed plots, to make the page longer:

    plot(cars)

I've added a reference to CTAN without citing it using the `NoCite` function. Now I'm adding a reference from another bibliography (a second `BibEntry` object) (Serban, Staicu, and Carroll, 2013). Look at all my Aristotle: Aristotle (1907); Aristotle (1929); Aristotle (1968); Aristotle (1877).

    plot(cars)

Some papers on the arXiv are Baez and Lauda (2004a); Baez and Lauda (2004b); Itzhaki (1996); Wassenberg and Sanders (2010).

References

[1] Aristotle. The Rhetoric of Aristotle with a commentary by the late Edward Meredith Cope. Ed. by E. M. Cope. With a comment. by E. M. Cope. Vol. 3. 3 vols. Cambridge University Press, 1877.

[2] Aristotle. De Anima. Ed. by R. D. Hicks. Cambridge: Cambridge University Press, 1907.

[3] Aristotle. Physics. Trans. by P. H. Wicksteed and F. M. Cornford. New York: G. P. Putnam, 1929.

[4] Aristotle. Poetics. Ed. by D. W. Lucas. Clarendon Aristotle. Oxford: Clarendon Press, 1968.

[5] W. W. Chiu and W. M. Chow. A Hybrid Hierarchical Model of a Multiple Virtual Storage (MVS) Operating System. Research rep. RC-6947. IBM, 1978.

[6] I. de Geer. “Earl, Saint, Bishop, Skald~- and Music. The Orkney Earldom of the Twelfth Century. A Musicological Study”. PhD thesis. Uppsala: Uppsala Universitet, 1985.

[7] N. C. Loh. “High-Resolution Micromachined Interferometric Accelerometer”. MA Thesis. Cambridge, Mass.: Massachusetts Institute of Technology, 1992.

[8] N. Itzhaki. Some remarks on 't Hooft's S-matrix for black holes. Mar. 11, 1996. arXiv: hep-th/9603067.

[9] J. Padhye, V. Firoiu and D. Towsley. A Stochastic Model of TCP Reno Congestion Avoidance and Control. Tech. rep. 99-02. Amherst, Mass.: University of Massachusetts, 1999.

[10] J. C. Baez and A. D. Lauda. “Higher-Dimensional Algebra V: 2-Groups”. Version 3. In: Theory and Applications of Categories 12 (2004), pp. 423-491. arXiv: math/0307200v3.

[11] J. C. Baez and A. D. Lauda. Higher-Dimensional Algebra V: 2-Groups. Oct. 27, 2004. arXiv: math/0307200v3.

[12] N. Markey. Tame the BeaST. The B to X of BibTeX. Oct. 16, 2005. URL: http://tug.ctan.org/tex-archive/info/bibtex/tamethebeast/ttb_en.pdf (visited on 10/01/2006).

[13] CTAN. The Comprehensive TeX Archive Network. 2006. URL: https://www.ctan.org (visited on 10/01/2006).

[14] J. Wassenberg and P. Sanders. Faster Radix Sort via Virtual Memory and Write-Combining. Aug. 17, 2010. arXiv: 1008.2849v1 [cs.DS].

More References

[1] N. Serban, A. M. Staicu and R. J. Carroll. “Multilevel Cross-Dependent Binary Longitudinal Data”. In: Biometrics 69.4 (2013), pp. 903-913.