Cross-referencing 在 R bookdown 中使图形名称不正确

Cross-referencing in R bookdown makes the figure name incorrect

我正在用 Rmarkdown 制作绘图图表并给它们命名和标题。但是一旦我在文档中交叉引用它们,它们的名字就毁了。

代码如下:

---
title: "Preliminary Statistics"
author: "Babak"
date: "6/28/2021"
output: 
  bookdown::html_document2:
    fig_caption: true
    
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(
    echo = FALSE,
    fig.width=9, 
    fig.height=5 ,
    message=FALSE, 
    warning=FALSE)
```

```{r Area_duplicate, fig.cap = "Area of duplicated and unique properties by municipality"}
<PLOT CODES>
```
Plot \@ref(fig:Area_duplicate) shows the area od duplicated properties in the dataset grouped by municipality.

结果:

screenshot of the caption

我应该怎么做才能解决这个问题?

将名称中的下划线替换为“-”。