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-referencing for huxtables is not working in quarto for docx (Word document ) output format #229

Open
shafayetShafee opened this issue Aug 15, 2022 · 2 comments

Comments

@shafayetShafee
Copy link

shafayetShafee commented Aug 15, 2022

Bug Description

Table cross-referencing is not working when using huxtable in quarto document for word document output format.

Minimal Reproducible Example

Here's a Minimal Reprex

---
title: "Untitled"
format: docx
---

## Table for word document in quarto

```{r}
library(huxtable)
```

```{r}
#| label: tbl-air1

mytab1 <- hux(head(airquality))
caption(mytab1)<- "My caption"
mytab1
```

- Table caption appears
- This reference @tbl-air1 doesn't work

```{r}
mytab2 <- hux(head(airquality))
caption(mytab2) <- "Second table caption"
label(mytab2) <- "tbl-air2"
mytab2
```

- Table caption appears
- This reference @tbl-air2 doesn't work

```{r}
#| label: tbl-air3
#| tbl-cap: "Third table caption"

mytab3 <- hux(head(airquality))
mytab3
```

- Table caption doesn't appear
- This reference @tbl-air3 doesn't work

Version Info

Package Version

packageVersion("huxtable")
#> [1] '5.5.0'
packageVersion("flextable")
#> [1] '0.7.3'
packageVersion("officer")
#> [1] '0.4.3'

Rstudio and Quarto Version

rstudioapi::versionInfo()

#>  $version
#>  [1] '2022.7.1.554'
#
# > $release_name
# > [1] "Spotted Wakerobin"

quarto::quarto_version()
#> [1] '1.0.38'

R version and System Info

version
#>                _                                
#> platform       x86_64-w64-mingw32               
#> arch           x86_64                           
#> os             mingw32                          
#> crt            ucrt                             
#> system         x86_64, mingw32                  
#> status                                          
#> major          4                                
#> minor          2.1                              
#> year           2022                             
#> month          06                               
#> day            23                               
#> svn rev        82513                            
#> language       R                                
#> version.string R version 4.2.1 (2022-06-23 ucrt)
#> nickname       Funny-Looking Kid
@hughjonesd
Copy link
Owner

This is possibly related to quarto-dev/quarto-cli#1556

@shafayetShafee
Copy link
Author

Yes have seen that too. I tried both huxtable and flextable and neither of them is working properly. So thought that I let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants