### Bug description

I created a Beamer presentation using Quarto, and noticed there was a blank slide after the title slide. After doing some testing, it seems that this issue is caused by having an R chunk before the first slide (I usually have one chunk before the first slide where I load packages etc). Doing some reading, I found that Pandoc causes this same issue when comments are placed before the first slide (https://tex.stackexchange.com/questions/480125/blank-slide-generated-between-the-title-and-the-first-content-slides-when-using) but I am wondering how having an R chunk plays into this.  For context, I am using a Windows 10 machine and Rstudio 2022.12.0 Build 353.

See repex below:

````
---
title: "repex"
author: | 
  | None
date: "`r Sys.Date()`"
format: 
  beamer:
    incremental: true
keep-tex: true
---

````{r,prepare-data}
#| echo: false
#| warning: false
#| message: false


#some code

z=3+4
````

# Slide 1


- Some text

# Slide 2

- Some text

````

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
cscheid
2023-01-20T16:19:03Z
aimundo
bug revealjs
v1.3
closed
Empty slide after title slide in Beamer
https://github.com/quarto-dev/quarto-cli/issues/4034