How can I place multiple code chunks side-by-side in Quarto -> HTML?
I've seen this answer, which is great, but it accounts for just 2 code chunks. Is there a way to place up to 4-5 code chunks side-by-side, possibly using .column-screen-inset
, to take advantage of the entire screen width?
I know a way to get exactly what I want, but it has two caveats (which are essentially one):
- It works for images
- It relies on
knitr::include_graphics()
Thus, if I do:
my_file.qmd
---
title: "quarto-page-side-by-side"
---
```{r}
#| eval: true
#| echo: false
#| layout-ncol: 4
#| column: screen-inset
knitr::include_graphics("media/a.jpg")
knitr::include_graphics("media/b.jpg")
knitr::include_graphics("media/c.jpg")
knitr::include_graphics("media/d.jpg")
```
I get this nice page layout with 4 images, side-by-side, that get resized as I change the window size. What's more, if we keep narrowing the window, ultimately the images will be stacked one on top of the other.
Is there a way to achieve this functionality or similar, but with code chunks instead of images?