I would like to create an HTML document from R Markdown as an ioslides_presentation. I would like to use the kable_styling bootstrap_options on tables and produce a presentation that is in widescreen mode by default.
I can either produce a document with tables that render as expected with kable_styling(bootstrap_options = c("striped", "hover"))
:
---
title: "ioslides_and_kable_styling"
output:
ioslides_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r, message=FALSE}
library(dplyr)
library(kableExtra)
```
## My title
```{r results='asis'}
data <- tibble(Column1 = c("A", "B"), Column2 = c(1, 2))
data %>% knitr::kable(format = "html", caption = "My table") %>%
kable_styling(position = "right", bootstrap_options = c("striped", "hover"))
```
Or I can produce a document that is by default in widescreen mode, in which the bootstrap_options are "ignored":
---
title: "ioslides_and_kable_styling"
output:
ioslides_presentation:
widescreen: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
```{r, message=FALSE}
library(dplyr)
library(kableExtra)
```
## My title
```{r results='asis'}
data <- tibble(Column1 = c("A", "B"), Column2 = c(1, 2))
data %>% knitr::kable(format = "html", caption = "My table") %>%
kable_styling(position = "right", bootstrap_options = c("striped", "hover"))
```
Is there someway to have both?