opt_interactive captions not rendering from Quarto #1361
Unanswered
SusanMcMillan
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The example you shared works as expected with Quarto > 1.4. You may want to avoid using ---
title: "Sortable Tables Test"
format: html
editor: source
---
This @tbl-gt_non_interactive reference works as expected, as does the caption.
```{r}
#| label: tbl-gt_non_interactive
#| tbl-cap: "Airquality - {gt} No Interactive Option"
#| echo: true
library(gt)
gt(head(airquality))
```
This reference to @tbl-gt_interactive does not work and the caption is not correctly produced. However, the table is now sortable by column, as desired.
```{r}
#| label: tbl-gt_interactive
#| tbl-cap: "Airquality - {gt} Interactive Option"
#| echo: true
gt(airquality)%>%
opt_interactive()
``` |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need table captions that are numbered appropriately in an html file, and users need to sort by columns. When I use the opt_interactive function, Quarto (in Rstudio v. 2023.06.0 Build 421 running on Windows) will not produce either cross references or captions correctly. Is there something else I need to do (.qmd file follows)?
title: "Sortable Tables Test"
format: html
editor: source
This @tbl-gt_non_interactive reference works as expected, as does the caption.
This reference to @tbl-gt_interactive does not work and the caption is not correctly produced. However, the table is now sortable by column, as desired.
Beta Was this translation helpful? Give feedback.
All reactions