I have been changing my xaringan presentations over to quarto revealjs presentations which has spurred me on to include an interactive map within a presentation. However, I seem to have hit a minor problem.
When I add a leaflet map I can't seem to horizontally center it on the slide using the fig-align code chunk option but interestingly the fig-width option does allow adjustment of the width of the map.
Is this a known problem? or have I missed a very obvious way of doing this?
qmd reprex below:
---
format: revealjs
---
## htmlwidget not centered
```{r}
#| label: leaflet-map
#| fig-align: center
#| fig-width: 4
library(leaflet)
leaflet() %>%
addTiles()