Skip to content

Commit

Permalink
Merge pull request #913 from jgostick/patch-1
Browse files Browse the repository at this point in the history
Added tabset explaining creating subtables in a python computation block
  • Loading branch information
jjallaire authored Nov 7, 2023
2 parents 52e1247 + e8d8dec commit 51d5be7
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion docs/authoring/tables.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ kable(head(cars))

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

```{{r}}
::: {.panel-tabset}
## R

``` {.r}
#| label: tbl-example
#| tbl-cap: "Example"
#| tbl-subcap:
Expand All @@ -293,6 +296,22 @@ kable(head(cars))
kable(head(pressure))
```

## Python

``` {.python}
#| label: tbl-example
#| tbl-cap: "Example"
#| tbl-subcap:
#| - "Cars"
#| - "Pressure"
#| layout-ncol: 2
#| echo: fenced
Markdown(cars + pressure)
```

:::

## Grid Tables

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

0 comments on commit 51d5be7

Please sign in to comment.