Home
The panelize extension allows you to tabbify existing code cells. The supported options include:
| Class | Description |
|---|---|
.to-source |
Convert a code cell to show rendered output and its source. |
.to-pyodide |
Convert code cell from static Python code to interactive Python code using Pyodide. |
.to-webr |
Convert code cell from static R code to interactive R code using webR. |
You can wrap existing code cells using a Div and specify the class. For example, with Python we would have:
:::{.to-source}
```{python}
#| echo: fenced
#| eval: true
x = [1, 2]
print(x)
```
:::This will generate output equivalent to:
:::{.panel-tabset}
### Results
```{python}
#| echo: fenced
#| eval: true
x = [1, 2]
print(x)
```
### Source
```{{python}}
#| eval: true
x = [1, 2]
print(x)
```
:::