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

Broken captions for tables on Word documents #556

Open
tkerwin opened this issue Apr 19, 2023 · 2 comments
Open

Broken captions for tables on Word documents #556

tkerwin opened this issue Apr 19, 2023 · 2 comments
Labels

Comments

@tkerwin
Copy link

tkerwin commented Apr 19, 2023

In docx file output from quarto, tables created with apa_table are prefixed with

(#tab:unnamed-chunk-8)
**

-- where "8" is whatever the chunk number is.

Adding a caption field gets rid of the ** but the erroneous table cross-reference code is still there.

I see there is a pull request from the word-fixes branch that looks like it could fix the issue, but it is not in the released version. Right now the released version is unusable for professional document output without editing the document after generation.

@crsh
Copy link
Owner

crsh commented Apr 20, 2023

Hi Thomas, I just merged the branch. Could you try installing from the main branch and let me know if this fixes the problem for you?

@tkerwin
Copy link
Author

tkerwin commented May 10, 2023

This fixes a problem, but does not solve it completely for me. The fixes you merged in make the table work properly when using RMarkdown + Bookdown. However, it doesn't work for Quarto documents.

It looks like the problem is that Bookdown wants Table: (\#tab:table-name) Caption, but Quarto wants : Caption {#tbl-table-name} (or a table label and caption metadata in the block).

I've tried to find out how to detect if the block is being parsed with RMarkdown or Quarto but I'm not sure if there is an easy way. My suggestion would be to have a configuration flag somewhere in papaja to tell the library if you want Bookdown style output or Quarto style output.

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

No branches or pull requests

2 participants