A common pedagogical tool is providing code and the resulting output _side-by-side_ ([simple example](https://raw.githack.com/edrubin/EC607S21/master/notes-lecture/04-inference/04-inference.html#37)). While not as important for long-form document formats, this is especially nice for presentation formats that usually take on a "wide" aspect ratio like 16:9 or 4:3.

Quarto offers a number of really nice features for controlling multi-column layouts (`{.columns}` & co.). So you can mimic this behaviour by duplicating the code across columns (but not evaluating one of them). Something like:

````
:::: {.columns}

::: {.column width="50%"}
```r
library(dplyr, warn.conflicts=FALSE)
mtcars |>
  filter(cyl>=4) |>
  summarise(mean_mpg = mean(mpg))
```
:::

::: {.column width="50%"}
```{r}
library(dplyr, warn.conflicts=FALSE)
mtcars |>
  filter(cyl>=4) |>
  summarise(mean_mpg = mean(mpg))
```
:::

::::

````


However, AFAICT, there's no way to specify that code should evaluate "to the side" automatically, thus avoiding the code duplication.

Is this something that you would consider supporting? 

Regardless, I've really been enjoying Quarto so far. Many thanks to all the devs!
2022-04-16T23:31:05Z
grantmcdermott
closed
FR: Code output to the side
https://github.com/quarto-dev/quarto-cli/issues/664