【发布时间】:2019-08-23 00:02:23
【问题描述】:
有没有其他人注意到如果引用使用下划线而不是连字符,rmarkdown 不会对表格标题进行编号?请参阅下面的 sn-p。或构建 this website 以获取工作示例。
---
title: "Table Captioning"
output:
bookdown::html_document2:
number_sections: true
fig_caption: true
---
# Example
It works in table \@ref(tab:dummy-table) when using hypens.
Table: (\#tab:dummy-table) Some caption.
\```{r dummy-table, echo=FALSE}
knitr::kable(data.frame(a = letters[1:3],
b = 1:3))
\```
But not in table \@ref(tab:dummy_table) when using underscores?
Table: (\#tab:dummy_table) Some caption.
\```{r dummy_table, echo=FALSE}
knitr::kable(data.frame(a = letters[4:6],
b = 4:6))
\```
没什么大不了的,只是让我绊了一下。如果此行为记录在某处而我错过了,我们深表歉意。
【问题讨论】:
标签: r latex r-markdown