Open mine-cetinkaya-rundel opened 3 weeks ago
I believe this is related to this previous discussion where I was also puzzled by the behavior.
Basically no way to but code cells in a column layout when using layout
. Only using columns
div will work.
This is layout feature / limitation, to be discussed maybe more.
@mine-cetinkaya-rundel #8179 has been closed as the merging problem between two different language is fixed. Though what has been discussed there with @cscheid still applies.
It seems the fact we strip out the code cell from the layout column is expected behavior. I learned that from @cscheid and still found that puzzling behavior, but it inherits behavior from when layout:
is used as a code cell option I believe. (https://quarto.org/docs/authoring/figures.html#custom-layout)
If we really stay with that behavior for Block Layout using Div syntax, we probably need to explain at this part of the documentation: https://quarto.org/docs/authoring/figures.html#block-layout
Problem you see if for any format by the way, not just PDF
For what you want to achieve, you need could use columns but it works only for HTML
---
format: html
fig-width: 3
fig-height: 1
---
:::: {.columns}
::: {#first-column .column width="0.1"}
\(c\)
:::
::: {#second-column .column width="0.9"}
```{r}
#| echo: true
par(mar = c(0, 0, 0, 0))
plot(1:10)
::: ::::
![Image](https://github.com/user-attachments/assets/e8da793e-800e-4f05-9698-8296fd0f3d0b)
But it does not work PDF 🤔 (maybe because as it is not really a Quarto feature like layout and it applies with CSS 🤷 need to 👀 into this)
So there is no straightforward way to achieve the same as in HTML for PDF to show code cell inside a column.
IMO this still need to be discussed.
Quarto
1.6.12
.Here is a reprex:
::: ::::
:::: {layout="[ 0.1, 0.9 ]"} ::: {#first-column} (c) ::: ::: {#second-column}
::: ::::
:::: {layout="[ 0.1, 0.9 ]"} ::: {#first-column} (d) ::: ::: {#second-column}
::: ::::