我在R Markdown中有一个非常简单的文档。这是代码:
---
title: "Untitled"
output: html_document
---
# R Markdown {#r-mkdw}
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. I want to cross-reference the Header of this text with \@ref(r-mkdw).
但是手册中指定的交叉引用无效。
带有html_output
的“标准” rmarkdown程序包不支持交叉引用。您必须使用例如提供格式bookdown
的软件包html_document2
。
---
title: "Untitled"
output:
bookdown::html_document2
---