Procedurely generating Panel Tabsets within code chunk #10486
-
Description[Env: Python 3.11, Quarto 1.5.56, Windows 11] Hi Quarto community, I am trying to create a nested panel tabset procedurely within a python code block. This previously worked for me in Quarto version 1.3.450 but seems to be failing with the new version. Has there been any changes to parsing that is changing the behaviour of IPython display? Thanks for your help Rendered SamplesExpected output as of version 1.3.450Current output as of version 1.5.56Reproducible Example Code---
title: Attribute Display
execute:
echo: false
message: false
warning: false
jupyter: python3
---
::: {.panel-tabset}
```{python}
#| label: variable_distribution
#| output: asis
attributes = ['a', 'b', 'c']
plot_attributes = ['a', 'b']
from IPython.display import display, Markdown
display(Markdown(f"## Frequency Table"))
display(Markdown(":::: {.panel-tabset}"))
for attribute in attributes:
display(Markdown(f"### {attribute}"))
display(Markdown("::::"))
display(Markdown(f"## Distribution Plot"))
display(Markdown(":::: {.panel-tabset}"))
for attribute in plot_attributes:
display(Markdown(f"### {attribute}"))
display(Markdown("::::"))
```
::: |
Beta Was this translation helpful? Give feedback.
Answered by
DaedalusInMaze
Aug 9, 2024
Replies: 1 comment 3 replies
-
Did you look at the markdown produced? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the suggestion.
I just took a look at the md and I think the issues is with
::: {.panel-tabset}
placed before::: {#variable_distribution .cell execution_count=1}
within Markdown which leads to the issue. Guess that is why it worked in the old version b/c the feature of cell execution info does not exist there.I realized I just need to wrap the outermost :::{.panel-tabset} within the python chunk as well to solve it.