'rmarkdown beamer reduce font size for references

How can I reduce the font size in the references section of an beamer presentation written in rmarkdown? I was able to get the references on multiple slides, but they are so many, I would like to also reduce the font size.

---
title: "minimal reproducible example"
author: "User"
date: "April 2022"
output: beamer_presentation
bibliography: references.json
---

## Main question



How can I reduce the font size in the references section of an beamer
presentation written in rmarkdown (@xie_etal20, @rcoreteamLanguageEnvironmentStatistical2021)?

I was able to get the references on multiple slides, but they are so
many, I would like to also reduce the font
size.


## References {.allowframebreaks}



Solution 1:[1]

You could change the font size like this:

---
title: "minimal reproducible example"
author: "User"
date: "April 2022"
output: 
  beamer_presentation:
    keep_tex: true
bibliography: test.bib
header-includes:
  - \AtBeginEnvironment{CSLReferences}{\tiny}
---

## Main question



How can I reduce the font size in the references section of an beamer
presentation written in rmarkdown (@einstein)?

I was able to get the references on multiple slides, but they are so
many, I would like to also reduce the font
size.


## References {.allowframebreaks}

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 samcarter_is_at_topanswers.xyz