Skip to content

Commit 51d5be7

Browse files
authored
Merge pull request #913 from jgostick/patch-1
Added tabset explaining creating subtables in a python computation block
2 parents 52e1247 + e8d8dec commit 51d5be7

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/authoring/tables.qmd

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ kable(head(cars))
279279

280280
If your code cell produces multiple tables, you can also specify subcaptions and layout using cell options:
281281

282-
```{{r}}
282+
::: {.panel-tabset}
283+
## R
284+
285+
``` {.r}
283286
#| label: tbl-example
284287
#| tbl-cap: "Example"
285288
#| tbl-subcap:
@@ -293,6 +296,22 @@ kable(head(cars))
293296
kable(head(pressure))
294297
```
295298

299+
## Python
300+
301+
``` {.python}
302+
#| label: tbl-example
303+
#| tbl-cap: "Example"
304+
#| tbl-subcap:
305+
#| - "Cars"
306+
#| - "Pressure"
307+
#| layout-ncol: 2
308+
#| echo: fenced
309+
310+
Markdown(cars + pressure)
311+
```
312+
313+
:::
314+
296315
## Grid Tables
297316

298317
Grid tables are a more advanced type of markdown tables that allow arbitrary block elements (multiple paragraphs, code blocks, lists, etc.). For example:

0 commit comments

Comments
 (0)