0

I have a very simple document in R Markdown. Here is the code:

---
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).

But the cross-reference as the manual specifies doesn't work.

Phil
  • 7,287
  • 3
  • 36
  • 66

1 Answers1

1

The "standard" rmarkdown package with html_output does not support cross referencing. You have to use, e.g. the package bookdown which provides the format html_document2.

---
title: "Untitled"
output: 
  bookdown::html_document2
---
J_F
  • 9,956
  • 2
  • 31
  • 55