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

Table caption not displaying in Word, if list of objects given to kable #368

Closed
ugroempi opened this issue Mar 15, 2017 · 5 comments
Closed
Milestone

Comments

@ugroempi
Copy link

Thanks for fixing things really fast!
I have one further possible bug: My Word version only shows (and counts) table captions for tables of a single object, not for lists of objects (not even for a list of a single object).
For example, the code below produces tables without a caption in Word (using bookdown::word_document2), while the caption works fine in pdf and html.

tab1 <- swiss[1:10,1:3]
tab2 <- swiss[1:10,4:6]
knitr::kable(list(tab1, tab2), caption="A table caption that is not shown in Word")

Best, Ulrike

@yihui yihui added this to the v0.4 milestone Mar 19, 2017
@yihui
Copy link
Member

yihui commented Mar 19, 2017

Word is not supported and will not be supported in this case. Sorry.

@yihui yihui closed this as completed in 1c6aa5e Mar 19, 2017
@ugroempi
Copy link
Author

I understand and respect the wish to keep things simple. However, wouldn't it (perhaps) be a simple hack with great benefit to treat lists of tables for Word such that the chunk is executed for the first element as if it were a single element and for the list of remaining elements exactly as it is now? That would fix the Caption and numbering / reference problem and leave the arrangement of tables to the user.

Best, Ulrike

@yihui yihui reopened this Mar 20, 2017
@yihui
Copy link
Member

yihui commented Mar 20, 2017

I'll reconsider it. Thanks!

@yihui
Copy link
Member

yihui commented May 17, 2017

Fixed in the dev version of knitr. Thanks!

@github-actions
Copy link

github-actions bot commented Nov 6, 2020

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants