DescriptionHello, I'm trying to achieve a somewhat complex layout in a RevealJS slide with executable code blocks (both the code echo and the output) and fragments, and it appears in a very strange and (at least in my opinion) non-intuitive way. The layout I'd like to achieve is roughly this:
Here is the MWE I tried to come up with: ---
title: Test code fragments in Revealjs
format: revealjs
---
## Slide 1
:::: {layout="[50, 50]"}
::: {}
- A list of items
- That should appear on the left side
:::
::: {.fragment}
A code fragment that should appear on the right side
```{python}
#| echo: true
#| output: fragment
print("Hello from Python")
```
:::
::::Notice how the code block appears even before the 50/50 layout. It does not appear in a fragment as well (that is, it appears at the same time as the list). I guess I have misunderstood something in how Quarto processes fragments, layouts and/or executable code blocks. |
Replies: 2 comments 1 reply
|
What's See: Regarding the "echo" part, I need to check the reason the code appears above divs in the case of layout. edit: workaround / alternative approach using .columns/.column and valid/correct options ---
title: Test code fragments in Revealjs
format: revealjs
---
## Slide 1
::: {.columns}
::: {.column}
- A list of items
- That should appear on the left side
:::
::: {.column .fragment}
A code fragment that should appear on the right side
```{python}
#| echo: true
#| output-location: fragment
print("Hello from Python")
```
:::
::: |
|
I've opened an issue as I think the layout scaffolding has actually a bug which leads to the issue. |

What's
output: fragment? This isn't a Quarto option, thus why the code output is not a fragment.See:
Regarding the "echo" part, I need to check the reason the code appears above divs in the case of layout.
Note that trying random options are very unlikely to give you anything. You should refer to the documentation to look for what's available as it will save you quite some time.
edit: workaround / alternative approach using .columns/.column and valid/correct options