问题
I inclue and cross-referencing a table in a Rmd file, and I want to add chapter number with the table title and referencing number, like "TABLE 1.1 test", but not "TABLE 1 test". I render the file using bookdown::word_document2. Here is a minimal example:
---
title: test
output:
bookdown::word_document2:
fig_caption: yes
toc: yes
---
```{r}
library(knitr)
```
# Heading 1
I'm cross-referencing a table table:\@ref(tab:test).
```{r test}
test <- data.frame(a = 1:6, b = 2:7)
kable(test, caption = "test")
```
Rmarkdown/Bookdown is really an amazing tool @Yihui, thanks!
来源:https://stackoverflow.com/questions/42250743/how-to-number-table-with-chapter-number