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

Rmarkdown tab.cap not working with kbl #849

Open
g-antonello opened this issue Jun 13, 2024 · 1 comment
Open

Rmarkdown tab.cap not working with kbl #849

g-antonello opened this issue Jun 13, 2024 · 1 comment

Comments

@g-antonello
Copy link

g-antonello commented Jun 13, 2024

Thank you for the packages, it makes table manipulation super versatile. I think I came across an issue, though. I was trying to assign captions to my kbl tables, but Rmarkdown was not able to render them. Below is the .Rmd code I used, which I knitted to html.

Best
Giacomo

testTableCaptions.txt

@dmurdoch
Copy link
Collaborator

I think there are two issues here. First, kbl() ignores the tab.cap option, but you can specify a caption by including it in the arguments to kbl(), e.g. change your code chunk to

```{r example-table2}
library(kableExtra)
kbl(mtcars[1:5, 1:5], caption = "This is the caption for the table. Done with KableExtra")
```

The second issue is that this won't match the style of the previous table, and that's likely a problem for you. I don't know BiocStyle, so I am not sure how it is specifying the style that is being shown. Do you know? If not, maybe we should contact its author, and see whether this is something kableExtra could do or whether one or both packages would need changes to be compatible.

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