反引号后未引用 bookdown 部分标签

bookdown section label not referenced after backticks

我想在章/节的名称中使用 code 部分,并使用标签引用它。

# Venn diagrams: function `venn()`{#venn}

如果不使用反引号,引用会按预期工作,但使用反引号会阻止引用标签:

Warning messages:
1: The label(s) venn not found 
2: The label(s) venn not found

有办法获得吗?

这是 Pandoc 中的 known issue,我认为这是设计使然。您必须删除反引号,或者在 venn() 和部分 ID 之间插入一些内容,例如

# Venn diagrams: the `venn()` function {#venn}