Closed cscheid closed 1 year ago
subtables and subcaptions interact with crossref
, so 1.4.
See also #1580. In Quarto 1.4's upcoming crossref system, these are instances of the same problem.
We're not doing a perfect job at this just yet.
It works great:
---
title: tables
keep-md: true
---
```{r}
#| label: tbl-tables
#| layout-ncol: 2
#| tbl-cap: "Tables!"
knitr::kable(head(iris), caption="Caption 1 {#tbl-tables-1}")
knitr::kable(head(cars), caption="Caption 2 {#tbl-tables-2}")
See @tbl-tables, especially @tbl-tables-1 and @tbl-tables-2.
<img width="600" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/285675/370f7d31-862d-43ff-a0e0-862219d5eff6">
## Without explicit layouts
The code cells get in the way:
#| label: tbl-tables
#| tbl-cap: "Tables!"
knitr::kable(head(iris), caption="Caption 1 {#tbl-tables-1}")
knitr::kable(head(cars), caption="Caption 2 {#tbl-tables-2}")
See @tbl-tables, especially @tbl-tables-1 and @tbl-tables-2.
<img width="582" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/285675/3510902c-b8c9-4f17-873a-b8559a1a4fea">
## `tbl-subcap` still doesn't work either
<img width="607" alt="image" src="https://github.com/quarto-dev/quarto-cli/assets/285675/dc5d2c53-dc68-452d-841d-8a3c22b7668d">
This is now working on main
.
Can someone show a reproducible example of how to get two tables next to each other in python? I cannot figure it out.
::: {#tbl-panel layout-ncol=2}
```{python}
#| layout-ncol: 2
Markdown(tabulate(
df, headers=df.columns, showindex=True))
Markdown(tabulate(
df, headers=df.columns, showindex=True))
@rcyost please open a new new GitHub Discussion.
I don't think we have support for this ATM, but we should, since we're on tables anyway.