Closed GabriellaS-K closed 8 months ago
Using this in chunk option
tab.id='cartable',tab.cap="**Wow car facts** with abbreviations"
is a feature of flextable directly (https://ardata-fr.github.io/flextable-book/captions-and-cross-references.html#knitr-chunk-options-for-flextable-captions)
You should look for info there like
Also in
bookdown::word_document2:
fig_caption: yes
tab_caption: yes
I don't where tab_caption
is coming from. I don't think it has some effect.
Also if you don't know about it you can have a look at Quarto which has better table and cross ref support (https://quarto.org/docs/authoring/tables.html). It is an evolution of R Markdown for broader usage outside of R world. (https://quarto.org/docs/faq/rmarkdown.html)
Hi
The tab_caption:
option is one I added just to see if it worked, as I had fig_caption:
Actually though, using tab.cap and then the table in flextable with the caption there allows me to sort the bold as I like, but still cross referencing in markdown, so it's a good solution!
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.
Hello!
I am knitting a document to word, and want the figures and table captions to be structured: as follows: the number of the figure/table. bold summary a bit more about it.
e.g. Figure 1. Graph showing car sale trends. Data produced from 2020 only or this is fine too: Figure 1. Graph showing car sale trends. Data produced from 2020 only
Currently, adding ** before and after the text in the chunk options works for figures, not tables. It works for tables in html but not if you knit tables to word. See the reproducible example below:
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.