New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missing reference for gt table in word document #3600
Comments
Same issue in Windows 11, R 4.2.3, quarto v1.3.294. |
@aminadibi we're aware, thank you. We're going to fix this in 1.4. |
Is there any kind of workaround for this issue in the meantime? |
@dakotakliam This is working right now on 1.4 prereleases: go here and click on "Pre-release" to download an installer. With this version of quarto, I get the following output: |
This is listed as "completed" - but I just tested it and got a very strange error. I cut/pasted/ran your exact sample code, but when I opened the word doc I got the following: After clicking "Close" in word, the document has an improperly formatted table (does not equal your example) This seems to happen if there is a chunk label and caption (required for cross-referencing) |
What version of Quarto and gt are you using exactly? |
Quarto: 1.4.487 |
I can reproduce. |
I'm not sure what this means... is there a problem with quarto, gt, or am I doing something wrong? |
Indeed, thanks @rmflight (I was looking for them after checking the issue was from gt and possibly Quarto). (re)Closing this. FYI, the following works properly. ---
title: "gt missing reference"
format: docx
---
```{r}
#| label: load-data
data(cars)
library(gt)
```
Now lets try a table in our word document. This should be @tbl-cars.
```{r}
#| label: tbl-cars
#| tbl-cap: Something about cars.
cars |>
dplyr::slice_head(n = 5) |>
knitr::kable()
``` |
I am sorry, but I'm unable to follow what's happening here (I'm a user, not a developer). Am I correct in understanding that there is a but, but it's being handled in issue #7151? But when I go to #7151, it seems to suggest the issue is "closed" - but the but is definitely still there. The example you gave to me above uses kable to produce proper output. But I am having trouble with gt(). Again, my apologies, but it seems i don't understand how to track/follow these issues here. |
I don't how this matter here, but let's be explicit:
Leading to:
|
Bug description
gt_missing_reference.docx
Rendering the above document (RStudio render button) results in the table reference looking like
?@tbl-cars
, and there is no caption.If I force HTML output (
quarto::quarto_render(..., output_format = "html")
), I get the expected output ofTable 1
, as well as the caption.Software details:
Checklist
The text was updated successfully, but these errors were encountered: