Skip to content
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

cross-references are broken when output format is docx #1140

Closed
6 tasks done
XiangyunHuang opened this issue Nov 23, 2022 · 5 comments
Closed
6 tasks done

cross-references are broken when output format is docx #1140

XiangyunHuang opened this issue Nov 23, 2022 · 5 comments

Comments

@XiangyunHuang
Copy link

XiangyunHuang commented Nov 23, 2022

Prework

  • Read and agree to the code of conduct and contributing guidelines.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.

Description

Cross-references was broken when output format is docx.

Reproducible example

a minimal reproducible example from #994

---
title: "quarto gt"
format: docx
---

## Quarto

A table @tbl-gt.

```{r}
#| label: tbl-gt
#| tbl-cap: A Caption
#| echo: false

library(gt)

mtcars |> 
  head() |>
  gt() |>  
  tab_spanner(
    label = "performance",
    columns = c(
      mpg, cyl, disp
      )
  ) 
```

Here is a screenshot from docx.

Expected result

Cross-references work!

Session info

End the reproducible example with a call to sessionInfo() in the same session (e.g. reprex(session_info = TRUE)) and include the output.

> sessionInfo("gt")
R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
character(0)

other attached packages:
[1] gt_0.8.0

loaded via a namespace (and not attached):
[1] compiler_4.2.2  graphics_4.2.2  tools_4.2.2     utils_4.2.2     grDevices_4.2.2 stats_4.2.2    
[7] datasets_4.2.2  methods_4.2.2   base_4.2.2 

I use quarto 1.2.269 and gt 0.8.0

@XiangyunHuang XiangyunHuang changed the title cross-reference was broken when output format is docx cross-references are broken when output format is docx Nov 24, 2022
@stevenbedrick
Copy link

Just to add, the same problem is happening with Knitr, so it's (maybe) not just a Quarto thing.

@tdemarchin
Copy link

Hi, I have the same issue. Is there any fix planned soon?

@tdemarchin
Copy link

Hi, this a very blocking issue as I cannot gt in production, do you plan to fix it soon?

@rich-iannone rich-iannone modified the milestones: v0.10.0, v0.11.0 Aug 26, 2023
@ldecicco-USGS
Copy link

I wanted to add that example given in this issue shows 2 problems. The cross referencing doesn't work, and the caption doesn't show up. Ideally both would be fixed.

@XiangyunHuang
Copy link
Author

The issue was solved by Quarto 1.4.376, so I'm gone to close it.

@github-project-automation github-project-automation bot moved this from To discuss / To plan to Done in R Markdown Team Projects Sep 25, 2023
@rich-iannone rich-iannone modified the milestones: v0.11.0, v0.10.0 Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment