Search code examples
r-markdownbeamercitations

R Markdown beamer presentation apalike citation


I have a markdown beamer_presentation. I have changed the biblio-style to apalike, but I am not getting the expected result. I used Grady et al. (2019) as an example, which is cited on the APA website as follows:

Grady, J. S., Her, M., Moreno, G., Perez, C., & Yelinek, J. (2019). Emotions in storybooks: A comparison of storybooks that represent ethnic and racial groups in the United States. Psychology of Popular Media Culture, 8(3), 207–217.

Using biblio-style: apalike I get the following result in the references:

Grady, Jessica Stoltzfus, Malina Her, Geena Moreno, Catherine Perez, and Jillian Yelinek. 2019. “Emotions in Storybooks: A Comparison of Storybooks That Represent Ethnic and Racial Groups in the United States.” Psychology of Popular Media Culture 8 (3): 207–17.

The following points are different:

  1. Names
  2. Year is not in parentheses
  3. Quotation marks before and after the title
  4. Space between volume and number
  5. Format of page numbers.

Any thoughts or suggestions on how to get the correct results?

Code:

---
output:
  beamer_presentation:
    slide_level: 2
bibliography: ref.bib
biblio-style: apalike

---

---

## Header

- @grady2019emotions

---

## References

BibTeX Code:

@article{grady2019emotions,
  title={Emotions in storybooks: A comparison of storybooks that represent ethnic and racial groups in the United States.},
  author={Grady, Jessica Stoltzfus and Her, Malina and Moreno, Geena and Perez, Catherine and Yelinek, Jillian},
  journal={Psychology of Popular Media Culture},
  volume={8},
  number={3},
  pages={207},
  year={2019},
  publisher={Educational Publishing Foundation}
}

Solution

  • R Markdown uses a citeproc processor to handle citations unless you set the citation_package in your output config. The easiest method (and most portable, because it will also work with other output formats) is to not use bibtex but to download the apa.csl citation style definition, e.g., here, and use it with

    csl: apa.csl