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

Tables not numbered when knitting to word #594

Closed
mariusbarth opened this issue Sep 24, 2024 · 3 comments · Fixed by #595
Closed

Tables not numbered when knitting to word #594

mariusbarth opened this issue Sep 24, 2024 · 3 comments · Fixed by #595
Assignees
Labels

Comments

@mariusbarth
Copy link
Collaborator

Describe the bug
When knitting to apa6_docx, tables are not numbered, see screenshot:
Bildschirmfoto vom 2024-09-24 12-08-54

To Reproduce
Add the following lines to the papaja template:

```{r npk-data}
apa_table(head(npk), caption = "The npk data set.")
```

Table\ \@ref(tab:npk-data) contains the npk data set.

Expected behavior
I would have expected "Table 1" as table header.

Additional context

> installed.packages()[c("rmarkdown", "bookdown", "knitr"), "Version", drop = F]
          Version
rmarkdown "2.28" 
bookdown  "0.40" 
knitr     "1.48" 
> R.version.string
[1] "R version 4.4.1 (2024-06-14)"
> rmarkdown::pandoc_version()
[1] ‘3.1.11’
``

@crsh crsh added the bug label Sep 24, 2024
@crsh
Copy link
Owner

crsh commented Sep 24, 2024

Thanks for reporting. Indeed, this is related to a change in the AST on the pandoc side. I already have fix for this on a local branch that I need to polish. I'll try to get this done by next week.

@crsh crsh self-assigned this Sep 24, 2024
@mariusbarth
Copy link
Collaborator Author

This might be a separate issue, but maybe this is also related to the changes in the AST that you mentioned: Cross references to appendices (and also to figures and tables in appendices) are also incorrect when knitting to word, with cross references reading "Appendix 1", etc instead of "Appendix A" and "Table 11" instead of "Table A1"

@crsh
Copy link
Owner

crsh commented Sep 25, 2024

I have just opened a PR with a fix for this. The separate numbering of figures and tables in the abstract is, I'm afraid, an entirely different problem. Could you open new issue for this?

@crsh crsh closed this as completed in #595 Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants