You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Citations in captions provided inside R chunks are properly resolved for figures (which is amazing, many thanks), but not for gt tables.
Example:
---
format: html
references:
- id: author:2015
author:
- family: Author
given: Ann
edition: '2'
issued:
- year: 2015
language: en-US
publisher: A publisher
publisher-place: A place
title: A book
type: book
---
```{r}
#| label: fig-airquality
#| fig-cap: 'Temperature and ozone level [Source: @author:2015, 67].'
#| warning: false
#| echo: false
library(ggplot2)
ggplot(airquality, aes(Temp, Ozone)) + geom_point()
```
```{r}
#| label: tbl-gt
#| tbl-cap: 'A toy example tibble for testing with gt [Source: @author:2015, 77].'
#| warning: false
#| echo: false
library(gt)
library(tidyverse)
exibble %>%
gt()
```
| Col1 | Col2 | Col3 |
|------|------|------|
| A | B | C |
| E | F | G |
| A | G | G |
: My Caption [Source: @author:2015, 87]. {#tbl-letters}
Output (just the caption lines, as visible in a browser window), note the unresolved citation in Table 1:
Figure 1: Temperature and ozone level (Source: Author 2015, 67).
Table 1: A toy example tibble for testing with gt [Source: @author:2015, 77]
Table 2: My Caption (Source: Author 2015, 87).
The same results are seen when trying flextable or huxtable. kable, however, works as expected.
Given that quarto seems to be committed to supporting all popular table packages, in particular gt, it would be great if quarto could be made to support citations in gt table captions as well as it does for figure captions. Making this work for flextable and huxtable would of course be highly welcome as well.
RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_6_8) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
quarto -v
1.1.179
Checklist
Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
Please format your issue so it is easier for us to read the bug report.
Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
Please document the operating system you're running. If on Linux, please provide the specific distribution.
The text was updated successfully, but these errors were encountered:
I just wanted to piggyback on this issue as I am have the same problem with table cross references using gt.
Running the code above from njbart works if I render the document as html, but not as a docx. Tthe gt table is created but not given a label ("unable to resolve crossref @tbl-gt") when I render a docx. I am using the Quarto 1.3.361, Rstudio version 2002
.02.3 "Prairie Trillium" and R version 4.2.1 "Funny-Looking Kid" test.docx
Bug description
Citations in captions provided inside R chunks are properly resolved for figures (which is amazing, many thanks), but not for gt tables.
Example:
Output (just the caption lines, as visible in a browser window), note the unresolved citation in Table 1:
The same results are seen when trying flextable or huxtable. kable, however, works as expected.
Given that quarto seems to be committed to supporting all popular table packages, in particular gt, it would be great if quarto could be made to support citations in gt table captions as well as it does for figure captions. Making this work for flextable and huxtable would of course be highly welcome as well.
RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_6_8) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
quarto -v
1.1.179
Checklist
The text was updated successfully, but these errors were encountered: