rstudio / bookdown

Authoring Books and Technical Documents with R Markdown
https://pkgs.rstudio.com/bookdown/
GNU General Public License v3.0
3.71k stars 1.27k forks source link

Use of 'tab.scap.' for tables? (Non kable() users!) #1450

Closed GabriellaS-K closed 6 months ago

GabriellaS-K commented 6 months ago

Hello! Is there a table equivalent of 'fig.scap'? Kable has a good short caption and long caption workaround, but other things like flextable do not. This means when I knit to PDF, the entire table caption goes in the list of table contents page :( when really I just want the first part.

there was a similar question 6 years ago: https://github.com/rstudio/bookdown/issues/543 but the solution works only for kable users. I am not a kable user :)

e.g.

{r, fig.cap="long caption",fig.scap="short"} plot(1:4)

Thank you!

cderv commented 6 months ago

bookdown does not specifically handle your table formatting. You need to see into your Table building tool what is supported. We do have a table framework in knitr with kable(), but if you are not using that, and your are producing raw LaTeX table from another tool you need to look into how to do that with it.

If they do not support short caption in their LaTeX rendering, then you should do a Feature Request in the package repo IMO.

GabriellaS-K commented 6 months ago

Oh thank you for explaining! I thought it was handled by bookdown. Alright, off to feature request in flextable. Thanks :D