'Passing multiple frame options to a single frame in an rmarkdown::beamer_presentation
How to pass several frame options to a specific frame in an rmarkdown::beamer_presentation?
In the MWE below, the second frame should contain the same table as on the frame before, just with a few more rows.
Thus,
the page numbering is ideally the same for both frame (=>
{.noframenumbering})to simply add the rows on frame 2 below those on frame 1, the content of both frame should be top-aligned (=>
{.t}). Since some other slides require vertical center alignment of frame content, settingclassoption: tin the YAML header would be undesired.
MWE
---
output:
bookdown::pdf_book:
base_format: rmarkdown::beamer_presentation
slide_level: 2
keep_tex: true
---
## Slide
```{r table, cars, echo = FALSE}
library(kableExtra)
knitr::kable(head(mtcars[1:3, 1:3]), caption = "Table caption")
```
## Slide {.noframenumbering}
```{r table, cars2, echo = FALSE}
library(kableExtra)
knitr::kable(head(mtcars[1:6, 1:3]), caption = "Table caption")
```
(adding multiple classoptions in the YAML-header is feasible by separating them with a comma, e.g. classoption: t, aspectratio=169. The same approach did not work for me in adjusting them for a single frame though, i.e., ## Slide {.noframenumbering,.t}.)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
